Package boofcv.struct.image
Class GrayF32
- All Implemented Interfaces:
Serializable
,Cloneable
Image with a pixel type of 32-bit float.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class boofcv.struct.image.ImageBase
ImageBase.PixelXY
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
_getData()
Returns the data array the image is stored in.void
Sets the image's internal data array.void
Copies the column into the array.createNew
(int imgWidth, int imgHeight) Returns a new image.void
forEachPixel
(GrayF32.EachPixel function) Passes in the coordinate and value of each pixel in the image.float
get
(int x, int y) Returns the value of the specified pixel.float[]
getData()
Returns image type informationvoid
print()
Prints the image to standard outvoid
void
printInt()
void
set
(int x, int y, float value) Sets the value of the specified pixel.void
setData
(float[] data) float
unsafe_get
(int x, int y) void
unsafe_set
(int x, int y, float value) Methods inherited from class boofcv.struct.image.ImageGray
copyRow, create, createSameShape, initialize, reshape, reshape, setTo, subimage
Methods inherited from class boofcv.struct.image.ImageBase
clone, createSameShape, forEachXY, getImageType, getIndex, indexToPixelX, indexToPixelY, isInBounds, isSameShape, isSubimage, reshapeTo, subimage, totalPixels
-
Field Details
-
data
public float[] data
-
-
Constructor Details
-
GrayF32
public GrayF32(int width, int height) Creates a new gray scale (single band/color) image.- Parameters:
width
- number of columns in the image.height
- number of rows in the image.
-
GrayF32
public GrayF32()Creates an image with no data declared and the width/height set to zero.
-
-
Method Details
-
get
public float get(int x, int y) Returns the value of the specified pixel.- Parameters:
x
- pixel coordinate.y
- pixel coordinate.- Returns:
- Pixel intensity value.
-
unsafe_get
public float unsafe_get(int x, int y) -
set
public void set(int x, int y, float value) Sets the value of the specified pixel.- Parameters:
x
- pixel coordinate.y
- pixel coordinate.value
- The pixel's new value.
-
unsafe_set
public void unsafe_set(int x, int y, float value) -
forEachPixel
Passes in the coordinate and value of each pixel in the image.- Parameters:
function
- (Input) The function
-
print
public void print()Description copied from class:ImageGray
Prints the image to standard out -
print
-
printInt
public void printInt() -
_getData
Description copied from class:ImageGray
Returns the data array the image is stored in. -
_setData
Description copied from class:ImageGray
Sets the image's internal data array. -
createNew
Description copied from class:ImageBase
Returns a new image. If either width or height are set to -1 then none of the class parameters set. Otherwise a new image is created with the specified dimensions which has all other parameters the same as the original matrix. -
copyCol
Description copied from class:ImageBase
Copies the column into the array. -
getDataType
Description copied from class:ImageGray
Returns image type information- Overrides:
getDataType
in classGrayF<GrayF32>
- Returns:
- The type of image.
-
getData
public float[] getData() -
setData
public void setData(float[] data)
-