public class NyARParam
extends java.lang.Object
コンストラクタと説明 |
---|
NyARParam(NyARIntSize i_screen_size,
NyARPerspectiveProjectionMatrix i_projection_mat,
INyARCameraDistortionFactor i_dist_factor) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
changeScreenSize(int i_xsize,
int i_ysize)
この関数は、現在のスクリーンサイズを変更します。
|
void |
changeScreenSize(NyARIntSize i_s)
この関数は、現在のスクリーンサイズを変更します。
|
static NyARParam |
createDefaultParameter()
テストパラメータを格納したインスタンスを生成します。
|
static NyARParam |
createFromARParamFile(java.io.InputStream i_stream)
i_streamからARToolkitのカメラパラメータを読み出して、格納したインスタンスを生成します。
|
static NyARParam |
createFromCvCalibrateCamera2Result(int i_w,
int i_h,
double[] i_intrinsic_matrix,
double[] i_distortion_coeffs)
intrinsic matrixとdistortion coeffsパラメータでインスタンスを初期化します。
|
INyARCameraDistortionFactor |
getDistortionFactor()
この関数は、ARToolKit形式の歪み補正パラメータを返します。
|
NyARPerspectiveProjectionMatrix |
getPerspectiveProjectionMatrix()
この関数は、ARToolKit形式の透視変換行列を返します。
|
NyARIntSize |
getScreenSize() |
void |
makeCameraFrustumRH(double i_dist_min,
double i_dist_max,
NyARDoubleMatrix44 o_frustum)
この関数は、カメラパラメータから右手系の視錐台を作ります。
|
void |
saveARParam(java.io.OutputStream i_stream)
この関数は機能しません。
|
void |
setValue(double[] i_factor,
double[] i_projection)
この関数は、配列から値を設定します。
|
public NyARParam(NyARIntSize i_screen_size, NyARPerspectiveProjectionMatrix i_projection_mat, INyARCameraDistortionFactor i_dist_factor)
public static NyARParam createDefaultParameter() throws NyARException
NyARException
public static NyARParam createFromARParamFile(java.io.InputStream i_stream) throws NyARException
i_stream
- NyARException
public static NyARParam createFromCvCalibrateCamera2Result(int i_w, int i_h, double[] i_intrinsic_matrix, double[] i_distortion_coeffs)
i_size
- カメラパラメータのサイズ値i_intrinsic_matrix
- 3x3 matrix
このパラメータは、OpenCVのcvCalibrateCamera2関数が出力するintrinsic_matrixの値と合致します。i_distortion_coeffs
- 4x1 matrix
このパラメータは、OpenCVのcvCalibrateCamera2関数が出力するdistortion_coeffsの値と合致します。public NyARIntSize getScreenSize()
public NyARPerspectiveProjectionMatrix getPerspectiveProjectionMatrix()
public INyARCameraDistortionFactor getDistortionFactor()
public void setValue(double[] i_factor, double[] i_projection)
i_factor
- NyARCameraDistortionFactorにセットする配列を指定する。要素数は4であること。i_projection
- NyARPerspectiveProjectionMatrixセットする配列を指定する。要素数は12であること。public void changeScreenSize(int i_xsize, int i_ysize)
i_xsize
- 新しいサイズi_ysize
- 新しいサイズpublic void changeScreenSize(NyARIntSize i_s)
i_s
- public void makeCameraFrustumRH(double i_dist_min, double i_dist_max, NyARDoubleMatrix44 o_frustum)
注意 - この処理は低速です。繰り返しの使用はできるだけ避けてください。
i_dist_min
- 視錐台のnear point(mm指定)i_dist_max
- 視錐台のfar point(mm指定)o_frustum
- 視錐台を受け取る配列。NyARPerspectiveProjectionMatrix.makeCameraFrustumRH(double, double, double, double, jp.nyatla.nyartoolkit.core.types.matrix.NyARDoubleMatrix44)
public void saveARParam(java.io.OutputStream i_stream) throws java.lang.Exception
i_stream
- 未定義java.lang.Exception