public class Calibration
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
Calibration.Type |
Modifier and Type | Field and Description |
---|---|
protected boolean |
swigCMemOwn |
Modifier | Constructor and Description |
---|---|
|
Calibration() |
|
Calibration(Calibration calibration) |
protected |
Calibration(long cPtr,
boolean cMemoryOwn) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
delete() |
protected void |
finalize() |
double |
getB1()
Affinity.
|
double |
getB2()
Non-orthogonality.
|
protected static long |
getCPtr(Calibration obj) |
double |
getCx()
Principal point X coordinate.
|
double |
getCy()
Principal point Y coordinate.
|
Vector |
getError(Vector point,
Vector proj)
Return projection error.
|
double |
getF()
Focal length.
|
long |
getHeight()
Image height.
|
double |
getK1()
Radial distortion coefficient K1.
|
double |
getK2()
Radial distortion coefficient K2.
|
double |
getK3()
Radial distortion coefficient K3.
|
double |
getK4()
Radial distortion coefficient K4.
|
double |
getP1()
Decentering distortion coefficient P1.
|
double |
getP2()
Decentering distortion coefficiant P2.
|
double |
getP3()
Decentering distortion coefficient P3.
|
double |
getP4()
Decentering distortion coefficiant P4.
|
RPCModel |
getRPCModel()
RPC model.
|
Calibration.Type |
getType()
Camera model.
|
long |
getWidth()
Image width.
|
void |
load(java.lang.String path,
CalibrationFormat format)
Load calibration from file.
|
Vector |
project(Vector point)
Return projected pixel coordinates of the point.
|
void |
save(java.lang.String path,
CalibrationFormat format,
java.lang.String label,
Vector pixel_size,
double focal_length,
double cx,
double cy)
Save calibration to file.
|
void |
setB1(double value)
Affinity.
|
void |
setB2(double value)
Non-orthogonality.
|
void |
setCx(double value)
Principal point X coordinate.
|
void |
setCy(double value)
Principal point Y coordinate.
|
void |
setF(double value)
Focal length.
|
void |
setHeight(long height)
Image height.
|
void |
setK1(double value)
Radial distortion coefficient K1.
|
void |
setK2(double value)
Radial distortion coefficient K2.
|
void |
setK3(double value)
Radial distortion coefficient K3.
|
void |
setK4(double value)
Radial distortion coefficient K4.
|
void |
setP1(double value)
Decentering distortion coefficient P1.
|
void |
setP2(double value)
Decentering distortion coefficiant P2.
|
void |
setP3(double value)
Decentering distortion coefficient P3.
|
void |
setP4(double value)
Decentering distortion coefficiant P4.
|
void |
setRPCModel(RPCModel rpc)
RPC model.
|
void |
setType(Calibration.Type type)
Camera model.
|
void |
setWidth(long width)
Image width.
|
Vector |
unproject(Vector point)
Return direction corresponding to the image point.
|
protected Calibration(long cPtr, boolean cMemoryOwn)
public Calibration()
public Calibration(Calibration calibration)
protected static long getCPtr(Calibration obj)
protected void finalize()
finalize
in class java.lang.Object
public void delete()
public void close()
close
in interface java.lang.AutoCloseable
public Calibration.Type getType()
public long getWidth()
public long getHeight()
public void setType(Calibration.Type type)
public void setWidth(long width)
public void setHeight(long height)
public void setF(double value)
public double getF()
public void setCx(double value)
public double getCx()
public void setCy(double value)
public double getCy()
public void setB1(double value)
public double getB1()
public void setB2(double value)
public double getB2()
public void setK1(double value)
public double getK1()
public void setK2(double value)
public double getK2()
public void setK3(double value)
public double getK3()
public void setK4(double value)
public double getK4()
public void setP1(double value)
public double getP1()
public void setP2(double value)
public double getP2()
public void setP3(double value)
public double getP3()
public void setP4(double value)
public double getP4()
public void setRPCModel(RPCModel rpc)
public RPCModel getRPCModel()
public void save(java.lang.String path, CalibrationFormat format, java.lang.String label, Vector pixel_size, double focal_length, double cx, double cy)
path
- path to calibration file.format
- Calibration format.label
- Calibration label used in Australis, CalibCam and CalCam formats.pixel_size
- Pixel size in mm used to convert normalized calibration coefficients to Australis and CalibCam coefficients.focal_length
- Focal length (Grid calibration format only).cx
- X principal point coordinate (Grid calibration format only).cy
- Y principal point coordinate (Grid calibration format only).public void load(java.lang.String path, CalibrationFormat format)
path
- Path to calibration file.format
- Calibration format.public Vector project(Vector point)
point
- Coordinates of the point to be projected.public Vector unproject(Vector point)
point
- Pixel coordinates of the point.