Package com.flir.thermalsdk.image.fusion
Class Fusion
java.lang.Object
com.flir.thermalsdk.image.fusion.Fusion
Provides functionality to manage the Fusion modes of a
ThermalImage
.-
Method Summary
Modifier and TypeMethodDescriptionIR image is blended with visual image based on the specified blending factor value.Get current fusion modegetMsx()
Thermal MSX (Multi Spectral Dynamic Imaging) mode displays an infrared image where the edges of the objects are enhanced with information from the visual image.@Nullable JavaImageBuffer
getPhoto()
Get a visual image (photo) as aJavaImageBuffer
extracted from the file.int
Get the height of the photo image, to get the photo itself seegetPhoto()
.int
Get the width of the photo image, to get the photo itself seegetPhoto()
.Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image.Get Thermal fusion settings.Get a copy of fusion transformation object.Visual image is zoomed and fused with IR image.void
setBlending
(double level, ColorMode colorMode) IR image is blended with visual image based on the specified blending factor value.void
setFusionMode
(FusionMode fusionMode) Set current fusion mode.void
setMsx
(double alpha) Thermal MSX (Multi Spectral DynamicImaging) mode displays an infrared image where the edges of the objects are enhanced with information from the visual image.void
setPictureInPicture
(int x, int y, int width, int height, ColorMode colorMode) Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image.void
setPictureInPicture
(Rectangle area, ColorMode colorMode) Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image.void
setThermalFusion
(ThermalValue min, ThermalValue max) IR image is blended with visual image based on the specifiedThermalValue
threshold.void
IR image is blended with visual image with no max temperature threshold.void
IR image is blended with visual image with no min temperature threshold.void
setTransformation
(Transformation transform) Set a fusion transformation object.void
setVisualOnly
(ColorMode colorMode) Visual image is zoomed and fused with IR image.
-
Method Details
-
setMsx
Thermal MSX (Multi Spectral DynamicImaging) mode displays an infrared image where the edges of the objects are enhanced with information from the visual image. Note: Does no longer change the fusion mode.- Parameters:
alpha
- Flag that indicate how much the visual image is blended with IR (valid value range: [0.0, 100.0]).- Throws:
IllegalArgumentException
- when provided alpha value is out of range (valid value range: [0.0, 100.0])- See Also:
-
getMsx
Thermal MSX (Multi Spectral Dynamic Imaging) mode displays an infrared image where the edges of the objects are enhanced with information from the visual image. -
setPictureInPicture
public void setPictureInPicture(int x, int y, int width, int height, ColorMode colorMode) throws IllegalArgumentException Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image. Note: Does no longer change the fusion mode.- Parameters:
x
- left corner of the IR rectangle shapey
- top corner of the IR rectangle shapewidth
- width of the IR rectangle shapeheight
- height of the IR rectangle shapecolorMode
- color mode of the visual image part- Throws:
IllegalArgumentException
- when provided area size or position is incorrect- See Also:
-
setPictureInPicture
public void setPictureInPicture(Rectangle area, ColorMode colorMode) throws IllegalArgumentException Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image. Note: Does no longer change the fusion mode.- Parameters:
area
- area defining the IR part of the imagecolorMode
- color mode of the visual image part- Throws:
IllegalArgumentException
- when provided area size or position is incorrect- See Also:
-
getPictureInPicture
Picture in picture fusion, where a defined box/rectangle shape with IR image pixels is placed on top of the visual image. -
setVisualOnly
Visual image is zoomed and fused with IR image. Note: Does no longer change the fusion mode.- Parameters:
colorMode
- color mode of the visual image- See Also:
-
getVisualOnly
Visual image is zoomed and fused with IR image. -
setBlending
IR image is blended with visual image based on the specified blending factor value. Use Blending mode to display a blended image that uses a mix of infrared pixels and digital photo pixels. Note: Does no longer change the fusion mode.- Parameters:
level
- blending factor value defining how much IR image is blended with visual image (1.0 = only IR, 0.0 = only visual)colorMode
- color mode of the visual image- See Also:
-
getBlending
IR image is blended with visual image based on the specified blending factor value. -
setThermalFusion
IR image is blended with visual image based on the specifiedThermalValue
threshold. Note: Does no longer change the fusion mode.- Parameters:
min
- lower/min threshold asThermalValue
max
- higher/max threshold asThermalValue
- Throws:
IllegalArgumentException
- when provided min value is greater than max value- See Also:
-
setThermalFusionAbove
IR image is blended with visual image with no max temperature threshold. Note: Does no longer change the fusion mode.- Parameters:
min
- lower/min threshold asThermalValue
- See Also:
-
setThermalFusionBelow
IR image is blended with visual image with no min temperature threshold. Note: Does no longer change the fusion mode.- Parameters:
max
- higher/max threshold asThermalValue
- See Also:
-
getThermalFusion
Get Thermal fusion settings. -
getCurrentFusionMode
Get current fusion mode -
setFusionMode
Set current fusion mode. Usually this method is called after Fusion.setYYY(), in example:// assuming 'myThermalImage' is an instance of ThermalImage Fusion fusion = myThermalImage.getFusion(); // we want to set an MSX mode with a custom alpha parameter fusion.setMsx(10); // first set alpha parameter value fusion.setFusionMode(FusionMode.MSX); // apply MSX mode to the ThermalImage // now calling 'myThermalImage.getImage()' will render an image in MSX mode with alpha value of 10
If you want to use default parameters for particular fusion mode you only need to call:// assuming 'myThermalImage' is an instance of ThermalImage Fusion fusion = myThermalImage.getFusion(); fusion.setFusionMode(FusionMode.MSX); // apply MSX mode with default alpha parameter to the ThermalImage // now calling 'myThermalImage.getImage()' will render an image in MSX mode with default alpha value
-
getPhoto
Get a visual image (photo) as aJavaImageBuffer
extracted from the file. This is a full resolution photo that is not fusion aligned.- Returns:
- a visual image (photo) as a
JavaImageBuffer
extracted from the file ornull
, if no visual image is associated with this file. - See Also:
-
getPhotoHeight
public int getPhotoHeight()Get the height of the photo image, to get the photo itself seegetPhoto()
.- Returns:
- height of image
- See Also:
-
getPhotoWidth
public int getPhotoWidth()Get the width of the photo image, to get the photo itself seegetPhoto()
.- Returns:
- width of image
- See Also:
-
setTransformation
Set a fusion transformation object. -
getTransformation
Get a copy of fusion transformation object.
Note: returnedTransformation
object after modification, needs to be applied in order to make effect.// assuming 'myThermalImage' is an instance of ThermalImage Fusion fusion = myThermalImage.getFusion(); Transformation transformation = fusion.getTransformation(); // modify Transformation object transformation.panX = 10; // apply updated Transformation to the ThermalImage fusion.setTransformation(transformation); // now calling 'myThermalImage.getImage()' will render an image with updated pan X
-