Last active
February 16, 2020 19:49
-
-
Save madhephaestus/4db9defef935e2905690 to your computer and use it in GitHub Desktop.
Revisions
-
Technocopia PC 01 revised this gist
May 5, 2017 . 1 changed file with 0 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,4 @@ import java.awt.image.BufferedImage; String name = "imageProvider" AbstractImageProvider camera0=null; if(DeviceManager.getSpecificDevice(AbstractImageProvider.class, name)==null){ -
madhephaestus revised this gist
May 24, 2016 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -91,20 +91,21 @@ while(!Thread.interrupted() && i<200){ //dyio.setValue(0,position) } /*save images try { File outputfile = new File(dir+"/saved_"+i+".jpg"); ImageIO.write(displayImage, "jpg", outputfile); inFiles.add(outputfile) } catch (IOException e) { e.printStackTrace() }*/ i++ } /*saved images to video //println "Compiling to video" File outFile = new File(dir+"/Video.mov") ImagesToVideo imageToMovie = new ImagesToVideo(); imageToMovie.run(640, 480, 30, inFiles,outFile ); println "Video exported to "+outFile.getAbsolutePath() */ -
madhephaestus revised this gist
Apr 19, 2016 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,9 @@ String name = "imageProvider" AbstractImageProvider camera0=null; if(DeviceManager.getSpecificDevice(AbstractImageProvider.class, name)==null){ //BowlerStudio.speak("Connecting to camera 0."); camera0 = new OpenCVImageProvider(0);// grab the first camera DeviceManager.addConnection(camera0,name); /** //Static File Image provider FileChooser fileChooser = new FileChooser(); fileChooser.setTitle("Open Image File"); @@ -26,10 +28,10 @@ if(DeviceManager.getSpecificDevice(AbstractImageProvider.class, name)==null){ }else return null; }) */ /** URL Image Provider Evample * * TextInputDialog dialog = new TextInputDialog("http://neuronrobotics.com/img/AndrewHarrington/2014-09-15-86.jpg"); dialog.setTitle("URL Image Source"); @@ -50,6 +52,7 @@ if(DeviceManager.getSpecificDevice(AbstractImageProvider.class, name)==null){ } } */ }else{ // -
madhephaestus revised this gist
Apr 19, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -62,8 +62,9 @@ while(DeviceManager.getSpecificDevice(AbstractImageProvider.class, name)==null){ // Starting with the connected camera from BowlerStudio println(camera0) File haarCascadeFile = ScriptingEngine.fileFromGit("https://github.com/madhephaestus/DefaultHaarCascade.git", "lbpcascade_frontalface.xml") //Create the default detector using "lbpcascade_frontalface.xml" IObjectDetector detector = new HaarDetector(haarCascadeFile) // Create the input and display images. The display is where the detector writes its detections overlay on the input image BufferedImage inputImage = AbstractImageProvider.newBufferImage(640,480) BufferedImage displayImage = AbstractImageProvider.newBufferImage(640,480) -
madhephaestus revised this gist
Apr 19, 2016 . 1 changed file with 23 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,21 +7,27 @@ import com.neuronrobotics.imageprovider.AbstractImageProvider; import com.neuronrobotics.imageprovider.OpenCVImageProvider; import com.neuronrobotics.imageprovider.StaticFileProvider; import com.neuronrobotics.imageprovider.URLImageProvider; import javafx.stage.FileChooser; import javafx.application.Platform; String name = "imageProvider" AbstractImageProvider camera0=null; if(DeviceManager.getSpecificDevice(AbstractImageProvider.class, name)==null){ //BowlerStudio.speak("Connecting to camera 0."); //camera0 = new OpenCVImageProvider(0);// grab the first camera //Static File Image provider FileChooser fileChooser = new FileChooser(); fileChooser.setTitle("Open Image File"); Platform.runLater({ File f = fileChooser.showOpenDialog(BowlerStudio.getPrimaryStage()); if(f!=null){ camera0 = new StaticFileProvider(f); DeviceManager.addConnection(camera0,name); }else return null; }) /* URL Image Provider Evample * @@ -44,10 +50,14 @@ if(DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "imageProvider")== } } */ }else{ // camera0 = (AbstractImageProvider)DeviceManager.getSpecificDevice(AbstractImageProvider.class, name); } while(DeviceManager.getSpecificDevice(AbstractImageProvider.class, name)==null){ ThreadUtil.wait(100) } // Starting with the connected camera from BowlerStudio -
madhephaestus revised this gist
Apr 19, 2016 . 1 changed file with 42 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,15 +3,51 @@ import com.neuronrobotics.imageprovider.Detection; import java.util.List; import com.neuronrobotics.bowlerstudio.av.ImagesToVideo import javax.imageio.ImageIO; import com.neuronrobotics.imageprovider.AbstractImageProvider; import com.neuronrobotics.imageprovider.OpenCVImageProvider; import com.neuronrobotics.imageprovider.StaticFileProvider; import com.neuronrobotics.imageprovider.URLImageProvider; AbstractImageProvider camera0=null; if(DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "imageProvider")==null){ BowlerStudio.speak("Connecting to camera 0."); camera0 = new OpenCVImageProvider(0);// grab the first camera /* Static File Image provider FileChooser fileChooser = new FileChooser(); fileChooser.setTitle("Open Image File"); File f = fileChooser.showOpenDialog(BowlerStudio.getPrimaryStage()); if(f!=null){ AbstractImageProvider p = camera0 = new StaticFileProvider(f); String name = "imageProvider"; addConnection(p,name); } */ /* URL Image Provider Evample * * TextInputDialog dialog = new TextInputDialog("http://neuronrobotics.com/img/AndrewHarrington/2014-09-15-86.jpg"); dialog.setTitle("URL Image Source"); dialog.setHeaderText("This url will be loaded each capture."); dialog.setContentText("URL "); // Traditional way to get the response value. Optional<String> result = dialog.showAndWait(); if (result.isPresent()){ URLImageProvider p; try { p = new URLImageProvider(new URL(result.get())); String name = "url"; addConnection(p,name); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } */ DeviceManager.addConnection(camera0,"imageProvider"); }else{ // camera0 = (OpenCVImageProvider)DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "imageProvider"); } // Starting with the connected camera from BowlerStudio -
madhephaestus revised this gist
Feb 6, 2016 . 1 changed file with 43 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,17 @@ import java.awt.image.BufferedImage; import com.neuronrobotics.imageprovider.Detection; import java.util.List; import com.neuronrobotics.bowlerstudio.av.ImagesToVideo import javax.imageio.ImageIO; OpenCVImageProvider camera0=null; if(DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "camera0")==null){ BowlerStudio.speak("I did not fine a device called camera0. Connecting to camera 0."); camera0 = new OpenCVImageProvider(0);// grab the first camera DeviceManager.addConnection(camera0,"camera0"); }else{ camera0 = (OpenCVImageProvider)DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "camera0"); } // Starting with the connected camera from BowlerStudio @@ -18,16 +21,40 @@ IObjectDetector detector = new HaarDetector("lbpcascade_frontalface.xml") // Create the input and display images. The display is where the detector writes its detections overlay on the input image BufferedImage inputImage = AbstractImageProvider.newBufferImage(640,480) BufferedImage displayImage = AbstractImageProvider.newBufferImage(640,480) ArrayList<File> inFiles = new ArrayList<File>(); String dir = ScriptingEngine.getWorkspace().getAbsolutePath()+"/imageCache/" File dirFile= new File(dir) if(!dirFile.exists()){ dirFile.mkdir(); } // Loop checking the camera for faces int i=0; while(!Thread.interrupted() && i<200){ camera0.getLatestImage(inputImage,displayImage) // capture image List<Detection> data = detector.getObjects(inputImage, displayImage) if(data.size()>0){ println("Got: "+data.size()+ " x location = "+data.get(0).getX()+ " y location "+data.get(0).getY()+ " size = "+data.get(0).getSize() ) int position = (data.get(0).getX()/320.0)*255; //dyio.setValue(0,position) } try { File outputfile = new File(dir+"/saved_"+i+".jpg"); ImageIO.write(displayImage, "jpg", outputfile); inFiles.add(outputfile) } catch (IOException e) { e.printStackTrace() } i++ } println "Compiling to video" File outFile = new File(dir+"/Video.mov") ImagesToVideo imageToMovie = new ImagesToVideo(); imageToMovie.run(640, 480, 30, inFiles,outFile ); println "Video exported to "+outFile.getAbsolutePath() -
madhephaestus revised this gist
Sep 26, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,12 +3,12 @@ import com.neuronrobotics.imageprovider.Detection; import java.util.List; OpenCVImageProvider camera0=null; if(DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "camera")==null){ BowlerStudio.speak("I did not fine a device called camera. Connecting to camera 0."); camera0 = new OpenCVImageProvider(0);// grab the first camera DeviceManager.addConnection(camera0,"camera"); }else{ camera0 = (OpenCVImageProvider)DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "camera"); } // Starting with the connected camera from BowlerStudio -
madhephaestus revised this gist
Sep 26, 2015 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,16 @@ import java.awt.image.BufferedImage; import com.neuronrobotics.imageprovider.Detection; import java.util.List; OpenCVImageProvider camera0=null; if(DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "camera0")==null){ BowlerStudio.speak("I did not fine a device called camera. Connection camera 0."); camera0 = new OpenCVImageProvider(0);// grab the first camera DeviceManager.addConnection(camera0,"camera0"); }else{ camera0 = (OpenCVImageProvider)DeviceManager.getSpecificDevice(OpenCVImageProvider.class, "camera0"); } // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "lbpcascade_frontalface.xml" @@ -18,6 +28,6 @@ while(!Thread.interrupted()){ " y location "+data.get(0).getY()+ " size = "+data.get(0).getSize() ) int position = (data.get(0).getX()/320.0)*255; //dyio.setValue(0,position) } } -
madhephaestus revised this gist
Sep 7, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ import java.awt.image.BufferedImage; import com.neuronrobotics.imageprovider.Detection; import java.util.List; // Starting with the connected camera from BowlerStudio println(camera0) -
madhephaestus revised this gist
May 29, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -17,5 +17,7 @@ while(!Thread.interrupted()){ " x location = "+data.get(0).getX()+ " y location "+data.get(0).getY()+ " size = "+data.get(0).getSize() ) int position = (data.get(0).getX()/320.0)*255; dyio.setValue(0,position) } } -
madhephaestus revised this gist
May 29, 2015 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,10 @@ BufferedImage displayImage = AbstractImageProvider.newBufferImage(640,480) while(!Thread.interrupted()){ camera0.getLatestImage(inputImage,displayImage) // capture image List<Detection> data = detector.getObjects(inputImage, displayImage) if(data.size()>0){ println("Got: "+data.size()+ " x location = "+data.get(0).getX()+ " y location "+data.get(0).getY()+ " size = "+data.get(0).getSize() ) } } -
madhephaestus revised this gist
May 29, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,5 +13,5 @@ while(!Thread.interrupted()){ camera0.getLatestImage(inputImage,displayImage) // capture image List<Detection> data = detector.getObjects(inputImage, displayImage) if(data.size()>0) println("Got: "+data.size()+ " x location = "+data.get(0).getX()+" y location "+data.get(0).getY()+" size = "+data.get(0).getSize() ) } -
madhephaestus revised this gist
May 29, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,5 +12,6 @@ BufferedImage displayImage = AbstractImageProvider.newBufferImage(640,480) while(!Thread.interrupted()){ camera0.getLatestImage(inputImage,displayImage) // capture image List<Detection> data = detector.getObjects(inputImage, displayImage) if(data.size()>0) println("Got: "+data.size()+ " x location = "+data.get(0).getX()+" y location "+data.get(0).getY()+" size = "+data.get(0)+getSize() ) } -
madhephaestus revised this gist
Apr 29, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ import java.awt.image.BufferedImage; import com.neuronrobotics.jniloader.Detection; import java.util.List; // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "lbpcascade_frontalface.xml" -
madhephaestus revised this gist
Apr 29, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ import java.awt.image.BufferedImage; import com.neuronrobotics.jniloader.Detection; // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "lbpcascade_frontalface.xml" -
madhephaestus revised this gist
Apr 26, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ println(camera0) IObjectDetector detector = new HaarDetector("lbpcascade_frontalface.xml") // Create the input and display images. The display is where the detector writes its detections overlay on the input image BufferedImage inputImage = AbstractImageProvider.newBufferImage(640,480) BufferedImage displayImage = AbstractImageProvider.newBufferImage(640,480) // Loop checking the camera for faces while(!Thread.interrupted()){ camera0.getLatestImage(inputImage,displayImage) // capture image -
madhephaestus revised this gist
Apr 26, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ import java.awt.image.BufferedImage; // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "lbpcascade_frontalface.xml" -
madhephaestus revised this gist
Apr 26, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,6 @@ BufferedImage outImage = AbstractImageProvider.newBufferImage(640,480) // Loop checking the camera for faces while(!Thread.interrupted()){ camera0.getLatestImage(inputImage,displayImage) // capture image List<Detection> data = detector.getObjects(inputImage, displayImage) println("Got: "+data.size()) } -
madhephaestus revised this gist
Apr 26, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,8 @@ println(camera0) //Create the default detector using "lbpcascade_frontalface.xml" IObjectDetector detector = new HaarDetector("lbpcascade_frontalface.xml") // Create the input and display images. The display is where the detector writes its detections overlay on the input image BufferedImage inputImage = AbstractImageProvider.newBufferImage(640,480) BufferedImage outImage = AbstractImageProvider.newBufferImage(640,480) // Loop checking the camera for faces while(!Thread.interrupted()){ camera0.getLatestImage(inputImage,displayImage) // capture image -
madhephaestus revised this gist
Apr 24, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,8 @@ IObjectDetector detector = new HaarDetector("lbpcascade_frontalface.xml") Mat inputImage = new Mat() Mat displayImage = new Mat() // Loop checking the camera for faces while(!Thread.interrupted()){ camera0.getLatestImage(inputImage,displayImage) // capture image KeyPoint[] data = detector.getObjects(inputImage, displayImage) println("Got: "+data.length) } -
madhephaestus revised this gist
Apr 24, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "lbpcascade_frontalface.xml" IObjectDetector detector = new HaarDetector("lbpcascade_frontalface.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() -
madhephaestus revised this gist
Apr 24, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "lbpcascade_frontalface.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() -
madhephaestus revised this gist
Apr 21, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // Starting with the connected camera from BowlerStudio println(camera0) //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() -
madhephaestus revised this gist
Apr 19, 2015 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,6 @@ Mat inputImage = new Mat() Mat displayImage = new Mat() // Loop checking the camera for faces while(true){ camera0.getLatestImage(inputImage,displayImage); // capture image KeyPoint[] data = detector.getObjects(inputImage, displayImage); System.out.println("Got: "+data.length); -
madhephaestus revised this gist
Apr 17, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "haarcascade_frontalface_default.xml" IObjectDetector detector = new HaarDetector("haarcascade_frontalface_default.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() -
madhephaestus created this gist
Apr 17, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ // Starting with the connected camera from BowlerStudio println(camera0) //Create the default detector using "/harr/haarcascade_frontalface_default.xml" IObjectDetector detector = new HaarDetector("/harr/haarcascade_frontalface_default.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){ ThreadUtil.wait(100); camera0.getLatestImage(inputImage,displayImage); // capture image KeyPoint[] data = detector.getObjects(inputImage, displayImage); System.out.println("Got: "+data.length); }