Class SimpleDigitalCamera

java.lang.Object
org.jvision.camera.SimpleDigitalCamera
All Implemented Interfaces:
org.jorigin.identification.Identified, org.jorigin.identification.Named, org.jorigin.property.HandleUserProperties, DigitalCamera

public class SimpleDigitalCamera extends Object implements DigitalCamera
Default implementation of a DigitalCamera. For a complete description of the digital camera model, please refers to DigitialCamera interface documentation.
Since:
1.0.0
Version:
"1.0.0" b202104211400L
Author:
Julien Seinturier - JOrigin - contact@jorigin.org - https://github.com/jorigin/jvision
  • Constructor Details

    • SimpleDigitalCamera

      public SimpleDigitalCamera(DigitalCameraSensor sensor, float focalLength, org.jeometry.geom2D.point.Point2D principalPointOffset, double affinity, double skew, LensDistortion distortion)
      Create a new digital camera with given parameters.
      Parameters:
      sensor - the camera sensor
      focalLength - the focal length in pixels (px) of the camera
      principalPointOffset - the offset of the principal point of the camera
      affinity - the the differential scaling between the horizontal and vertical pixel spacings
      skew - the non-orthogonality (skew coefficient)
      distortion - the lens distortion that affect the camera
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.jorigin.identification.Named
    • setName

      public void setName(String name)
      Specified by:
      setName in interface org.jorigin.identification.Named
    • getIdentification

      public int getIdentification()
      Specified by:
      getIdentification in interface org.jorigin.identification.Identified
    • setIdentification

      public void setIdentification(int indentifier)
      Specified by:
      setIdentification in interface org.jorigin.identification.Identified
    • getUserProperty

      public Object getUserProperty(String propertyName)
      Specified by:
      getUserProperty in interface org.jorigin.property.HandleUserProperties
    • setUserProperty

      public Object setUserProperty(String name, Object value)
      Specified by:
      setUserProperty in interface org.jorigin.property.HandleUserProperties
    • getUserPropertyNames

      public List<String> getUserPropertyNames()
      Specified by:
      getUserPropertyNames in interface org.jorigin.property.HandleUserProperties
    • clearUserProperties

      public void clearUserProperties()
      Specified by:
      clearUserProperties in interface org.jorigin.property.HandleUserProperties
    • getCameraModel

      public String getCameraModel()
      Specified by:
      getCameraModel in interface DigitalCamera
    • setCameraModel

      public void setCameraModel(String model)
      Specified by:
      setCameraModel in interface DigitalCamera
    • getCameraManufacturer

      public String getCameraManufacturer()
      Specified by:
      getCameraManufacturer in interface DigitalCamera
    • setCameraManufacturer

      public void setCameraManufacturer(String manufacturer)
      Specified by:
      setCameraManufacturer in interface DigitalCamera
    • getCameraSerialNumber

      public String getCameraSerialNumber()
      Specified by:
      getCameraSerialNumber in interface DigitalCamera
    • setCameraSerialNumber

      public void setCameraSerialNumber(String serial)
      Specified by:
      setCameraSerialNumber in interface DigitalCamera
    • getFocalLenth

      public float getFocalLenth()
      Specified by:
      getFocalLenth in interface DigitalCamera
    • setFocalLength

      public void setFocalLength(float focal)
      Specified by:
      setFocalLength in interface DigitalCamera
    • getFocalLengthMetric

      public double getFocalLengthMetric()
      Specified by:
      getFocalLengthMetric in interface DigitalCamera
    • getPrincipalPointOffset

      public org.jeometry.geom2D.point.Point2D getPrincipalPointOffset()
      Specified by:
      getPrincipalPointOffset in interface DigitalCamera
    • setPrincipalPointOffset

      public void setPrincipalPointOffset(org.jeometry.geom2D.point.Point2D point)
      Specified by:
      setPrincipalPointOffset in interface DigitalCamera
    • getLensDistortion

      public LensDistortion getLensDistortion()
      Specified by:
      getLensDistortion in interface DigitalCamera
    • setLensDistortion

      public void setLensDistortion(LensDistortion distortion)
      Specified by:
      setLensDistortion in interface DigitalCamera
    • getAffinity

      public double getAffinity()
      Specified by:
      getAffinity in interface DigitalCamera
    • setAffinity

      public void setAffinity(double affinity)
      Specified by:
      setAffinity in interface DigitalCamera
    • getSkew

      public double getSkew()
      Specified by:
      getSkew in interface DigitalCamera
    • setSkew

      public void setSkew(double skew)
      Specified by:
      setSkew in interface DigitalCamera
    • pointImageToCamera

      public org.jeometry.geom2D.point.Point2D pointImageToCamera(org.jeometry.geom2D.point.Point2D pixel, boolean compenseDeformation)
      Specified by:
      pointImageToCamera in interface DigitalCamera
    • pointCameraToImage

      public org.jeometry.geom2D.point.Point2D pointCameraToImage(org.jeometry.geom2D.point.Point2D camera, boolean applyDeformation)
      Specified by:
      pointCameraToImage in interface DigitalCamera
    • distort

      public org.jeometry.geom2D.point.Point2D distort(org.jeometry.geom2D.point.Point2D point, boolean ppOffsetCorrection)
      Specified by:
      distort in interface DigitalCamera
    • undistort

      public org.jeometry.geom2D.point.Point2D undistort(org.jeometry.geom2D.point.Point2D point, boolean ppOffsetCorrection)
      Specified by:
      undistort in interface DigitalCamera
    • checkCamera

      public void checkCamera()
      Check and update camera internal data. This method is called when a camera parameter is changed. If some parameter is not consistent (null or 0 image size, frame size, 0 or less focal length...), an IllegalArgumentException is raised.
    • getCameraSensor

      public DigitalCameraSensor getCameraSensor()
      Specified by:
      getCameraSensor in interface DigitalCamera
    • setCameraSensor

      public void setCameraSensor(DigitalCameraSensor sensor)
      Specified by:
      setCameraSensor in interface DigitalCamera