Interface CameraBuilder


public interface CameraBuilder
An interface that describe a builder for camera related classes. Classes that implements this interface are able to produce implementation classes such as DigitalCamera, LensDistortion, ...
Since:
1.0.0
Version:
"1.0.0" b202104211400L
Author:
Julien Seinturier - JOrigin - contact@jorigin.org - https://github.com/jorigin/jvision
  • Method Details

    • createLensDistortionBrown

      LensDistortionBrown createLensDistortionBrown()
      Create a new distortion representation based on Brown formalization with no distortion.
      Returns:
      the lens distortion
    • createLensDistortionBrown

      LensDistortionBrown createLensDistortionBrown(double k1, double k2, double k3, double k4, double p1, double p2, double p3, double p4)
      Create a new distortion representation based on Brown formalization with radial coefficients (k1, k2, k3, k4) and tangential coefficients (p1, p2, p3, p4).
      Parameters:
      k1 - the first radial distortion coefficient
      k2 - the second radial distortion coefficient
      k3 - the third radial distortion coefficient
      k4 - the fourth radial distortion coefficient
      p1 - the first tangential distortion coefficient
      p2 - the second tangential distortion coefficient
      p3 - the third tangential distortion coefficient
      p4 - the fourth tangential distortion coefficient
      Returns:
      a new Brown based lens distortion with radial coefficients (k1, k2, k3, k4) and tangential (decentering) coefficients (p1, p2, p3, p4)
    • createLensDistortionBrown

      LensDistortionBrown createLensDistortionBrown(org.jeometry.math.Vector coefficients) throws IllegalArgumentException
      Create a new distortion representation based on Brown formalization with given coefficients. Possible values are:
      • (k1, k2, k3, k4, p1, p2, p3, p4) (8 dimensions)
      • (k1, k2, k3, p1, p2) (5 dimensions)
      • (k1, k2, k3) (3 dimensions)
      • null or empty vector for no distortion
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a new Brown lens distortion representation
      Throws:
      IllegalArgumentException - if the input vector does not match a distortion configuration
    • createLensDistortionBrown

      LensDistortionBrown createLensDistortionBrown(float[] coefficients) throws IllegalArgumentException
      Create a new distortion representation based on Brown formalization with given coefficients. Possible values are:
      • [k1, k2, k3, k4, p1, p2, p3, p4] (8 values)
      • [k1, k2, k3, p1, p2] (5 values)
      • [k1, k2, k3] (3 values)
      • null or empty array for no distortion
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a new Brown lens distortion representation
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration
    • createLensDistortionBrown

      LensDistortionBrown createLensDistortionBrown(double[] coefficients) throws IllegalArgumentException
      Create a new Brown based lens distortion with given coefficients. Possible values are:
      • [k1, k2, k3, k4, p1, p2, p3, p4] (8 values)
      • [k1, k2, k3, p1, p2] (5 values)
      • [k1, k2, k3] (3 values)
      • null or empty array for no distortion
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a new Brown lens distortion representation
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV()
      Create a new distortion representation based on OpenCV formalization with no distortion.
      Returns:
      the lens distortion
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV(double k1, double k2, double k3, double k4, double k5, double k6, double p1, double p2, double s1, double s2, double s3, double s4, double tx, double ty)
      Create a new distortion representation based on OpenCV formalization with given coefficients.

      An OpenCV distortion is made of 4 components:
      • Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      • Thin prism distortion defined by coefficients s1, s2, s3 and s4
      • Tilt distortion defined by coefficients τx and τy.
      Parameters:
      k1 - the first radial distortion simple coefficient
      k2 - the second radial distortion simple coefficient
      k3 - the third radial distortion simple coefficient
      k4 - the first radial distortion rational coefficient
      k5 - the second radial distortion rational coefficient
      k6 - the third radial distortion rational coefficient
      p1 - the first tangential (decentering) distortion coefficient
      p2 - the second tangential (decentering) distortion coefficient
      s1 - the first thin prism distortion coefficient
      s2 - the second thin prism distortion coefficient
      s3 - the third thin prism distortion coefficient
      s4 - the fourth thin prism distortion coefficient
      tx - the x tilt distortion coefficient
      ty - the y tilt distortion coefficient
      Returns:
      a new OpenCV lens distortion representation
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV(double k1, double k2, double k3, double k4, double k5, double k6, double p1, double p2, double s1, double s2, double s3, double s4)
      Create a new distortion representation based on OpenCV formalization with given coefficients.

      An OpenCV distortion is made of 4 components:
      • Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      • Thin prism distortion defined by coefficients s1, s2, s3 and s4
      • Tilt distortion defined by coefficients τx and τy.
      With this creation method, the tilt distortion coefficients are set to 0 (no distortion).
      Parameters:
      k1 - the first radial distortion simple coefficient
      k2 - the second radial distortion simple coefficient
      k3 - the third radial distortion simple coefficient
      k4 - the first radial distortion rational coefficient
      k5 - the second radial distortion rational coefficient
      k6 - the third radial distortion rational coefficient
      p1 - the first tangential (decentering) distortion coefficient
      p2 - the second tangential (decentering) distortion coefficient
      s1 - the first thin prism distortion coefficient
      s2 - the second thin prism distortion coefficient
      s3 - the third thin prism distortion coefficient
      s4 - the fourth thin prism distortion coefficient
      Returns:
      a new OpenCV lens distortion representation
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV(double k1, double k2, double k3, double k4, double k5, double k6, double p1, double p2)
      Create a new distortion representation based on OpenCV formalization with given coefficients.

      An OpenCV distortion is made of 4 components:
      • Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      • Thin prism distortion defined by coefficients s1, s2, s3 and s4
      • Tilt distortion defined by coefficients τx and τy.
      With this creation method, the thin prism and tilt distortions coefficients are set to 0 (no distortion).
      Parameters:
      k1 - the first radial distortion simple coefficient
      k2 - the second radial distortion simple coefficient
      k3 - the third radial distortion simple coefficient
      k4 - the first radial distortion rational coefficient
      k5 - the second radial distortion rational coefficient
      k6 - the third radial distortion rational coefficient
      p1 - the first tangential (decentering) distortion coefficient
      p2 - the second tangential (decentering) distortion coefficient
      Returns:
      a new OpenCV lens distortion representation
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV(double k1, double k2, double k3, double p1, double p2)
      Create a new distortion representation based on OpenCV formalization with given coefficients.

      An OpenCV distortion is made of 4 components:
      • Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      • Thin prism distortion defined by coefficients s1, s2, s3 and s4
      • Tilt distortion defined by coefficients τx and τy.
      With this creation method, the radial rational, thin prism and tilt distortions coefficients are set to 0 (no distortion).
      Parameters:
      k1 - the first radial distortion simple coefficient
      k2 - the second radial distortion simple coefficient
      k3 - the third radial distortion simple coefficient
      p1 - the first tangential (decentering) distortion coefficient
      p2 - the second tangential (decentering) distortion coefficient
      Returns:
      a new OpenCV lens distortion representation
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV(org.jeometry.math.Vector coefficients) throws IllegalArgumentException
      Create a new distortion representation based on OpenCV formalization with given coefficients.

      An OpenCV distortion is made of 4 components:
      • Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      • Thin prism distortion defined by coefficients s1, s2, s3 and s4
      • Tilt distortion defined by coefficients τx and τy.
      Accepted vectors are:
      • (k1, k2 , p1, p2, k3, k4, k5, k6, s1, s2, s3, s4, τx, τy) (14 dimensions)
      • (k1, k2 , p1, p2, k3, k4, k5, k6, s1, s2, s3, s4) (12 dimensions)
      • (k1, k2 , p1, p2, k3, k4, k5, k6) (8 dimensions)
      • (k1, k2 , p1, p2, k3) (5 dimensions)
      • (k1, k2 , p1, p2) (4 dimensions)
      • null or empty vector for no distortion
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a new OpenCV lens distortion representation
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV(float[] coefficients) throws IllegalArgumentException
      Create a new distortion representation based on OpenCV formalization with given coefficients.

      An OpenCV distortion is made of 4 components:
      • Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      • Thin prism distortion defined by coefficients s1, s2, s3 and s4
      • Tilt distortion defined by coefficients τx and τy.
      Accepted arrays are:
      • [k1, k2 , p1, p2, k3, k4, k5, k6, s1, s2, s3, s4, τx, τy] (length 14)
      • [k1, k2 , p1, p2, k3, k4, k5, k6, s1, s2, s3, s4] (length 12)
      • [k1, k2 , p1, p2, k3, k4, k5, k6] (length 8)
      • [k1, k2 , p1, p2, k3] (length 5)
      • [k1, k2 , p1, p2] (length 4)
      • null or empty array for no distortion
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a new OpenCV lens distortion representation
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration
    • createLensDistortionOpenCV

      LensDistortionOpenCV createLensDistortionOpenCV(double[] coefficients) throws IllegalArgumentException
      Create a new distortion representation based on OpenCV formalization with given coefficients.

      An OpenCV distortion is made of 4 components:
      • Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      • Thin prism distortion defined by coefficients s1, s2, s3 and s4
      • Tilt distortion defined by coefficients τx and τy.
      Accepted arrays are:
      • [k1, k2 , p1, p2, k3, k4, k5, k6, s1, s2, s3, s4, τx, τy] (length 14)
      • [k1, k2 , p1, p2, k3, k4, k5, k6, s1, s2, s3, s4] (length 12)
      • [k1, k2 , p1, p2, k3, k4, k5, k6] (length 8)
      • [k1, k2 , p1, p2, k3] (length 5)
      • [k1, k2 , p1, p2] (length 4)
      • null or empty array for no distortion
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a new OpenCV lens distortion representation
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration
    • createLensDistortionMetashape

      LensDistortionMetashape createLensDistortionMetashape()
      Create a new distortion representation based on Agisoft Metashape(c) formalization with no distortion.

      An Agisoft Metashape (c) distortion is made of 2 components:
      • Radial distortion defined by coefficients k1, k2, k3 and k4.
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      Returns:
      the lens distortion
    • createLensDistortionMetashape

      LensDistortionMetashape createLensDistortionMetashape(double k1, double k2, double k3, double k4, double p1, double p2)
      Create a new distortion representation based on Agisoft Metashape(c) formalization with given coefficients.

      An Agisoft Metashape (c) distortion is made of 2 components:
      • Radial distortion defined by coefficients k1, k2, k3 and k4.
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      Parameters:
      k1 - the first radial distortion simple coefficient
      k2 - the second radial distortion simple coefficient
      k3 - the third radial distortion simple coefficient
      k4 - the fourth radial distortion simple coefficient
      p1 - the first tangential (decentering) distortion coefficient
      p2 - the second tangential (decentering) distortion coefficient
      Returns:
      a lens distortion
    • createLensDistortionMetashape

      LensDistortionMetashape createLensDistortionMetashape(org.jeometry.math.Vector coefficients) throws IllegalArgumentException
      Create a new distortion representation based on Agisoft Metashape(c) formalization with given coefficients.

      An Agisoft Metashape (c) distortion is made of 2 components:
      • Radial distortion defined by coefficients k1, k2, k3 and k4.
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      Accepted vector is (k1, k2, k3, k4, p1, p2) (6 dimensions).
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a lens distortion
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration
    • createLensDistortionMetashape

      LensDistortionMetashape createLensDistortionMetashape(float[] coefficients) throws IllegalArgumentException
      Create a new distortion representation based on Agisoft Metashape(c) formalization with given coefficients.

      An Agisoft Metashape (c) distortion is made of 2 components:
      • Radial distortion defined by coefficients k1, k2, k3 and k4.
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      Accepted array is [k1, k2, k3, k4, p1, p2] (length 6).
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a lens distortion
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration
    • createLensDistortionMetashape

      LensDistortionMetashape createLensDistortionMetashape(double[] coefficients) throws IllegalArgumentException
      Create a new distortion representation based on Agisoft Metashape(c) formalization with given coefficients.

      An Agisoft Metashape (c) distortion is made of 2 components:
      • Radial distortion defined by coefficients k1, k2, k3 and k4.
      • Tangential (decentering) distortion defined by coefficients p1 and p2.
      Accepted array is [k1, k2, k3, k4, p1, p2] (length 6).
      Parameters:
      coefficients - the distortion coefficients
      Returns:
      a lens distortion
      Throws:
      IllegalArgumentException - if the input array does not match a distortion configuration