Added functions required for Java API wrappers generating converting Mat-s to/from vectors.
This commit is contained in:
@@ -21,6 +21,7 @@ public class OpenCVTestRunner extends InstrumentationTestRunner {
|
||||
|
||||
public static String LENA_PATH = "/data/data/org.opencv.test/files/lena.jpg";
|
||||
public static String CHESS_PATH = "/data/data/org.opencv.test/files/chessboard.jpg";
|
||||
public static String LBPCASCADE_FRONTALFACE_PATH = "/mnt/sdcard/lbpcascade_frontalface.xml";
|
||||
private static String TAG = "opencv_test_java";
|
||||
|
||||
private AndroidTestRunner androidTestRunner;
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
package org.opencv.test.objdetect;
|
||||
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.opencv.Mat;
|
||||
import org.opencv.objdetect;
|
||||
import org.opencv.imgproc;
|
||||
import org.opencv.highgui;
|
||||
import org.opencv.core;
|
||||
import org.opencv.test.OpenCVTestCase;
|
||||
import org.opencv.test.OpenCVTestRunner;
|
||||
import org.opencv.Rect;
|
||||
import org.opencv.Size;
|
||||
|
||||
public class objdetectTest extends OpenCVTestCase {
|
||||
public void testCascadeClassifierFaceDetector() {
|
||||
//objdetect.CascadeClassifier cc=new objdetect.CascadeClassifier("/mnt/sdcard/lbpcascade_frontalface.xml");
|
||||
objdetect.CascadeClassifier cc=new objdetect.CascadeClassifier("/mnt/sdcard/haarcascade_frontalface_alt2.xml");
|
||||
ArrayList<Rect> faces=new ArrayList<Rect>();
|
||||
|
||||
|
||||
Mat shot002=highgui.imread("/mnt/sdcard/shot0002.png");
|
||||
OpenCVTestRunner.Log("after imread shot002");
|
||||
|
||||
cc.detectMultiScale(shot002, faces, 1.1, 2, 2 /*TODO: CV_HAAR_SCALE_IMAGE*/, new Size(10,10));
|
||||
OpenCVTestRunner.Log("faces.size="+faces.size());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user