/** * Construct with a standard {@link HaarCascadeDetector} and the given * minimum search size. * * @param size * minimum detection size. */ public FKEFaceDetector(int size) { this(new HaarCascadeDetector(size)); }
/** * Initialise face detection with minimum face size * @param min */ public void initFace(int min){ faceDetector = new HaarCascadeDetector(min); }
/** * Default constructor * * @param capture * @param width * @param height */ public FaceTrackingTutorial(Video<MBFImage> capture, int width, int height){ super("Face Finding", capture, width, height); this.detector = new HaarCascadeDetector(20); }
/** * Default constructor. Uses the standard {@link HaarCascadeDetector} with a * minimum search size of 80 pixels. */ public FKEFaceDetector() { this(new HaarCascadeDetector(80)); }
/** * Default constructor. Uses the standard {@link HaarCascadeDetector} with a * minimum search size of 80 pixels, and the given scale-factor for * extracting the face patch. * * @param patchScale * the scale of the patch compared to the patch extracted by the * internal detector. */ public FKEFaceDetector(float patchScale) { this(new HaarCascadeDetector(80), patchScale); }
/** * */ public OpenIMAJ() { faceDetector = new HaarCascadeDetector(80); }
/** * Default constructor * * @param capture * @param width * @param height */ public ShapeRenderingTutorial(Video<MBFImage> capture, int width, int height) { super("Drawing", capture, width, height); this.detector = new HaarCascadeDetector(20); }
/** * Construct with a standard {@link HaarCascadeDetector} and the given * minimum search size, and the given scale-factor for extracting the face * patch. * * @param patchScale * the scale of the patch compared to the patch extracted by the * internal detector. * @param size * minimum detection size. */ public FKEFaceDetector(int size, float patchScale) { this(new HaarCascadeDetector(size), patchScale); }
/** * Create a new detector with the this cascade. * * @return A new {@link HaarCascadeDetector} */ public HaarCascadeDetector load() { try { return new HaarCascadeDetector(classFile); } catch (final Exception e) { throw new RuntimeException(e); } } }
/** * Default constructor * * @param capture * @param width * @param height */ public FaceKETrackingTutorial(Video<MBFImage> capture, int width, int height){ super("Face Finding", capture, width, height); this.detector = new FKEFaceDetector( new HaarCascadeDetector(height/3)); }
/** * Construct with custom mustache image * * @param mustache */ public Mustache(MBFImage mustache) { this.mustache = mustache; this.detector = new FKEFaceDetector(new HaarCascadeDetector(80)); }
/** * Construct with custom mustache image * * @param mustache */ public Mustache(MBFImage mustache) { this.mustache = mustache; this.detector = new FKEFaceDetector(new HaarCascadeDetector(80)); }
@Override public FaceSimilarityEngine<?, ?, FImage> strategy() { final FacialFeatureComparator<DoGSIFTFeature> comparator = new DoGSIFTFeatureComparator(); final FaceDetector<DetectedFace, FImage> detector = new HaarCascadeDetector(80); final FacialFeatureExtractor<DoGSIFTFeature, DetectedFace> factory = new DoGSIFTFeature.Extractor(); return FaceSimilarityEngine.create(detector, factory, comparator); }
/** * */ public ProcessingPanel() { this.d = new HaarCascadeDetector(100); this.fkp = new FKEFaceDetector( HaarCascadeDetector.BuiltInCascade.frontalface_alt.load()); this.init(); }
/** * */ public ProcessingPanel() { this.d = new HaarCascadeDetector(100); this.fkp = new FKEFaceDetector( HaarCascadeDetector.BuiltInCascade.frontalface_alt.load()); this.init(); }
@Override public FaceSimilarityEngine<?, ?, FImage> strategy() { final FacialFeatureComparator<DoGSIFTFeature> comparator = new DoGSIFTFeatureComparator(); final FaceDetector<DetectedFace, FImage> detector = new HaarCascadeDetector(80); final FacialFeatureExtractor<DoGSIFTFeature, DetectedFace> factory = new DoGSIFTFeature.Extractor(); return FaceSimilarityEngine.create(detector, factory, comparator); }
@Override public void beforeUpdate(MBFImage frame) { final FaceDetector<DetectedFace, FImage> fd = new HaarCascadeDetector(40); final List<DetectedFace> faces = fd.detectFaces(Transforms.calculateIntensity(frame)); for (final DetectedFace face : faces) { frame.drawShape(face.getBounds(), RGBColour.RED); } }
private void useHaarCascadeDetector( MBFImage image, Metadata metadata ) { FaceDetector<DetectedFace,FImage> fd = new HaarCascadeDetector(20); FImage fim = Transforms.calculateIntensity( image ); List<DetectedFace> faces = fd.detectFaces( fim ); for( DetectedFace face : faces ) { this.addFaceRectangle(face.getBounds(), metadata); } }
public VideoFace() throws Exception { capture = new VideoCapture(320, 240); innerEngine = new HaarCascadeDetector(); engine = new FKEFaceDetector(innerEngine); polygonListener = new PolygonDrawingListener(); videoFrame = VideoDisplay.createVideoDisplay(capture); videoFrame.getScreen().addMouseListener(polygonListener); videoFrame.addVideoListener(this); SwingUtilities.getRoot(videoFrame.getScreen()).addKeyListener(this); }
public VideoFace() throws Exception { capture = new VideoCapture(320, 240); innerEngine = new HaarCascadeDetector(); engine = new FKEFaceDetector(innerEngine); polygonListener = new PolygonDrawingListener(); videoFrame = VideoDisplay.createVideoDisplay(capture); videoFrame.getScreen().addMouseListener(polygonListener); videoFrame.addVideoListener(this); SwingUtilities.getRoot(videoFrame.getScreen()).addKeyListener(this); }