boofcv.core.image
Interface GImageGray
-
- All Known Implementing Classes:
- FactoryGImageGray.Border_F32, FactoryGImageGray.Border_F64, FactoryGImageGray.Border_I32, FactoryGImageGray.GSingle_F32, FactoryGImageGray.GSingle_F64, FactoryGImageGray.GSingle_I64, FactoryGImageGray.GSingle_S16, FactoryGImageGray.GSingle_S32, FactoryGImageGray.GSingle_S8, FactoryGImageGray.GSingle_U16, FactoryGImageGray.GSingle_U8, FactoryGImageGray.GSingleBase, FactoryGImageGray.GSingleBaseInt, FactoryGImageGray.GSingleBorder, GImageGrayDistorted
public interface GImageGrayGeneralized interface for single banded images. Setters and getters which use Number will be much slower than direct access, about 12x. Setts and getters which use index have a negligible difference to about 25% performance hit depending if the data types need to be converted or not.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.Numberget(int x, int y)floatgetF(int index)intgetHeight()ImageGraygetImage()java.lang.ClassgetImageType()intgetWidth()booleanisFloatingPoint()voidset(int index, float value)Sets pixel based on pixel value in data arrayvoidset(int x, int y, java.lang.Number num)Set's pixel value using number.doubleunsafe_getD(int x, int y)get which returns a double, has no bounds checking.floatunsafe_getF(int x, int y)voidwrap(ImageGray image)
-
-
-
Method Detail
-
wrap
void wrap(ImageGray image)
-
getWidth
int getWidth()
-
getHeight
int getHeight()
-
isFloatingPoint
boolean isFloatingPoint()
-
get
java.lang.Number get(int x, int y)
-
set
void set(int x, int y, java.lang.Number num)Set's pixel value using number. If native type of 'num' and image are the same then there is no loss in precision.- Parameters:
x- pixel coordinate x-valuey- pixel coordinate y-valuenum- Value of the pixel
-
unsafe_getD
double unsafe_getD(int x, int y)get which returns a double, has no bounds checking. Still slow, but faster than the super generic get. Also doesn't create memory on each get
-
unsafe_getF
float unsafe_getF(int x, int y)
-
set
void set(int index, float value)Sets pixel based on pixel value in data array
-
getF
float getF(int index)
-
getImage
ImageGray getImage()
-
getImageType
java.lang.Class getImageType()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG