Package boofcv.core.image
Interface GImageGray
- All Known Implementing Classes:
FactoryGImageGray.Border_F32
,FactoryGImageGray.Border_F64
,FactoryGImageGray.Border_S32
,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 GImageGray
Generalized 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
Modifier and TypeMethodDescriptionget
(int x, int y) float
getF
(int index) int
getImage()
int
getWidth()
boolean
void
set
(int index, float value) Sets pixel based on pixel value in data arrayvoid
Set's pixel value using number.double
unsafe_getD
(int x, int y) get which returns a double, has no bounds checking.float
unsafe_getF
(int x, int y) void
-
Method Details
-
wrap
-
getWidth
int getWidth() -
getHeight
int getHeight() -
isFloatingPoint
boolean isFloatingPoint() -
get
-
set
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
Class getImageType()
-