From: Andrey Kamaev Date: Tue, 19 Jul 2011 12:10:05 +0000 (+0000) Subject: Fixed Android samples; updated black list of enums. X-Git-Tag: accepted/2.0/20130307.220821~2348 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69322033495812e5f9545058ecc7566886a1d971;p=profile%2Fivi%2Fopencv.git Fixed Android samples; updated black list of enums. --- diff --git a/modules/java/gen_java.py b/modules/java/gen_java.py index 1f07f80..d748c6d 100644 --- a/modules/java/gen_java.py +++ b/modules/java/gen_java.py @@ -99,6 +99,14 @@ const_ignore_list = ( "CV_CAP_PROP_MAX_DC1394", "CV_CAP_GSTREAMER_QUEUE_LENGTH", "CV_CAP_PROP_PVAPI_MULTICASTIP", + "CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING", + "EVENT_.*", + "CV_L?(BGRA?|RGBA?|GRAY|XYZ|YCrCb|Luv|Lab|HLS|YUV|HSV)\d*2L?(BGRA?|RGBA?|GRAY|XYZ|YCrCb|Luv|Lab|HLS|YUV|HSV).*", + "CV_COLORCVT_MAX", + "CV_.*Bayer.*", + "CV_YUV420i2.+", + "CV_TM_.+", + "CV_FLOODFILL_.+", ) diff --git a/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java b/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java index 08f520c..1b30324 100644 --- a/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java +++ b/samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java @@ -86,7 +86,7 @@ class ImageManipulationsView extends SampleCvViewBase { CreateAuxiliaryMats(); imgproc.Canny(mGrayInnerWindow, mGrayInnerWindow, 80, 90); - imgproc.cvtColor(mGrayInnerWindow, mRgbaInnerWindow, imgproc.CV_GRAY2BGRA, 4); + imgproc.cvtColor(mGrayInnerWindow, mRgbaInnerWindow, imgproc.COLOR_GRAY2BGRA, 4); break; case ImageManipulationsActivity.VIEW_MODE_SOBEL: @@ -98,7 +98,7 @@ class ImageManipulationsView extends SampleCvViewBase { imgproc.Sobel(mGrayInnerWindow, mIntermediateMat, CvType.CV_8U, 1, 1); core.convertScaleAbs(mIntermediateMat, mIntermediateMat, 10); - imgproc.cvtColor(mIntermediateMat, mRgbaInnerWindow, imgproc.CV_GRAY2BGRA, 4); + imgproc.cvtColor(mIntermediateMat, mRgbaInnerWindow, imgproc.COLOR_GRAY2BGRA, 4); break; case ImageManipulationsActivity.VIEW_MODE_SEPIA: @@ -117,9 +117,9 @@ class ImageManipulationsView extends SampleCvViewBase { capture.retrieve(mRgba, highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA); if (mZoomCorner == null || mZoomWindow == null) CreateAuxiliaryMats(); - imgproc.resize(mZoomWindow, mZoomCorner, mZoomCorner.Size()); + imgproc.resize(mZoomWindow, mZoomCorner, mZoomCorner.size()); - Size wsize = mZoomWindow.Size(); + Size wsize = mZoomWindow.size(); core.rectangle(mZoomWindow, new Point(1, 1), new Point(wsize.width - 2, wsize.height - 2), new Scalar(255, 0, 0, 255), 2); break; } diff --git a/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1View.java b/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1View.java index 04cb9ed..62f3bfd 100644 --- a/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1View.java +++ b/samples/android/tutorial-1-addopencv/src/org/opencv/samples/tutorial1/Sample1View.java @@ -36,15 +36,15 @@ class Sample1View extends SampleViewBase { switch (Sample1Java.viewMode) { case Sample1Java.VIEW_MODE_GRAY: - imgproc.cvtColor(mGraySubmat, mRgba, imgproc.CV_GRAY2RGBA, 4); + imgproc.cvtColor(mGraySubmat, mRgba, imgproc.COLOR_GRAY2RGBA, 4); break; case Sample1Java.VIEW_MODE_RGBA: - imgproc.cvtColor(mYuv, mRgba, imgproc.CV_YUV420i2RGB, 4); + imgproc.cvtColor(mYuv, mRgba, imgproc.COLOR_YUV420i2RGB, 4); core.putText(mRgba, "OpenCV + Android", new Point(10, 100), 3/* CV_FONT_HERSHEY_COMPLEX */, 2, new Scalar(255, 0, 0, 255), 3); break; case Sample1Java.VIEW_MODE_CANNY: imgproc.Canny(mGraySubmat, mIntermediateMat, 80, 100); - imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.CV_GRAY2BGRA, 4); + imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.COLOR_GRAY2BGRA, 4); break; } diff --git a/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java b/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java index e57751f..cd9c1c7 100644 --- a/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java +++ b/samples/android/tutorial-2-opencvcamera/src/org/opencv/samples/tutorial2/Sample2View.java @@ -32,7 +32,7 @@ class Sample2View extends SampleCvViewBase { switch (Sample2NativeCamera.viewMode) { case Sample2NativeCamera.VIEW_MODE_GRAY: capture.retrieve(mGray, highgui.CV_CAP_ANDROID_GREY_FRAME); - imgproc.cvtColor(mGray, mRgba, imgproc.CV_GRAY2RGBA, 4); + imgproc.cvtColor(mGray, mRgba, imgproc.COLOR_GRAY2RGBA, 4); break; case Sample2NativeCamera.VIEW_MODE_RGBA: capture.retrieve(mRgba, highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA); @@ -41,7 +41,7 @@ class Sample2View extends SampleCvViewBase { case Sample2NativeCamera.VIEW_MODE_CANNY: capture.retrieve(mGray, highgui.CV_CAP_ANDROID_GREY_FRAME); imgproc.Canny(mGray, mIntermediateMat, 80, 100); - imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.CV_GRAY2BGRA, 4); + imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.COLOR_GRAY2BGRA, 4); break; } diff --git a/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java b/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java index 7f73acf..758dc04 100644 --- a/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java +++ b/samples/android/tutorial-4-mixed/src/org/opencv/samples/tutorial4/Sample4View.java @@ -36,17 +36,17 @@ class Sample4View extends SampleViewBase { switch (Sample4Mixed.viewMode) { case Sample4Mixed.VIEW_MODE_GRAY: - imgproc.cvtColor(mGraySubmat, mRgba, imgproc.CV_GRAY2RGBA, 4); + imgproc.cvtColor(mGraySubmat, mRgba, imgproc.COLOR_GRAY2RGBA, 4); break; case Sample4Mixed.VIEW_MODE_RGBA: - imgproc.cvtColor(mYuv, mRgba, imgproc.CV_YUV420i2RGB, 4); + imgproc.cvtColor(mYuv, mRgba, imgproc.COLOR_YUV420i2RGB, 4); break; case Sample4Mixed.VIEW_MODE_CANNY: imgproc.Canny(mGraySubmat, mIntermediateMat, 80, 100); - imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.CV_GRAY2BGRA, 4); + imgproc.cvtColor(mIntermediateMat, mRgba, imgproc.COLOR_GRAY2BGRA, 4); break; case Sample4Mixed.VIEW_MODE_FEATURES: - imgproc.cvtColor(mYuv, mRgba, imgproc.CV_YUV420i2RGB, 4); + imgproc.cvtColor(mYuv, mRgba, imgproc.COLOR_YUV420i2RGB, 4); FindFeatures(mGraySubmat.getNativeObjAddr(), mRgba.getNativeObjAddr()); break; }