updating Java samples to meet Java API changes

pull/13383/head
Andrey Pavlenko 13 years ago
parent c6e9e9418a
commit 6708869425
  1. 2
      samples/android/face-detection/src/org/opencv/samples/fd/FdView.java
  2. 2
      samples/android/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsView.java
  3. 1
      samples/android/tutorial-0-androidcamera/.classpath
  4. 1
      samples/android/tutorial-3-native/.classpath

@ -83,7 +83,7 @@ class FdView extends SampleCvViewBase {
int faceSize = Math.round(height * FdActivity.minFaceSize); int faceSize = Math.round(height * FdActivity.minFaceSize);
List<Rect> faces = new LinkedList<Rect>(); List<Rect> faces = new LinkedList<Rect>();
mCascade.detectMultiScale(mGray, faces, 1.1, 2, 2 // TODO: objdetect.CV_HAAR_SCALE_IMAGE mCascade.detectMultiScale(mGray, faces, 1.1, 2, 2 // TODO: objdetect.CV_HAAR_SCALE_IMAGE
, new Size(faceSize, faceSize)); , new Size(faceSize, faceSize), new Size());
for (Rect r : faces) for (Rect r : faces)
Core.rectangle(mRgba, r.tl(), r.br(), new Scalar(0, 255, 0, 255), 3); Core.rectangle(mRgba, r.tl(), r.br(), new Scalar(0, 255, 0, 255), 3);

@ -107,7 +107,7 @@ class ImageManipulationsView extends SampleCvViewBase {
CreateAuxiliaryMats(); CreateAuxiliaryMats();
Imgproc.Sobel(mGrayInnerWindow, mIntermediateMat, CvType.CV_8U, 1, 1); Imgproc.Sobel(mGrayInnerWindow, mIntermediateMat, CvType.CV_8U, 1, 1);
Core.convertScaleAbs(mIntermediateMat, mIntermediateMat, 10); Core.convertScaleAbs(mIntermediateMat, mIntermediateMat, 10, 0);
Imgproc.cvtColor(mIntermediateMat, mRgbaInnerWindow, Imgproc.COLOR_GRAY2BGRA, 4); Imgproc.cvtColor(mIntermediateMat, mRgbaInnerWindow, Imgproc.COLOR_GRAY2BGRA, 4);
break; break;

@ -3,5 +3,6 @@
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/> <classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/> <classpathentry kind="output" path="bin/classes"/>
</classpath> </classpath>

@ -3,5 +3,6 @@
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/> <classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/> <classpathentry kind="output" path="bin/classes"/>
</classpath> </classpath>

Loading…
Cancel
Save