Package boofcv.struct.image
Class InterleavedU8
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable
An image where the primitive type is an unsigned byte.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class boofcv.struct.image.InterleavedInteger
InterleavedInteger.EachPixelNested classes/interfaces inherited from class boofcv.struct.image.ImageBase
ImageBase.PixelXY -
Field Summary
Fields inherited from class boofcv.struct.image.InterleavedI8
dataFields inherited from class boofcv.struct.image.ImageInterleaved
numBands -
Constructor Summary
ConstructorsConstructorDescriptionInterleavedU8(int width, int height, int numBands) Creates a new image with an arbitrary number of bands/colors. -
Method Summary
Modifier and TypeMethodDescriptioncreateNew(int imgWidth, int imgHeight) Returns a new image.voidforEachPixel24(InterleavedU8.EachPixelInt function) For a 3-band image, it passes in the value of each pixel by putting it into an int.intget24(int x, int y) Returns an integer formed from 3 bands.intget32(int x, int y) Returns an integer formed from 4 bands.protected intgetArrayValue(int index) intgetBand(int x, int y, int band) Returns the value of the specified band in the specified pixel.Returns image type informationvoidset24(int x, int y, int value) voidset32(int x, int y, int value) voidunsafe_get(int x, int y, int[] storage) Methods inherited from class boofcv.struct.image.InterleavedI8
_getData, _setData, copyCol, get, getPrimitiveDataType, set, setBand, setBand, toString_element, unsafe_setMethods inherited from class boofcv.struct.image.InterleavedInteger
forEachPixel, get, setMethods inherited from class boofcv.struct.image.ImageInterleaved
copyRow, create, createSameShape, getIndex, getIndex, getNumBands, reshape, reshape, setNumberOfBands, setTo, subimage, toStringMethods inherited from class boofcv.struct.image.ImageMultiBand
reshapeToMethods inherited from class boofcv.struct.image.ImageBase
clone, createSameShape, forEachXY, getImageType, indexToPixelX, indexToPixelY, isInBounds, isSameShape, isSubimage, subimage, totalPixels
-
Constructor Details
-
InterleavedU8
public InterleavedU8(int width, int height, int numBands) Creates a new image with an arbitrary number of bands/colors.- Parameters:
width- number of columns in the image.height- number of rows in the image.numBands- number of bands/colors in the image.
-
InterleavedU8
public InterleavedU8()
-
-
Method Details
-
getDataType
Description copied from class:ImageInterleavedReturns image type information- Overrides:
getDataTypein classInterleavedI8<InterleavedU8>- Returns:
- The type of image.
-
get32
public int get32(int x, int y) Returns an integer formed from 4 bands. a[i]<<24 | a[i+1] << 16 | a[i+2]<<8 | a[3]- Parameters:
x- columny- row- Returns:
- 32 bit integer
-
get24
public int get24(int x, int y) Returns an integer formed from 3 bands. a[i] << 16 | a[i+1]<<8 | a[i+2]- Parameters:
x- columny- row- Returns:
- 32 bit integer
-
set24
public void set24(int x, int y, int value) -
set32
public void set32(int x, int y, int value) -
getArrayValue
protected int getArrayValue(int index) - Specified by:
getArrayValuein classInterleavedInteger<InterleavedU8>
-
getBand
public int getBand(int x, int y, int band) Returns the value of the specified band in the specified pixel.- Specified by:
getBandin classInterleavedInteger<InterleavedU8>- Parameters:
x- pixel coordinate.y- pixel coordinate.band- which color band in the pixel- Returns:
- an intensity value.
-
unsafe_get
public void unsafe_get(int x, int y, int[] storage) - Specified by:
unsafe_getin classInterleavedInteger<InterleavedU8>
-
createNew
Description copied from class:ImageBaseReturns 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.- Specified by:
createNewin classImageBase<InterleavedU8>- Parameters:
imgWidth- Width of the new imageimgHeight- height of the new image- Returns:
- new image
-
forEachPixel24
For a 3-band image, it passes in the value of each pixel by putting it into an int.- Parameters:
function- (Input) The function- See Also:
-