ohmm
Class CvUndistort

java.lang.Object
  extended by ohmm.CvBase
      extended by ohmm.CvUndistort

public class CvUndistort
extends CvBase

TBD

Author:
Marsette A. Vona

Nested Class Summary
 
Nested classes/interfaces inherited from class ohmm.CvBase
CvBase.ExchangeHandler, CvBase.ImageServer
 
Field Summary
protected  com.googlecode.javacv.cpp.opencv_core.CvMat distortions
           
protected  com.googlecode.javacv.cpp.opencv_core.CvMat intrinsics
           
protected  com.googlecode.javacv.cpp.opencv_core.IplImage mapx
           
protected  com.googlecode.javacv.cpp.opencv_core.IplImage mapy
           
protected  boolean undistort
           
protected  com.googlecode.javacv.cpp.opencv_core.IplImage undistortImage
           
 
Fields inherited from class ohmm.CvBase
appname, brightness, canvasFrame, canvasFrameKeyEvent, cap, CAP_PROP_NAMES, CAP_PROPS, capImage, dbg, DEF_APPNAME, DEF_CAM_H, DEF_CAM_W, DEF_INPUT, DEF_MAX_FPS, DEF_MAX_SERVER_FPS, DEF_MIN_DELAY_MS, DEF_SERVER_FORMAT, DEF_SERVER_MIME_TYPE, DEF_SERVER_PORT, exposure, FMT, frameEndMS, frameN, gain, grabber, height, HTTP_FORBIDDEN, HTTP_NOT_FOUND, HTTP_OK, hue, maxFPS, maxServerFPS, minDelayMS, mouseCallback, msPerTick, paused, procImage, saturation, saveImage, server, SERVER_HTML, serverActive, serverDBG, serverFormat, serverImage, serverImagePending, serverKey, serverLock, serverMimeType, serverPort, streamIndex, useCanvasFrame, useConsole, useServer, useWindow, V4L2_AUTO_PROP_NAMES, V4L2_AUTO_PROP_OFF_VALS, V4L2_AUTO_PROP_ON_VALS, V4L2_AUTO_PROPS, V4L2_CID_AUDIO_BALANCE, V4L2_CID_AUDIO_BASS, V4L2_CID_AUDIO_LOUDNESS, V4L2_CID_AUDIO_MUTE, V4L2_CID_AUDIO_TREBLE, V4L2_CID_AUDIO_VOLUME, V4L2_CID_AUTO_WHITE_BALANCE, V4L2_CID_AUTOGAIN, V4L2_CID_BACKLIGHT_COMPENSATION, V4L2_CID_BASE, V4L2_CID_BLACK_LEVEL, V4L2_CID_BLUE_BALANCE, V4L2_CID_BRIGHTNESS, V4L2_CID_CAMERA_CLASS, V4L2_CID_CAMERA_CLASS_BASE, V4L2_CID_CONTRAST, V4L2_CID_DO_WHITE_BALANCE, V4L2_CID_EXPOSURE, V4L2_CID_EXPOSURE_ABSOLUTE, V4L2_CID_EXPOSURE_AUTO, V4L2_CID_EXPOSURE_AUTO_PRIORITY, V4L2_CID_FOCUS_ABSOLUTE, V4L2_CID_FOCUS_AUTO, V4L2_CID_FOCUS_RELATIVE, V4L2_CID_GAIN, V4L2_CID_GAMMA, V4L2_CID_HCENTER_DEPRECATED, V4L2_CID_HFLIP, V4L2_CID_HUE, V4L2_CID_HUE_AUTO, V4L2_CID_LASTP1, V4L2_CID_PAN_ABSOLUTE, V4L2_CID_PAN_RELATIVE, V4L2_CID_PAN_RESET, V4L2_CID_POWER_LINE_FREQUENCY, V4L2_CID_POWER_LINE_FREQUENCY_50HZ, V4L2_CID_POWER_LINE_FREQUENCY_60HZ, V4L2_CID_POWER_LINE_FREQUENCY_DISABLED, V4L2_CID_PRIVATE_BASE, V4L2_CID_RED_BALANCE, V4L2_CID_SATURATION, V4L2_CID_SHARPNESS, V4L2_CID_TILT_ABSOLUTE, V4L2_CID_TILT_RELATIVE, V4L2_CID_TILT_RESET, V4L2_CID_USER_BASE, V4L2_CID_USER_CLASS, V4L2_CID_VCENTER_DEPRECATED, V4L2_CID_VFLIP, V4L2_CID_WHITE_BALANCE_TEMPERATURE, V4L2_CID_WHITENESS, V4L2_CTRL_CLASS_CAMERA, V4L2_CTRL_CLASS_MPEG, V4L2_CTRL_CLASS_USER, V4L2_EXPOSURE_APERTURE_PRIORITY, V4L2_EXPOSURE_AUTO, V4L2_EXPOSURE_MANUAL, V4L2_EXPOSURE_SHUTTER_PRIORITY, v4l2Auto, width
 
