Camera calibration sucessfully ported.

This commit is contained in:
2014-05-02 13:59:58 -04:30
parent 729b21400c
commit a3431937d0

View File

@@ -319,14 +319,17 @@ public class MainActivity extends AndroidApplication implements OSFunctionalityP
tFrame = BitmapFactory.decodeByteArray(frame, 0, frame.length); tFrame = BitmapFactory.decodeByteArray(frame, 0, frame.length);
Utils.bitmapToMat(tFrame, inImg); Utils.bitmapToMat(tFrame, inImg);
calibrateCameraParameters(cameraMatrix.getNativeObjAddr(), distortionCoeffs.getNativeObjAddr(), inImg.getNativeObjAddr(), calibrationPoints); double error = calibrateCameraParameters(cameraMatrix.getNativeObjAddr(), distortionCoeffs.getNativeObjAddr(), inImg.getNativeObjAddr(), calibrationPoints);
Gdx.app.log(TAG, CLASS_NAME + "calibrateCamera(): calibrateCameraParameters retured " + Double.toString(error));
cameraCalibrated = true; cameraCalibrated = true;
}else{ }else{
Gdx.app.debug(TAG, CLASS_NAME + ".calibrateCamera(): OpenCV is not ready or failed to load."); Gdx.app.debug(TAG, CLASS_NAME + ".calibrateCamera(): OpenCV is not ready or failed to load.");
} }
} }
/** /**
* *
*/ */