public class YarpImageHelper
extends java.lang.Object
Constructor and Description |
---|
YarpImageHelper(int h,
int w)
Constructor, specify height and width of the image you are going to
convert.
|
Modifier and Type | Method and Description |
---|---|
float[][] |
get2DMatrix(ImageFloat img)
Converts a floating point YARP image to a two dimensional array.
|
short[][] |
get2DMatrix(ImageRgb img)
Converts a color YARP image to a two dimensional array.
|
float[][] |
get2DMatrixBlue(ImageRgbFloat img)
Access a floating point YARP image by planes.
|
float[][] |
get2DMatrixGreen(ImageRgbFloat img)
Access a floating point YARP image by planes.
|
float[][] |
get2DMatrixRed(ImageRgbFloat img)
Access a floating point YARP image by planes.
|
short[][][] |
get3DMatrix(ImageRgb img)
Converts a YARP image to a 3D array.
|
short[][] |
getB(ImageRgb img)
Access a YARP image by planes.
|
short[][] |
getG(ImageRgb img)
Access a YARP image by planes.
|
short[][] |
getMonoMatrix(ImageRgb img)
Converts a YARP image to grayscale.
|
short[][] |
getR(ImageRgb img)
Access a YARP image by planes.
|
static short[] |
getRawImg(ImageRgb img)
Fast conversion of a YARP image to a one dimensional array.
|
ImageRgb |
setRawImg(short[] vec1ds,
int height,
int width,
int pixelSize)
Fast conversion from matlab image format (based on leo's structure) to a YARP image format
in MATLAB, the reshape function to modify the matrix to be a 1d vector IN = reshape(label, [h*w*pixelSize 1]);
and, if not previously done cast it to int16 eg: tempImg = cast(IN,'int16');
\author Vadim Tikhanoff
|
public YarpImageHelper(int h, int w)
h
- image heightw
- image widthpublic short[][] getMonoMatrix(ImageRgb img)
img
- input imagepublic short[][][] get3DMatrix(ImageRgb img)
img
- input imagepublic short[][] getR(ImageRgb img)
img
- input imagepublic short[][] getG(ImageRgb img)
img
- input imagepublic short[][] getB(ImageRgb img)
img
- input imagepublic short[][] get2DMatrix(ImageRgb img)
img
- input imagepublic float[][] get2DMatrix(ImageFloat img)
img
- input imagepublic float[][] get2DMatrixRed(ImageRgbFloat img)
img
- input imagepublic float[][] get2DMatrixGreen(ImageRgbFloat img)
img
- input imagepublic float[][] get2DMatrixBlue(ImageRgbFloat img)
img
- input imagepublic static short[] getRawImg(ImageRgb img)
img
- input imagepublic ImageRgb setRawImg(short[] vec1ds, int height, int width, int pixelSize)