OpenCVObjectDetectorPropertyWorker objectDetector = new OpenCVObjectDetectorPropertyWorker();
objectDetector.loadNativeLibrary();
ClassLoader cl = Thread.currentThread().getContextClassLoader();
BufferedImage bImage = ImageIO.read(cl.getResourceAsStream(TEST_IMAGE));
CascadeClassifier objectClassifier = new CascadeClassifier(cl.getResource(CLASSIFIER).getPath());
objectDetector.addObjectClassifier("face", objectClassifier, "http://test.lumify.io/#face");
List<ArtifactDetectedObject> detectedObjectList = objectDetector.detectObjects(bImage);
assertTrue("Incorrect number of objects found", detectedObjectList.size() == 1);
ArtifactDetectedObject detectedObject = detectedObjectList.get(0);