-
-
Save acamilo/3c207094062f94674a00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Starting with the connected camera from BowlerStudio | |
println(cameraCHDK) | |
//Create the default detector using "haarcascade_frontalface_default.xml" | |
IObjectDetector detector = new HaarDetector("haarcascade_smile.xml") | |
// Create the input and display images. The display is where the detector writes its detections overlay on the input image | |
Mat inputImage = new Mat() | |
Mat displayImage = new Mat() | |
// Loop checking the camera for faces | |
while(true){ | |
cameraCHDK.getLatestImage(inputImage,displayImage); // capture image | |
KeyPoint[] data = detector.getObjects(inputImage, displayImage); | |
System.out.println("Got: "+data.length); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment