Package org.jvision.sensor.camera
Interface DigitalCameraSensor
- All Superinterfaces:
Sensor
A digital camera
sensor. Such a sensor is made of a rectangular frame that can produce digital images.- Version:
- "1.0.0" b202104211400L
- Author:
- Julien Seinturier - JOrigin - contact@jorigin.org - https://github.com/jorigin/jvision
-
Method Summary
Modifier and TypeMethodDescriptionfloatGet the height in millimeters (mm) of the sensor frame.floatGet the width in millimeters (mm) of the sensor frame.intGet the height in pixels (px) of the images produced by the sensor.intGet the width in pixels (px) of the images produced by the sensor.floatGet the height in microns (μm) of an image pixel (ie the height of the cell on the sensor frame that represents a pixel).floatGet the width in microns (μm) of an image pixel (ie the width of the cell on the sensor frame that represents a pixel).org.jeometry.geom2D.point.Point2DpointFrameToImage(org.jeometry.geom2D.point.Point2D point)Get the coordinate of the given point on the camera sensor frame (in millimeters) on an image (in pixels).
This method do not take in account any correction (distortion, principal point offset, ...).org.jeometry.geom2D.point.Point2DpointImageToFrame(org.jeometry.geom2D.point.Point2D pixel)Get the coordinate of the given image point (in pixel) on the camera sensor frame (in millimeters).
This method do not take in account any correction (distortion, principal point offset, ...).voidsetSensorSize(float frameWidth, float frameHeight, float pixelWidth, float pixelHeight)Set the sensor frame and pixel sizes.voidsetSensorSize(float frameWidth, float frameHeight, int imageWidth, int imageHeight)Set the sensor image and frame sizes.voidsetSensorSize(float frameWidth, float frameHeight, int imageWidth, int imageHeight, float pixelWidth, float pixelHeight)Set the sensor frame, image and pixel sizes.voidsetSensorSize(int imageWidth, int imageHeight, float pixelWidth, float pixelHeight)Set the sensor image and pixel sizes.Methods inherited from interface org.jvision.sensor.Sensor
getIdentifier, getSensorManufacturer, getSensorModel, getSensorSerialNumber, getSensorType, setIdentifier, setSensorManufacturer, setSensorModel, setSensorSerialNumber, setSensorType
-
Method Details
-
getFrameWidth
float getFrameWidth()Get the width in millimeters (mm) of the sensor frame.- Returns:
- the width in millimeters (mm) of the sensor frame.
- See Also:
getFrameHeight()
-
getFrameHeight
float getFrameHeight()Get the height in millimeters (mm) of the sensor frame.- Returns:
- the height in millimeters (mm) of the sensor frame.
- See Also:
getFrameWidth()
-
getImageWidth
int getImageWidth()Get the width in pixels (px) of the images produced by the sensor.- Returns:
- the width in pixels (px) of the images produced by the sensor.
- See Also:
getImageHeight()
-
getImageHeight
int getImageHeight()Get the height in pixels (px) of the images produced by the sensor.- Returns:
- the height in pixels (px) of the images produced by the sensor.
- See Also:
getImageWidth()
-
getPixelWidth
float getPixelWidth()Get the width in microns (μm) of an image pixel (ie the width of the cell on the sensor frame that represents a pixel).- Returns:
- the width in microns (μm) of an image pixel (ie the width of the cell on the sensor frame that represents a pixel).
- See Also:
getPixelHeight()
-
getPixelHeight
float getPixelHeight()Get the height in microns (μm) of an image pixel (ie the height of the cell on the sensor frame that represents a pixel).- Returns:
- the height in microns (μm) of an image pixel (ie the height of the cell on the sensor frame that represents a pixel).
- See Also:
getPixelWidth()
-
setSensorSize
void setSensorSize(float frameWidth, float frameHeight, int imageWidth, int imageHeight)Set the sensor image and frame sizes. The pixel size is computed from the input values.- Parameters:
frameWidth- the width in millimeters (mm) of the sensor frame.frameHeight- the width in millimeters (mm) of the sensor height.imageWidth- the width in pixels (px) of the images produced by the sensor.imageHeight- the height in pixels (px) of the images produced by the sensor.- See Also:
setSensorSize(float, float, float, float),setSensorSize(int, int, float, float)
-
setSensorSize
void setSensorSize(float frameWidth, float frameHeight, float pixelWidth, float pixelHeight)Set the sensor frame and pixel sizes. The image size is computed from the input values.- Parameters:
frameWidth- the width in microns (μm) of the sensor frame.frameHeight- the width in microns (μm) of the sensor height.pixelWidth- the width in microns (μm) of an image pixel (ie the width of the cell on the sensor frame that represents a pixel).pixelHeight- the height in microns (μm) of an image pixel (ie the height of the cell on the sensor frame that represents a pixel).- See Also:
setSensorSize(float, float, int, int),setSensorSize(int, int, float, float)
-
setSensorSize
void setSensorSize(int imageWidth, int imageHeight, float pixelWidth, float pixelHeight)Set the sensor image and pixel sizes. The frame size is computed from the input values.- Parameters:
imageWidth- the width in pixels (px) of the images produced by the sensor.imageHeight- the height in pixels (px) of the images produced by the sensor.pixelWidth- the width in microns (μm) of an image pixel (ie the width of the cell on the sensor frame that represents a pixel).pixelHeight- the height in microns (μm) of an image pixel (ie the height of the cell on the sensor frame that represents a pixel).- See Also:
setSensorSize(float, float, int, int),setSensorSize(float, float, float, float)
-
setSensorSize
void setSensorSize(float frameWidth, float frameHeight, int imageWidth, int imageHeight, float pixelWidth, float pixelHeight)Set the sensor frame, image and pixel sizes. The frame size is computed from the input values.- Parameters:
frameWidth- the width in millimeters (mm) of the sensor frame.frameHeight- the width in millimeters (mm) of the sensor height.imageWidth- the width in pixels (px) of the images produced by the sensor.imageHeight- the height in pixels (px) of the images produced by the sensor.pixelWidth- the width in microns (μm) of an image pixel (ie the width of the cell on the sensor frame that represents a pixel).pixelHeight- the height in microns (μm) of an image pixel (ie the height of the cell on the sensor frame that represents a pixel).
-
pointImageToFrame
org.jeometry.geom2D.point.Point2D pointImageToFrame(org.jeometry.geom2D.point.Point2D pixel)Get the coordinate of the given image point (in pixel) on the camera sensor frame (in millimeters).
This method do not take in account any correction (distortion, principal point offset, ...).- Parameters:
pixel- coordinates in pixel (px) of the point.- Returns:
- the coordinates in millimeters (mm) of the given point on the camera sensor frame.
- See Also:
pointFrameToImage(Point2D)
-
pointFrameToImage
org.jeometry.geom2D.point.Point2D pointFrameToImage(org.jeometry.geom2D.point.Point2D point)Get the coordinate of the given point on the camera sensor frame (in millimeters) on an image (in pixels).
This method do not take in account any correction (distortion, principal point offset, ...).- Parameters:
point- the coordinates in millimeters (mm) of the given point on the camera sensor frame.- Returns:
- the coordinates in pixel (px) of the point on an image produces by the camera.
-