Package org.jvision.factory
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 Summary
Modifier and TypeMethodDescriptionCreate a new distortion representation based onBrown formalizationwith no distortion.createLensDistortionBrown(double[] coefficients)Create a new Brown based lens distortion with given coefficients.createLensDistortionBrown(double k1, double k2, double k3, double k4, double p1, double p2, double p3, double p4)Create a new distortion representation based onBrown formalizationwith radial coefficients (k1, k2, k3, k4) and tangential coefficients (p1, p2, p3, p4).createLensDistortionBrown(float[] coefficients)Create a new distortion representation based onBrown formalizationwith given coefficients.createLensDistortionBrown(org.jeometry.math.Vector coefficients)Create a new distortion representation based onBrown formalizationwith given coefficients.Create a new distortion representation based onAgisoft Metashape(c) formalizationwith no distortion.
An Agisoft Metashape (c) distortion is made of 2 components: Radial distortion defined by coefficients k1, k2, k3 and k4.createLensDistortionMetashape(double[] coefficients)Create a new distortion representation based onAgisoft Metashape(c) formalizationwith given coefficients.
An Agisoft Metashape (c) distortion is made of 2 components: Radial distortion defined by coefficients k1, k2, k3 and k4.createLensDistortionMetashape(double k1, double k2, double k3, double k4, double p1, double p2)Create a new distortion representation based onAgisoft Metashape(c) formalizationwith given coefficients.
An Agisoft Metashape (c) distortion is made of 2 components: Radial distortion defined by coefficients k1, k2, k3 and k4.createLensDistortionMetashape(float[] coefficients)Create a new distortion representation based onAgisoft Metashape(c) formalizationwith given coefficients.
An Agisoft Metashape (c) distortion is made of 2 components: Radial distortion defined by coefficients k1, k2, k3 and k4.createLensDistortionMetashape(org.jeometry.math.Vector coefficients)Create a new distortion representation based onAgisoft Metashape(c) formalizationwith given coefficients.
An Agisoft Metashape (c) distortion is made of 2 components: Radial distortion defined by coefficients k1, k2, k3 and k4.Create a new distortion representation based onOpenCV formalizationwith no distortion.createLensDistortionOpenCV(double[] coefficients)Create a new distortion representation based onOpenCV formalizationwith given coefficients.
An OpenCV distortion is made of 4 components: Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).createLensDistortionOpenCV(double k1, double k2, double k3, double p1, double p2)Create a new distortion representation based onOpenCV formalizationwith given coefficients.
An OpenCV distortion is made of 4 components: Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).createLensDistortionOpenCV(double k1, double k2, double k3, double k4, double k5, double k6, double p1, double p2)Create a new distortion representation based onOpenCV formalizationwith given coefficients.
An OpenCV distortion is made of 4 components: Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).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 onOpenCV formalizationwith given coefficients.
An OpenCV distortion is made of 4 components: Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).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 onOpenCV formalizationwith given coefficients.
An OpenCV distortion is made of 4 components: Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).createLensDistortionOpenCV(float[] coefficients)Create a new distortion representation based onOpenCV formalizationwith given coefficients.
An OpenCV distortion is made of 4 components: Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).createLensDistortionOpenCV(org.jeometry.math.Vector coefficients)Create a new distortion representation based onOpenCV formalizationwith given coefficients.
An OpenCV distortion is made of 4 components: Radial distortion defined by coefficients k1, k2, k3 (simple) and k4, k5, k6 (rational).
-
Method Details
-
createLensDistortionBrown
LensDistortionBrown createLensDistortionBrown()Create a new distortion representation based onBrown formalizationwith 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 onBrown formalizationwith radial coefficients (k1, k2, k3, k4) and tangential coefficients (p1, p2, p3, p4).- Parameters:
k1- the first radial distortion coefficientk2- the second radial distortion coefficientk3- the third radial distortion coefficientk4- the fourth radial distortion coefficientp1- the first tangential distortion coefficientp2- the second tangential distortion coefficientp3- the third tangential distortion coefficientp4- 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 IllegalArgumentExceptionCreate a new distortion representation based onBrown formalizationwith 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 IllegalArgumentExceptionCreate a new distortion representation based onBrown formalizationwith 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 IllegalArgumentExceptionCreate 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 onOpenCV formalizationwith 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 onOpenCV formalizationwith 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 coefficientk2- the second radial distortion simple coefficientk3- the third radial distortion simple coefficientk4- the first radial distortion rational coefficientk5- the second radial distortion rational coefficientk6- the third radial distortion rational coefficientp1- the first tangential (decentering) distortion coefficientp2- the second tangential (decentering) distortion coefficients1- the first thin prism distortion coefficients2- the second thin prism distortion coefficients3- the third thin prism distortion coefficients4- the fourth thin prism distortion coefficienttx- the x tilt distortion coefficientty- 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 onOpenCV formalizationwith 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.
0(no distortion).- Parameters:
k1- the first radial distortion simple coefficientk2- the second radial distortion simple coefficientk3- the third radial distortion simple coefficientk4- the first radial distortion rational coefficientk5- the second radial distortion rational coefficientk6- the third radial distortion rational coefficientp1- the first tangential (decentering) distortion coefficientp2- the second tangential (decentering) distortion coefficients1- the first thin prism distortion coefficients2- the second thin prism distortion coefficients3- the third thin prism distortion coefficients4- 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 onOpenCV formalizationwith 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.
0(no distortion).- Parameters:
k1- the first radial distortion simple coefficientk2- the second radial distortion simple coefficientk3- the third radial distortion simple coefficientk4- the first radial distortion rational coefficientk5- the second radial distortion rational coefficientk6- the third radial distortion rational coefficientp1- the first tangential (decentering) distortion coefficientp2- 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 onOpenCV formalizationwith 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.
0(no distortion).- Parameters:
k1- the first radial distortion simple coefficientk2- the second radial distortion simple coefficientk3- the third radial distortion simple coefficientp1- the first tangential (decentering) distortion coefficientp2- the second tangential (decentering) distortion coefficient- Returns:
- a new OpenCV lens distortion representation
-
createLensDistortionOpenCV
LensDistortionOpenCV createLensDistortionOpenCV(org.jeometry.math.Vector coefficients) throws IllegalArgumentExceptionCreate a new distortion representation based onOpenCV formalizationwith 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.
- (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 IllegalArgumentExceptionCreate a new distortion representation based onOpenCV formalizationwith 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.
- [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 IllegalArgumentExceptionCreate a new distortion representation based onOpenCV formalizationwith 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.
- [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 onAgisoft Metashape(c) formalizationwith 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 onAgisoft Metashape(c) formalizationwith 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 coefficientk2- the second radial distortion simple coefficientk3- the third radial distortion simple coefficientk4- the fourth radial distortion simple coefficientp1- the first tangential (decentering) distortion coefficientp2- the second tangential (decentering) distortion coefficient- Returns:
- a lens distortion
-
createLensDistortionMetashape
LensDistortionMetashape createLensDistortionMetashape(org.jeometry.math.Vector coefficients) throws IllegalArgumentExceptionCreate a new distortion representation based onAgisoft Metashape(c) formalizationwith 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:
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 IllegalArgumentExceptionCreate a new distortion representation based onAgisoft Metashape(c) formalizationwith 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:
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 IllegalArgumentExceptionCreate a new distortion representation based onAgisoft Metashape(c) formalizationwith 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:
coefficients- the distortion coefficients- Returns:
- a lens distortion
- Throws:
IllegalArgumentException- if the input array does not match a distortion configuration
-