| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectohmm.CvBase
ohmm.CvUndistort
public class CvUndistort
Extends CvBase to optionally perform undistortion.
Undistortion requires the camera_matrix and distortion_coefficients
 fields from an OpenCV YAML camera calibration file, saved to intrinsics and distortions, respectively.
The camera_to_model_0 matrix is also read, if available, and saved to
 extrinsics.
| Field Summary | |
|---|---|
| static java.lang.String | APPNAMEApplication name. | 
| protected  com.googlecode.javacv.cpp.opencv_core.CvMat | distortionsCamera distortions from calibration file. | 
| protected  com.googlecode.javacv.cpp.opencv_core.CvMat | extrinsicsCamera extrinsics from calibration file. | 
| protected  com.googlecode.javacv.cpp.opencv_core.CvMat | intrinsicsCamera intrinsics from calibration file. | 
| protected  com.googlecode.javacv.cpp.opencv_core.IplImage | mapxRemap coordinates, allocated on first call to process(com.googlecode.javacv.cpp.opencv_core.IplImage). | 
| protected  com.googlecode.javacv.cpp.opencv_core.IplImage | mapyRemap coordinates, allocated on first call to process(com.googlecode.javacv.cpp.opencv_core.IplImage). | 
| protected  boolean | undistortWhether to attempt undistortion. | 
| protected  com.googlecode.javacv.cpp.opencv_core.IplImage | undistortImageUndistorted image buffer, allocated on first call to process(com.googlecode.javacv.cpp.opencv_core.IplImage). | 
| Constructor Summary | |
|---|---|
| CvUndistort()Sets APPNAME. | |
| CvUndistort(java.lang.String appname)Chains to superclass constructor. | |
| Method Summary | |
|---|---|
| protected  boolean | camIndexOptional()Help for the extra command line parameter. | 
| protected  void | cmdHelpExt()Display extra command line help, for subclasses. | 
| protected  java.lang.String | cmdHelpExtParams()Shows the extra command line parameter. | 
| protected  void | guiHelpExt()Help for the extra GUI keyboard commands. | 
| protected  boolean | handleKeyExt(int code)Handle our custom keypresses. | 
|  int | initExt(int argc,
        java.lang.String[] argv,
        int ate)Loads camera calibration if given. | 
| static void | main(java.lang.String[] argv)Program entry point. | 
| protected  com.googlecode.javacv.cpp.opencv_core.IplImage | process(com.googlecode.javacv.cpp.opencv_core.IplImage frame)Applies undistortion if undistortandintrinsicsanddistortionsavailable. | 
|  com.googlecode.javacv.cpp.opencv_core.CvMat | readMat(com.googlecode.javacv.cpp.opencv_core.CvFileStorage fs,
        java.lang.String name)Read the named OpenCV matrix from file. | 
|  void | release()Releases allocated memory. | 
| Methods inherited from class ohmm.CvBase | 
|---|
| cmdHelp, doneProcessing, dumpCaptureProperties, finalize, fmt, getCaptureProperty, getDefAppname, getDefInput, guiHelp, handleKey, handleMouse, handleMouse, init, init, init, init, mainLoop, makeGrabber, makeServer, mouseEventToString, msg, nowMS, save, setCaptureProperty, updateServerImage, v4l2DisableAuto, v4l2EnableAuto, v4l2GetExposure, v4l2SetExposure, waitForKeypresss, warn | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String APPNAME
protected com.googlecode.javacv.cpp.opencv_core.CvMat intrinsics
protected com.googlecode.javacv.cpp.opencv_core.CvMat distortions
protected com.googlecode.javacv.cpp.opencv_core.CvMat extrinsics
protected com.googlecode.javacv.cpp.opencv_core.IplImage mapx
process(com.googlecode.javacv.cpp.opencv_core.IplImage).
protected com.googlecode.javacv.cpp.opencv_core.IplImage mapy
process(com.googlecode.javacv.cpp.opencv_core.IplImage).
protected boolean undistort
protected com.googlecode.javacv.cpp.opencv_core.IplImage undistortImage
process(com.googlecode.javacv.cpp.opencv_core.IplImage).
| Constructor Detail | 
|---|
public CvUndistort(java.lang.String appname)
public CvUndistort()
APPNAME.
| Method Detail | 
|---|
protected boolean camIndexOptional()
camIndexOptional in class CvBaseprotected void cmdHelpExt()
CvBase
cmdHelpExt in class CvBaseprotected java.lang.String cmdHelpExtParams()
cmdHelpExtParams in class CvBaseprotected void guiHelpExt()
guiHelpExt in class CvBaseprotected com.googlecode.javacv.cpp.opencv_core.IplImage process(com.googlecode.javacv.cpp.opencv_core.IplImage frame)
Applies undistortion if undistort and intrinsics and
 distortions available.
process in class CvBaseprotected boolean handleKeyExt(int code)
handleKeyExt in class CvBasepublic void release()
release in class CvBase
public int initExt(int argc,
                   java.lang.String[] argv,
                   int ate)
initExt in class CvBaseate - the number of command line arguments already eaten by CvBase.init(int, String[])
public com.googlecode.javacv.cpp.opencv_core.CvMat readMat(com.googlecode.javacv.cpp.opencv_core.CvFileStorage fs,
                                                           java.lang.String name)
public static void main(java.lang.String[] argv)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||