Constructor Summary
CvUndistort()
           
 
Method Summary
protected  boolean camIndexOptional()
          Whether the camera index is optional on the command line.
protected  void cmdHelpExt()
          Display extra command line help, for subclasses.
protected  java.lang.String cmdHelpExtParams()
          Extra command line parameters, for subclasses.
protected  void guiHelpExt()
          Display extra GUI help, for subclasses.
protected  boolean handleKeyExt(int code)
          Keypresses not handled by the default implementation of handleKey() are passed here.
 int initExt(int argc, java.lang.String[] argv, int ate)
          Extra initialization, for subclasses.
static void main(java.lang.String[] argv)
           
protected  com.googlecode.javacv.cpp.opencv_core.IplImage process(com.googlecode.javacv.cpp.opencv_core.IplImage frame)
          Process the given frame.
 void release()
          Frees memory, closes windows, and releases resources.
 
Methods inherited from class ohmm.CvBase
cmdHelp, doneProcessing, dumpCaptureProperties, finalize, fmt, getCaptureProperty, guiHelp, handleKey, handleMouse, handleMouse, init, init, init, init, mainLoop, makeGrabber, mouseEventToString, nowMS, save, setCaptureProperty, v4l2DisableAuto, v4l2EnableAuto, v4l2GetExposure, v4l2SetExposure, waitForKeypresss
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

intrinsics

protected com.googlecode.javacv.cpp.opencv_core.CvMat intrinsics

distortions

protected com.googlecode.javacv.cpp.opencv_core.CvMat distortions

mapx

protected com.googlecode.javacv.cpp.opencv_core.IplImage mapx

mapy

protected com.googlecode.javacv.cpp.opencv_core.IplImage mapy

undistort

protected boolean undistort

undistortImage

protected com.googlecode.javacv.cpp.opencv_core.IplImage undistortImage
Constructor Detail

CvUndistort

public CvUndistort()
Method Detail

release

public void release()
Description copied from class: CvBase
Frees memory, closes windows, and releases resources.

Overrides:
release in class CvBase

camIndexOptional

protected boolean camIndexOptional()
Description copied from class: CvBase
Whether the camera index is optional on the command line.

Overrides:
camIndexOptional in class CvBase

cmdHelpExt

protected void cmdHelpExt()
Description copied from class: CvBase
Display extra command line help, for subclasses.

Overrides:
cmdHelpExt in class CvBase

guiHelpExt

protected void guiHelpExt()
Description copied from class: CvBase
Display extra GUI help, for subclasses.

Overrides:
guiHelpExt in class CvBase

cmdHelpExtParams

protected java.lang.String cmdHelpExtParams()
Description copied from class: CvBase
Extra command line parameters, for subclasses.

Overrides:
cmdHelpExtParams in class CvBase

process

protected com.googlecode.javacv.cpp.opencv_core.IplImage process(com.googlecode.javacv.cpp.opencv_core.IplImage frame)
Description copied from class: CvBase

Process the given frame.

Default impl is identity.

Note that the passed image may not be mutated. So to do any significant processing, you will need to allocate your own return image. It is typically best to do this once for the first frame, store the results in subclass instance variables, and then deallocate any allocated space in the subclass destructor.

All frames are guaranteed to have the same dimensions and pixel format.

This will be called for every iteration of mainLoop(), even while paused. You may use the various instance fields (CvBase.frameN, CvBase.capImage, CvBase.paused, CvBase.dbg, etc) to determine what operations to perform. Of course, when writing a subclass, you may also add your own fields.

Overrides:
process in class CvBase
Returns:
the processed image, null will cause image display to be skipped for this frame

handleKeyExt

protected boolean handleKeyExt(int code)
Description copied from class: CvBase

Keypresses not handled by the default implementation of handleKey() are passed here.

Default impl just prints the keycode.

Overriding this is one way that subclasses can handle extra keypresses.

Overrides:
handleKeyExt in class CvBase

initExt

public int initExt(int argc,
                   java.lang.String[] argv,
                   int ate)
Description copied from class: CvBase

Extra initialization, for subclasses.

Overrides:
initExt in class CvBase
ate - the number of command line arguments already eaten by CvBase.init(int, String[])
Returns:
the total number of arguments eaten

main

public static void main(java.lang.String[] argv)