Package boofcv.gui.image
Class VisualizeImageData
java.lang.Object
boofcv.gui.image.VisualizeImageData
Renders different primitive image types into a BufferedImage for visualization purposes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
colorizeGradient
(GrayF32 derivX, GrayF32 derivY, float maxAbsValue, @Nullable BufferedImage output) Renders two gradients on the same image using two sets of colors, on for each input image.static BufferedImage
colorizeGradient
(GrayS16 derivX, GrayS16 derivY, int maxAbsValue, @Nullable BufferedImage output) Renders two gradients on the same image using two sets of colors, on for each input image.static BufferedImage
colorizeGradient
(ImageGray derivX, ImageGray derivY, double maxAbsValue, BufferedImage output) Renders two gradients on the same image using two sets of colors, on for each input image.static BufferedImage
colorizeSign
(ImageGray src, @Nullable BufferedImage dst, double normalize) Renders a colored image where the color indicates the sign and intensity its magnitude.static BufferedImage
disparity
(ImageGray disparity, @Nullable BufferedImage dst, int disparityRange, int invalidColor) Renders a gray scale image using color values from cold to hot.static BufferedImage
grayMagnitude
(ImageGray src, @Nullable BufferedImage dst, double normalize) Renders a gray scale image of the input image's intensity.
dst(i,j) = 255*abs(src(i,j))/normalizestatic void
grayMagnitudeTemp
(ImageGray src, BufferedImage dst, double normalize) Renders a gray scale image using color values from cold to hot.static BufferedImage
graySign
(GrayF32 src, @Nullable BufferedImage dst, float maxAbsValue) static BufferedImage
grayUnsigned
(GrayI src, BufferedImage dst, int normalize) static BufferedImage
inverseDepth
(GrayF32 src, @Nullable BufferedImage dst, float minValue, float maxValue, int invalidColor) Colorizes an inverse depth image.static BufferedImage
inverseDepth
(GrayF32 src, @Nullable BufferedImage dst, float maxValue, int invalidColor) Colorizes an inverse depth image.static BufferedImage
standard
(ImageGray<?> src, BufferedImage dst)
-
Constructor Details
-
VisualizeImageData
public VisualizeImageData()
-
-
Method Details
-
standard
-
colorizeSign
public static BufferedImage colorizeSign(ImageGray src, @Nullable @Nullable BufferedImage dst, double normalize) Renders a colored image where the color indicates the sign and intensity its magnitude. The input is divided by normalize to render it in the appropriate scale.
- Parameters:
src
- Input single band image.dst
- Where the image is rendered into. If null a new BufferedImage will be created and return.normalize
- Used to normalize the input image. If ≤ 0 then the max value will be used- Returns:
- Rendered image.
-
grayUnsigned
-
grayMagnitude
public static BufferedImage grayMagnitude(ImageGray src, @Nullable @Nullable BufferedImage dst, double normalize) Renders a gray scale image of the input image's intensity.
dst(i,j) = 255*abs(src(i,j))/normalize- Parameters:
src
- Input single band image.dst
- Where the image is rendered into. If null a new BufferedImage will be created and return.normalize
- Used to normalize the input image. If < 0 then this value is automatically computed.- Returns:
- Rendered image.
-
grayMagnitudeTemp
Renders a gray scale image using color values from cold to hot.
- Parameters:
src
- Input single band image.dst
- Where the image is rendered into. If null a new BufferedImage will be created and return.normalize
- Used to normalize the input image.
-
disparity
public static BufferedImage disparity(ImageGray disparity, @Nullable @Nullable BufferedImage dst, int disparityRange, int invalidColor) Renders a gray scale image using color values from cold to hot.
- Parameters:
disparity
- Input disparity imagedst
- Where the image is rendered into. If null a new BufferedImage will be created and return.disparityRange
- Number of possible disparity valuesinvalidColor
- RGB value for invalid pixels. Try 0xFF << 8 for green- Returns:
- Rendered image.
-
inverseDepth
public static BufferedImage inverseDepth(GrayF32 src, @Nullable @Nullable BufferedImage dst, float maxValue, int invalidColor) Colorizes an inverse depth image.- Parameters:
src
- Inverse depth imagedst
- Output renderingmaxValue
- Max possible value. Reminder that larger means closerinvalidColor
- What color to mark pixels with no depth info- Returns:
- rendered image
-
inverseDepth
public static BufferedImage inverseDepth(GrayF32 src, @Nullable @Nullable BufferedImage dst, float minValue, float maxValue, int invalidColor) Colorizes an inverse depth image.- Parameters:
src
- Inverse depth imagedst
- Output renderingminValue
- Minimum possible value. Reminder that larger means closer. If < 0.0f it will auto selectmaxValue
- Max possible value. Reminder that larger means closer. If <= 0.0f it will auto selectinvalidColor
- What color to mark pixels with no depth info- Returns:
- rendered image
-
graySign
public static BufferedImage graySign(GrayF32 src, @Nullable @Nullable BufferedImage dst, float maxAbsValue) -
colorizeGradient
public static BufferedImage colorizeGradient(ImageGray derivX, ImageGray derivY, double maxAbsValue, BufferedImage output) Renders two gradients on the same image using two sets of colors, on for each input image.- Parameters:
derivX
- (Input) Image with positive and negative values.derivY
- (Input) Image with positive and negative values.maxAbsValue
- The largest absolute value of any pixel in the image. Set to < 0 if not known.- Returns:
- visualized gradient
-
colorizeGradient
public static BufferedImage colorizeGradient(GrayS16 derivX, GrayS16 derivY, int maxAbsValue, @Nullable @Nullable BufferedImage output) Renders two gradients on the same image using two sets of colors, on for each input image.- Parameters:
derivX
- (Input) Image with positive and negative values.derivY
- (Input) Image with positive and negative values.maxAbsValue
- The largest absolute value of any pixel in the image. Set to < 0 if not known.- Returns:
- visualized gradient
-
colorizeGradient
public static BufferedImage colorizeGradient(GrayF32 derivX, GrayF32 derivY, float maxAbsValue, @Nullable @Nullable BufferedImage output) Renders two gradients on the same image using two sets of colors, on for each input image.- Parameters:
derivX
- (Input) Image with positive and negative values.derivY
- (Input) Image with positive and negative values.maxAbsValue
- The largest absolute value of any pixel in the image. Set to < 0 if not known.- Returns:
- visualized gradient
-