jerrym | 1c0e8c7 | 2013-02-18 06:56:38 +0000 | [diff] [blame] | 1 | =JavaCV=
|
| 2 |
|
| 3 | ==Introduction==
|
| 4 | JavaCV first provides wrappers to commonly used libraries by researchers in the field of computer vision: [http://opencv.willowgarage.com/ OpenCV], [http://www.ffmpeg.org/ FFmpeg], [http://damien.douxchamps.net/ieee1394/libdc1394/ libdc1394], [http://www.ptgrey.com/products/pgrflycapture/ PGR FlyCapture], [http://muonics.net/school/spring05/videoInput/ videoInput], and [http://studierstube.icg.tugraz.at/handheld_ar/artoolkitplus.php ARToolKitPlus]. The following classes, found under the `com.googlecode.javacv.cpp` package namespace, expose their complete APIs: `opencv_core`, `opencv_imgproc`, `opencv_video`, `opencv_features2d`, `opencv_calib3d`, `opencv_objdetect`, `opencv_highgui`, `opencv_legacy`, `avutil`, `avcodec`, `avformat`, `avdevice`, `avfilter`, `postprocess`, `swscale`, `dc1394`, `PGRFlyCapture`, `videoInputLib`, and `ARToolKitPlus`, respectively. Moreover, utility classes make it easy to use their functionality on the Java platform, including Android.
|
| 5 |
|
| 6 | JavaCV also comes with hardware accelerated full-screen image display (`CanvasFrame`), easy-to-use methods to execute code in parallel on multiple cores (`Parallel`), user-friendly geometric and color calibration of cameras and projectors (`GeometricCalibrator`, `ProCamGeometricCalibrator`, `ProCamColorCalibrator`), detection and matching of feature points (`ObjectFinder`), a set of classes that implement direct image alignment of projector-camera systems (mainly `GNImageAligner`, `ProjectiveTransformer`, `ProjectiveGainBiasTransformer`, `ProCamTransformer`, and `ReflectanceInitializer`), as well as miscellaneous functionality in the `JavaCV` class.
|
| 7 |
|
| 8 | To learn how to use the API, since documentation currently lacks, please refer to the [#Quick_Start_for_OpenCV] section below as well as the
|
| 9 | sample programs, including one for Android, found in the `samples` directory. You may also find it useful to refer to the source code of [http://code.google.com/p/javacv/source/browse/trunk/procamcalib/ ProCamCalib] and [http://code.google.com/p/javacv/source/browse/trunk/procamtracker/ ProCamTracker].
|
| 10 |
|
| 11 | I will continue to add all code that I am developing for my doctoral research as I go.
|
| 12 |
|
| 13 |
|
| 14 | ==Required Software==
|
| 15 | To use JavaCV, you will need to download and install the following software:
|
| 16 | * An implementation of Java SE 6
|
| 17 | * OpenJDK 6 http://openjdk.java.net/install/ or
|
| 18 | * Sun JDK 6 http://www.oracle.com/technetwork/java/javase/downloads/ or
|
| 19 | * IBM JDK 6 http://www.ibm.com/developerworks/java/jdk/ or
|
| 20 | * Java SE 6 for Mac OS X http://developer.apple.com/java/ etc.
|
| 21 | * OpenCV 2.2 http://sourceforge.net/projects/opencvlibrary/files/
|
| 22 | * Precompiled for Android 2.2 http://code.google.com/p/javacv/downloads/list
|
| 23 |
|
| 24 | Further, although not always required, some functionality of JavaCV also relies on:
|
| 25 | * FFmpeg 0.6.x http://ffmpeg.org/download.html
|
| 26 | * Precompiled for Windows x86 http://hawkeye.arrozcru.org/builds/win32/shared/ (last build compatible with FFmpeg 0.6: 18-Apr-2011)
|
| 27 | * Precompiled for Windows x86-64 http://hawkeye.arrozcru.org/builds/win64/shared/ (last build compatible with FFmpeg 0.6: 18-Apr-2011)
|
| 28 | * Precompiled for Android 2.2 http://code.google.com/p/javacv/downloads/list
|
| 29 | * libdc1394 2.1.x (Linux and Mac OS X) http://sourceforge.net/projects/libdc1394/files/
|
| 30 | * PGR FlyCapture 1.7~2.1 (Windows only) http://www.ptgrey.com/products/pgrflycapture/
|
| 31 | * Android SDK API 8~11 http://developer.android.com/sdk/
|
| 32 |
|
| 33 | To modify the source code, note that the project files were created with:
|
| 34 | * NetBeans 6.9 http://www.netbeans.org/downloads/
|
| 35 |
|
| 36 | Please keep me informed of any updates or fixes you make to the code so that I may integrate them into the next release. Thank you!
|
| 37 |
|
| 38 | And feel free to ask questions on [http://groups.google.com/group/javacv the mailing list] if you encounter any problems with the software! I am sure it is far from perfect...
|
| 39 |
|
| 40 |
|
| 41 | ==Quick Start for OpenCV==
|
| 42 | First, put `javacpp.jar`, `javacv.jar`, and `javacv-*.jar` somewhere in your classpath, and make sure that the library files of OpenCV can be found either in their default installation directory or in the system PATH, which includes the current directory under Windows. Here are some more specific instructions for common cases:
|
| 43 |
|
| 44 | NetBeans (Java SE 6):
|
| 45 | * In the Projects window, right-click the Libraries node of your project, and select "Add JAR/Folder...".
|
| 46 | * Locate the JAR files, select them, and click OK.
|
| 47 |
|
| 48 | Eclipse (Java SE 6):
|
| 49 | * Navigate to Project > Properties > Java Build Path > Libraries and click "Add External JARs..."
|
| 50 | * Locate the JAR files, select them, and click OK.
|
| 51 |
|
| 52 | Eclipse (Android 2.2 or newer):
|
| 53 | * Follow the instructions on this page: http://developer.android.com/guide/tutorials/hello-world.html
|
| 54 | * Go to File > New > Folder, select your project as parent folder, type "libs/armeabi" as Folder name, and click Finish.
|
| 55 | * Copy `javacpp.jar` and `javacv.jar` in the newly created "libs" folder.
|
| 56 | * Extract the `*.so` files from `javacv-android-arm.jar` *as well as* the `*.so` files of OpenCV in the newly created "libs/armeabi" folder.
|
| 57 | * Navigate to Project > Properties > Java Build Path > Libraries and click "Add JARs..."
|
| 58 | * Select both `javacpp.jar` and `javacv.jar` from the newly created "libs" folder.
|
| 59 |
|
| 60 | After that, the wrapper classes for OpenCV can automatically access all of its C API. The class definitions are basically ports to Java of the original include files in C, and I deliberately decided to keep as much of the original syntax as possible. For example, here is a method that tries to load an image file, smooth it, and save it back to disk:
|
| 61 |
|
| 62 | {{{
|
| 63 | import static com.googlecode.javacv.cpp.opencv_core.*;
|
| 64 | import static com.googlecode.javacv.cpp.opencv_imgproc.*;
|
| 65 | import static com.googlecode.javacv.cpp.opencv_highgui.*;
|
| 66 |
|
| 67 | public class Smoother {
|
| 68 | public static void smooth(String filename) {
|
| 69 | IplImage image = cvLoadImage(filename);
|
| 70 | if (image != null) {
|
| 71 | cvSmooth(image, image, CV_GAUSSIAN, 3);
|
| 72 | cvSaveImage(filename, image);
|
| 73 | }
|
| 74 | }
|
| 75 | }
|
| 76 | }}}
|
| 77 |
|
| 78 | JavaCV also comes with helper classes and methods on top of OpenCV to facilitate its integration to the Java platform. Here is a small demo program demonstrating the most frequently useful parts:
|
| 79 |
|
| 80 | {{{
|
| 81 | import com.googlecode.javacpp.Loader;
|
| 82 | import com.googlecode.javacv.*;
|
| 83 | import com.googlecode.javacv.cpp.*;
|
| 84 | import static com.googlecode.javacv.cpp.opencv_core.*;
|
| 85 | import static com.googlecode.javacv.cpp.opencv_imgproc.*;
|
| 86 | import static com.googlecode.javacv.cpp.opencv_calib3d.*;
|
| 87 | import static com.googlecode.javacv.cpp.opencv_objdetect.*;
|
| 88 |
|
| 89 | public class Demo {
|
| 90 | public static void main(String[] args) throws Exception {
|
| 91 | String classifierName = null;
|
| 92 | if (args.length > 0) {
|
| 93 | classifierName = args[0];
|
| 94 | } else {
|
| 95 | System.err.println("Please provide the path to \"haarcascade_frontalface_alt.xml\".");
|
| 96 | System.exit(1);
|
| 97 | }
|
| 98 |
|
| 99 | // Preload the opencv_objdetect module to work around a known bug.
|
| 100 | Loader.load(opencv_objdetect.class);
|
| 101 |
|
| 102 | // We can "cast" Pointer objects by instantiating a new object of the desired class.
|
| 103 | CvHaarClassifierCascade classifier = new CvHaarClassifierCascade(cvLoad(classifierName));
|
| 104 | if (classifier.isNull()) {
|
| 105 | System.err.println("Error loading classifier file \"" + classifierName + "\".");
|
| 106 | System.exit(1);
|
| 107 | }
|
| 108 |
|
| 109 | // CanvasFrame is a JFrame containing a Canvas component, which is hardware accelerated.
|
| 110 | // It can also switch into full-screen mode when called with a screenNumber.
|
| 111 | CanvasFrame frame = new CanvasFrame("Some Title");
|
| 112 |
|
| 113 | // OpenCVFrameGrabber uses opencv_highgui, but other more versatile FrameGrabbers
|
| 114 | // include DC1394FrameGrabber, FlyCaptureFrameGrabber, VideoInputFrameGrabber and
|
| 115 | // FFmpegFrameGrabber.
|
| 116 | FrameGrabber grabber = new OpenCVFrameGrabber(0);
|
| 117 | grabber.start();
|
| 118 |
|
| 119 | // FAQ about IplImage:
|
| 120 | // - For custom raw processing of data, getByteBuffer() returns an NIO direct
|
| 121 | // buffer wrapped around the memory pointed by imageData.
|
| 122 | // - To get a BufferedImage from an IplImage, you may call getBufferedImage().
|
| 123 | // - The createFrom() factory method can construct an IplImage from a BufferedImage.
|
| 124 | // - There are also a few copy*() methods for BufferedImage<->IplImage data transfers.
|
| 125 | IplImage grabbedImage = grabber.grab();
|
| 126 | int width = grabbedImage.width();
|
| 127 | int height = grabbedImage.height();
|
| 128 | IplImage grayImage = IplImage.create(width, height, IPL_DEPTH_8U, 1);
|
| 129 | IplImage rotatedImage = grabbedImage.clone();
|
| 130 |
|
| 131 | // Let's create some random 3D rotation...
|
| 132 | CvMat randomR = CvMat.create(3, 3), randomAxis = CvMat.create(3, 1);
|
| 133 | // We can easily and efficiently access the elements of CvMat objects
|
| 134 | // with the set of get() and put() methods.
|
| 135 | randomAxis.put((Math.random()-0.5)/4, (Math.random()-0.5)/4, (Math.random()-0.5)/4);
|
| 136 | cvRodrigues2(randomAxis, randomR, null);
|
| 137 | double f = (width + height)/2.0; randomR.put(0, 2, randomR.get(0, 2)*f);
|
| 138 | randomR.put(1, 2, randomR.get(1, 2)*f);
|
| 139 | randomR.put(2, 0, randomR.get(2, 0)/f); randomR.put(2, 1, randomR.get(2, 1)/f);
|
| 140 | System.out.println(randomR);
|
| 141 |
|
| 142 | // Objects allocated with a create*() or clone() factory method are automatically released
|
| 143 | // by the garbage collector, but may still be explicitly released by calling release().
|
| 144 | CvMemStorage storage = CvMemStorage.create();
|
| 145 |
|
| 146 | // We can allocate native arrays using constructors taking an integer as argument.
|
| 147 | CvPoint hatPoints = new CvPoint(3);
|
| 148 |
|
| 149 | // Again, FFmpegFrameRecorder also exists as a more versatile alternative.
|
| 150 | FrameRecorder recorder = new OpenCVFrameRecorder("output.avi", width, height);
|
| 151 | recorder.start();
|
| 152 |
|
| 153 | while (frame.isVisible() && (grabbedImage = grabber.grab()) != null) {
|
| 154 | // Let's try to detect some faces! but we need a grayscale image...
|
| 155 | cvCvtColor(grabbedImage, grayImage, CV_BGR2GRAY);
|
| 156 | CvSeq faces = cvHaarDetectObjects(grayImage, classifier, storage,
|
| 157 | 1.1, 3, CV_HAAR_DO_CANNY_PRUNING);
|
| 158 | int total = faces.total();
|
| 159 | for (int i = 0; i < total; i++) {
|
| 160 | CvRect r = new CvRect(cvGetSeqElem(faces, i));
|
| 161 | int x = r.x(), y = r.y(), w = r.width(), h = r.height();
|
| 162 | cvRectangle(grabbedImage, cvPoint(x, y), cvPoint(x+w, y+h), CvScalar.RED, 1, CV_AA, 0);
|
| 163 |
|
| 164 | // To access the elements of a native array, use the position() method.
|
| 165 | hatPoints.position(0).x(x-w/10) .y(y-h/10);
|
| 166 | hatPoints.position(1).x(x+w*11/10).y(y-h/10);
|
| 167 | hatPoints.position(2).x(x+w/2) .y(y-h/2);
|
| 168 | cvFillConvexPoly(grabbedImage, hatPoints.position(0), 3, CvScalar.GREEN, CV_AA, 0);
|
| 169 | }
|
| 170 |
|
| 171 | // Let's find some contours! but first some thresholding...
|
| 172 | cvThreshold(grayImage, grayImage, 64, 255, CV_THRESH_BINARY);
|
| 173 |
|
| 174 | // To check if an output argument is null we may call either isNull() or equals(null).
|
| 175 | CvSeq contour = new CvSeq(null);
|
| 176 | cvFindContours(grayImage, storage, contour, Loader.sizeof(CvContour.class),
|
| 177 | CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);
|
| 178 | while (contour != null && !contour.isNull()) {
|
| 179 | if (contour.elem_size() > 0) {
|
| 180 | CvSeq points = cvApproxPoly(contour, Loader.sizeof(CvContour.class),
|
| 181 | storage, CV_POLY_APPROX_DP, cvContourPerimeter(contour)*0.02, 0);
|
| 182 | cvDrawContours(grabbedImage, points, CvScalar.BLUE, CvScalar.BLUE, -1, 1, CV_AA);
|
| 183 | }
|
| 184 | contour = contour.h_next();
|
| 185 | }
|
| 186 |
|
| 187 | cvWarpPerspective(grabbedImage, rotatedImage, randomR);
|
| 188 |
|
| 189 | frame.showImage(rotatedImage);
|
| 190 | recorder.record(rotatedImage);
|
| 191 |
|
| 192 | cvClearMemStorage(storage);
|
| 193 | }
|
| 194 | recorder.stop();
|
| 195 | grabber.stop();
|
| 196 | frame.dispose();
|
| 197 | }
|
| 198 | }
|
| 199 | }}}
|
| 200 |
|
| 201 |
|
| 202 | ==Acknowledgments==
|
| 203 | I am currently an active member of the Okutomi & Tanaka Laboratory, Tokyo Institute of Technology, supported by a scholarship from the Ministry of Education, Culture, Sports, Science and Technology (MEXT) of the Japanese Government.
|
| 204 |
|
| 205 |
|
| 206 | ==Changes==
|
| 207 | ===May 11, 2011===
|
| 208 | * Removed `CvMat` object pooling in favor of more efficient `ThreadLocal` objects created by `CvMat.createThreadLocal()`
|
| 209 | * Changed `Marker.getCenter()` back to the centroid, because it has better noise averaging properties and gives in practice more accurate results than the actual center
|
| 210 | * Added hack to `OpenCVFrameGrabber.start()` to wait for `cvRetrieveFrame()` to return something else than `null` under Mac OS X
|
| 211 | * FFmpeg now works properly on Windows and Android (issue #63) with newer binaries
|
| 212 | * New `videoInputLib` wrapper and corresponding `VideoInputFrameGrabber` to capture using DirectShow, useful under Windows 7 where OpenCV and FFmpeg can fail to capture using Video for Windows (issue #58)
|
| 213 | * `GeometricCalibrator` now reports the maximum errors in addition to the average (RMS) errors
|
| 214 |
|
| 215 | ===April 7, 2011===
|
| 216 | * Added a `format` property to `CameraDevice`, `FrameGrabber`, and `FrameRecorder`, mostly useful for `FFmpegFrameGrabber`, where interesting values include "dv1394", "mjpeg", "video4linux2", "vfwcap", and "x11grab"
|
| 217 | * `OpenCVFrameRecorder` now uses `CV_FOURCC_PROMPT` under Windows as default since `CV_FOURCC_DEFAULT` crashes (issue #49)
|
| 218 | * Added hack to make sure the temporarily extracted library files get properly deleted under Windows
|
| 219 | * JavaCPP now loads classes more lazily
|
| 220 | * Fixed most occurences of `UnsatisfiedLinkError` (issue #54), but some corner cases may require a call to `Loader.load()` on the class one wishes to use
|
| 221 | * Added (rudimentary) outlier detection and modified zero threshold handling in the image alignment framework
|
| 222 | * New `JavaCV.hysteresisThreshold()` feature
|
| 223 | * New `HandMouse` functionality, which depends on the image alignment framework
|
| 224 | * Fixed `ProjectiveDevice.distort()`, which mistakenly undistorted images instead
|
| 225 | * New `HoughLines` sample thanks to Jeremy Nicola
|
| 226 |
|
| 227 | ===February 19, 2011===
|
| 228 | * Switched from JNA to JavaCPP, which has a lower overhead and supports C++, bringing hope that future versions of JavaCV will support features of OpenCV available only through the C++ API
|
| 229 | * Consequently, the syntax of various operations have changed a bit, but the transition should not be too painful
|
| 230 | * As a happier consequence, this also fixes the problem with SSE instructions on 32-bit x86 (issue #36)
|
| 231 | * Also, JavaCPP does not have any limitations or performance issues with large data structures (issue #10 and issue #14)
|
| 232 | * Added support for OpenCV 2.2 (issue #42), but dropped support for all previous versions
|
| 233 | * Added samples provided by users (issue #1, issue #45, and issue #46)
|
| 234 | * Added deinterlace setting to `FFmpegFrameGrabber` having it call `avpicture_deinterlace()` (issue #38)
|
| 235 | * Enhanced a few things of the image alignment algorithm
|
| 236 | * Tried to fix image format conversion inside `FlyCaptureFrameGrabber`, but this is going to require more careful debugging
|
| 237 | * Fixed and added various other things I forget
|
| 238 |
|
| 239 | ===December 2, 2010===
|
| 240 | * Now works on Android with the Dalvik VM (for more details, please refer to the FacePreview sample available on the download page)
|
| 241 | * Added more hacks to `CanvasFrame` in the hope to make it behave better outside the EDT
|
| 242 | * Made clearer the error messages thrown from `FrameGrabber` objects, when `start()` may not have been called
|
| 243 | * Fixed version specific declarations of `CvStereoBMState` and related functions
|
| 244 | * Fixed conditions that could crash `cvkernels`
|
| 245 |
|
| 246 | ===November 4, 2010===
|
| 247 | * Renamed the package namespace to `com.googlecode.javacv`, which makes more sense now that JavaCV has been well anchored at Google Code for more than a year, piggybacking on the unique and easy-to-remember domain name
|
| 248 | * Included new FFmpeg wrapper classes `avutil`, `avcodec`, `avformat`, `avdevice`, `avfilter`, `postprocess`, and `swscale`, eliminating the need of the separate FFmpeg-Java package
|
| 249 | * `CanvasFrame` now redraws its `Canvas` after the user resizes the `Frame`
|
| 250 | * Fixed the `Error` thrown when calling `CanvasFrame.showImage()` from the EDT
|
| 251 | * Added check to `DC1394FrameGrabber` so that a "Failed to initialize libdc1394" does not crash the JVM
|
| 252 | * `FFmpegFrameGrabber` does not crash anymore when forgetting to call `start()` before a `grab()` or `trigger()`
|
| 253 | * `FrameGrabber` now selects the default grabber a bit better
|
| 254 | * Made sweeping changes (for the better, but still not finalized) to `GNImageAligner`, `ProjectiveTransformer`, `ProjectiveGainBiasTransformer`, and `ProCamTransformer`...
|
| 255 | * Added to `JavaCV` more methods related to transformation of planes: `perspectiveTransform()`, `getPlaneParameters()`, `getPerspectiveTransform()`, and `HtoRt()`, as well as `ProjectiveDevice.getFrontoParallelH()`
|
| 256 | * Added a static `autoSynch` flag to all `Structure` classes of `cxcore`, `cv`, and `cvaux`, which you may set to `false` prior to the return of things like big and heavy `CvSeq` to make them load faster and to avoid stack overflows, but accessing fields will then require manual calls to `readField()` and `writeField()` (issue #10 and #14)
|
| 257 | * Added missing `ByValue` subclasses to `CvSeq`, `CvSet`, `CvContourTree`, and `CvChain`... Any others missing?
|
| 258 | * Fixed `Exception` thrown from `cvCreateHist()` under JNA 3.2.7 (issue #26)
|
| 259 | * Enhanced `CvMat.put()`, which now supports setting submatrices
|
| 260 | * Improved inside `IplImage` the support of `BufferedImage`, especially those using a `DirectColorModel` (issue #23)
|
| 261 | * Fixed crash in `cvkernels` when color transformation `X` is `null`
|
| 262 |
|
| 263 | ===July 30, 2010===
|
| 264 | * Fixed crash that would occur in `CanvasFrame` for some video drivers
|
| 265 | * `FFmpegFrameGrabber` now supports other input formats (devices), such as `x11grab` that can be used for screencasting
|
| 266 | * Added `JavaCV.median()` function, and `JavaCV.fractalTriangleWave()` now respects image ROI
|
| 267 | * Fixed background subtraction in `cvaux`
|
| 268 | * Fixed crash inside the code for direct alignment caused by the ROI getting set outside the image plane
|
| 269 | * Added `deltaScale` and `tryToFixPlane` to `GNImageAligner.Settings` (the first used in `ImageTransformer.Parameters` as increment, randomly selected forward or backward, for finite difference), which sometimes help to jump over local minima
|
| 270 |
|
| 271 | ===May 30, 2010===
|
| 272 | * Removed redundant `CvMemStorage.clearMem()` method, use `cvClearMemStorage()`
|
| 273 | * Fixed the sample `Test2` class that did not work under Windows
|
| 274 | * Fixed corruption by the `cvkernels` `transformer` at the borders
|
| 275 | * Modified `CanvasFrame` constructors and added a `gamma` argument used by `showImage(IplImage)`
|
| 276 | * `CanvasFrame` now lets users resize the frame, while displayed images are stretched to fit the new size
|
| 277 | * Renamed `CanvasFrame.acquireGraphics()` to `createGraphics()` for consistency
|
| 278 | * When `FlyCaptureFrameGrabber` cannot set fastest speed, it now safely fails by setting any supported speed
|
| 279 | * Added a new `Parallel.loop()` method that can use more threads than the number of CPU cores detected
|
| 280 | * Added new `numThreads` property to `GNImageAligner` and fixed a few minor inconsistencies as well
|
| 281 | * Fixed incorrect `Java.HnToRt()`, and added a few `norm()` and `randn()` methods
|
| 282 | * For functions with `float[]` and `double[]` arguments in `cvaux` and `cv`, added complementary `FloatBuffer` and `DoubleBuffer` declarations
|
| 283 | * Fixed loading problems with `cvaux`
|
| 284 | * Fixed and enhanced histogram, back projection, and other CAMSHIFT related functionality
|
| 285 | * Added code for `CvRNG`
|
| 286 | * Added "/opt/local/lib/" and "/opt/local/lib64/" (standard on Mac OS X) to the default list of search paths for OpenCV
|
| 287 | * Added `CvScalar.getVal()` and `CvIntScalar.getVal()`, which simply return the `val` field, convenient for Scala where `val` is a reserved word
|
| 288 | * Fixed the construction of `IplImage` from a `Pointer`
|
| 289 | * Removed incorrect cases when an `IplImage` gets converted to a `BufferedImage.TYPE_CUSTOM`
|
| 290 | * Made `CvArr.PointerByReference` a bit more consistent and general
|
| 291 |
|
| 292 | ===April 16, 2010===
|
| 293 | * Modified `IplImage`, `FrameGrabber`, and `CanvasFrame` to get better default behavior of gamma correction
|
| 294 | * Fixed `cv.CvHistogram` and related histogram functions
|
| 295 | * `CameraDevice.Settings.triggerFlushSize` now defaults to 5 (only affects `OpenCVFrameGrabber` and `FFmpegFrameGrabber`)
|
| 296 | * Replaced `LMImageAligner` by `GNImageAligner`, a more appropriate name for Gauss-Newton with `lineSearch`
|
| 297 | * Fixed a few things related with `ProjectiveDevice.Settings`
|
| 298 |
|
| 299 | ===April 8, 2010===
|
| 300 | * Added support for OpenCV 2.1
|
| 301 |
|
| 302 | ===April 5, 2010===
|
| 303 | * Fixed up `clone()` methods to avoid the need to cast
|
| 304 | * Removed the `fullScreen` argument from `CanvasFrame` constructors, which will now switch to full-screen mode only when a `screenNumber` is explicitly passed
|
| 305 | * Renamed `FrameGrabber.ColorMode.GRAYSCALE` to `GRAY`
|
| 306 | * Replaced deprecated functions from `FFmpegFrameGrabber` and `FFmpegFrameRecorder`
|
| 307 | * `FFmpegFrameGrabber` can now resize images
|
| 308 |
|
| 309 | ===March 21, 2010===
|
| 310 | * Added new classes and methods used by ProCamTracker: `cvkernels`, `JavaCV.fractalTriangleWave()`, `ImageAligner`, `LMImageAligner`, `ImageTransformer`, `ProjectiveTransformer`, `ProjectiveGainBiasTransformer`, `ProCamTransformer`, and `ReflectanceInitializer`
|
| 311 | * `CameraDevice.Settings` has a new `deviceFile` property (used by a `FrameGrabber`), which brings up a file dialog for some `PropertyEditor`s
|
| 312 | * Moved in `CameraSettings`, `ProjectorSettings`, and `FrameGrabber.PropertyEditor` from the `procamcalib` package
|
| 313 | * Added to `CameraDevice.Settings` and `FrameGrabber` a `triggerFlushSize` property to indicate the number of buffers to flush on `trigger()` to compensate for cheap cameras that keep old images in memory indefinitely
|
| 314 | * Changed the type of `CameraDevice.Settings.deviceNumber` to `Integer` so we may set it to `null`
|
| 315 | * Fixed and enhanced `CanvasFrame.showImage()` methods a bit
|
| 316 | * In `triggerMode` `DC1394FrameGrabber` now tries to use a real software trigger and only falls back to one-shot mode on error
|
| 317 | * Fixed array constructors of `IplImage.PointerByReference()` and `CvImgObsInfo.PointerByReference()`
|
| 318 | * Added `CvPoint.fillArray()` methods to reuse preallocated arrays and changed `createArray()` a bit as well
|
| 319 | * Fixed and enhanced all `IplImage.copy*()` methods, including new support for ROIs and subimages, which affects `create*()` and `getBufferedImage()` methods as well
|
| 320 | * Updated `Marker` to support different size and spacing in X and Y
|
| 321 | * Added `Settings` to `ObjectFinder`
|
| 322 | * Fixed distortion problem in `ProjectiveDevice` and `ProCamColorCalibrator` with OpenCV 1.1pre1
|
| 323 | * Split `ProjectiveDevice.Settings` into `ProjectiveDevice.CalibrationSettings` (for applications like ProCamCalib) and `ProjectiveDevice.CalibratedSettings` (for applications like ProCamTracker)
|
| 324 | * Renamed `gamma` to `responseGamma` in `ProjectiveDevice`, and moved previous `nominalDistance` parameter to `Settings`
|
| 325 | * Added `ProjectiveDevice.rescale()` to rescale calibration parameters when switching a device to a new image size
|
| 326 | * `ProjectiveDevice.undistort()` and `distort()` can now `useFixedPointMaps` of OpenCV
|
| 327 | * `ProjectiveDevice` and its subclasses now `throw new Exception()` if the `parameterFile` cannot be read
|
| 328 |
|
| 329 | ===February 13, 2010===
|
| 330 | * Relicensed JavaCV under the GPLv2 with Classpath exception (see LICENSE.txt). Please note that if your application links with code that needs ARToolKitPlus, for example, it will become subject to the full GPL, without Classpath exception
|
| 331 | * Added `devicePath` setting to `CameraDevice` that works with `FFmpegFrameGrabber`, `OpenCVFrameGrabber`, and other `FrameGrabber` with a String constructor
|
| 332 | * Added "C:/OpenCV2.0/bin/release/" to the directory list to search for OpenCV DLLs
|
| 333 | * Moved `cvFindHomography()`, `cvFindExtrinsicCameraParams2()`, `cvReprojectImageTo3D()`, `cvSaveImage()`, and `cvRetrieveFrame()` to version specific classes since their number of arguments differ with the version of OpenCV
|
| 334 | * Enhanced `CvMat.put(CvMat mat)` to work better even when the matrices are not actually compatible
|
| 335 | * Added new `IplImage` factory methods `createCompatible(IplImage image)`, `createIfNotCompatible(IplImage image, IplImage template)`, and `createFrom(BufferedImage image)`
|
| 336 | * Fixed `distortionCoeffs` corruption that might occur in `ProjectiveDevice`
|
| 337 |
|
| 338 | ===January 3, 2010===
|
| 339 | * Added wrapper for the `cvaux` module of OpenCV
|
| 340 | * Added abstract `FrameRecorder` class and a `OpenCVFrameRecorder` class
|
| 341 | * Fixed read() problem that might occur within Pointer constructors
|
| 342 | * Running `java -jar javacv.jar` now displays version information
|
| 343 |
|
| 344 | ===December 22, 2009===
|
| 345 | * Fixed `CanvasFrame` from getting stuck in a maximized window
|
| 346 | * Removed all `setAutoWrite(false)` from `cxcore` now that the bug appears fixed in JNA
|
| 347 | * Added `FFmpegFrameGrabber` and `FFmpegFrameRecorder` to easily record live footage and grab back offline into JavaCV
|
| 348 |
|
| 349 | ===November 24, 2009===
|
| 350 | * Added more convenient constructors and factory methods for `CvPoint*`, `CvSize*`, `CvRect`, `CvTermCriteria`, `CvSlice`, and `CvAttrList`
|
| 351 | * Added _R2_ correlation coefficient field to `ProjectiveDevice`
|
| 352 | * Enhanced and fixed color conversion spaghetti code in `FlyCaptureFrameGrabber`
|
| 353 | * Fixed the `CvHaarFeature` Structure
|
| 354 | * Renamed `CvIntScalar` factory methods to match with `CvScalar`
|
| 355 | * Enhanced and fixed some problems with gamma correction in `IplImage`
|
| 356 | * Added a `highgui.CV_FOURCC()` method that takes chars as parameter
|
| 357 | * Moved `MarkedPlane.drawMarkers()` to `Marker.draw()` for better code reuse
|
| 358 | * Added `MarkedPlane.getTotalWarp()` with a "useCenters" parameter
|
| 359 | * Changed default values of `MarkerDetector.binarizationKWhiteMarkers` to 1.0 and `ProjectorDevice.brightnessBackground` to 0.0
|
| 360 | * Fixed issue with image width and memory alignment in `MarkerDetector`
|
| 361 | * `Marker.getCenter()` now computes the actual physical center instead of the centroid
|
| 362 | * `OpenCVFrameGrabber.getDeviceDescriptions()` now throws `UnsupportedOperationException`
|
| 363 | * Added support in `OpenCVFrameGrabber` to grab frames from video files
|
| 364 | * Added `ProjectiveDevice.getRectifyingHomography()` method
|
| 365 | * Added `JavaCvErrorCallback` to easily catch errors of OpenCV in Java
|
| 366 |
|
| 367 | ===October 19, 2009===
|
| 368 | * Moved the functionality of `CvMatPool` to the `CvMat.take()` and `.pool()` methods
|
| 369 | * Added color calibration for projector-camera systems (`ProCamColorCalibrator`)
|
| 370 | * Updated `DC1394FrameGrabber` to handle more conversion use cases automatically
|
| 371 | * Fixed `CvIntScalar` to mirror `CvScalar`
|
| 372 |
|
| 373 | ===October 14, 2009===
|
| 374 | * Change of plan: JavaCV now works with any of OpenCV 1.0, 1.1pre1, or 2.0! Version specific functionality is enclosed in subclasses, e.g., the class `cv.v20` can access everything from the `cv` module of OpenCV 2.0
|
| 375 | * Added a few missing functions and adjusted some mappings to make them closer to the C API
|
| 376 | * Added a few more helper methods to `CvPoint*`
|
| 377 | * Added temporary storage to `ObjectFinder` to plug the memory leak
|
| 378 |
|
| 379 | ===October 2, 2009===
|
| 380 | * Fixed problem when loading distortion coefficients with `ProjectiveDevice`
|
| 381 | * Added automatic read and write for functions with arrays of `Structure` or `PointerByReference`
|
| 382 | * Added to `cv.java` a few missing functions related to calibration
|
| 383 | * Fixed up a bit helper methods for `CvPoint*`, `CvScalar`, `CvRect`, `CvBox2D`, `CvMat`, `IplImage`, `CvMemStorage`, `CvSeq`, and `CvSeqBlock`
|
| 384 | * Added `CvMatPool` to `MarkedPlane` and `Marker`
|
| 385 | * Added a few new `distort()` methods to `ProjectiveDevice`
|
| 386 | * Last version to support OpenCV 1.1pre1: Future version will require OpenCV 2.0
|
| 387 |
|
| 388 | ===August 27, 2009===
|
| 389 | * `IplImage` now flips the buffer on copy if necessary
|
| 390 | * Added needed Pointer constructor for `CvSURFPoint` and `CvConvexityDefect`
|
| 391 | * Cleaned up a bit the messy Buffers in `CvMat`
|
| 392 |
|
| 393 | ===August 26, 2009===
|
| 394 | * Added `get*Buffer()` functions to `IplImage`
|
| 395 | * Added more options for gamma correction in `IplImage` and `ProjectiveDevice`
|
| 396 | * Further cleaned up the namespace and constructors of `ProjectiveDevices`
|
| 397 | * `CanvasFrame.waitKey()` now only checks `KeyEvent.KEY_PRESSED`
|
| 398 | * Added `CvMatPool` to avoid recreating matrices
|
| 399 | * Moved `CvScalar` functions to `cxcore`
|
| 400 |
|
| 401 | ===August 19, 2009===
|
| 402 | * Switched to using `import static` for relief from namespace hell
|
| 403 | * Fixed color channel reversal of Bayer images in `DC1394FrameGrabber`
|
| 404 |
|
| 405 | ===August 11, 2009===
|
| 406 | Initial release
|
| 407 |
|
| 408 |
|
| 409 | ----
|
| 410 | Copyright (C) 2009,2010,2011 Samuel Audet <samuel.audet@gmail.com>
|
| 411 | Project site: http://code.google.com/p/javacv/
|
| 412 |
|
| 413 | Licensed under the GNU General Public License version 2 (GPLv2) with Classpath exception.
|
| 414 | Please refer to LICENSE.txt or http://www.gnu.org/licenses/ for details.
|
| 415 |
|