java,android,opencv,computer-vision,face-detection
Just compare the center of the detection rectangle from the previous frame to that in the current frame. If the center has not changed too much, it is likely the same object. In that case, don't count the "new" rectangle in the current frame.
android,camera,android-camera,face-detection
FaceDetectionListener faceDetectionListener = new FaceDetectionListener(){ private boolean processing = false; public void setProcessing(boolean processing) { this.processing = processing; } @Override public void onFaceDetection(Face[] faces, Camera camera) { if (processing) return; if (faces.length == 0){ prompt.setText(" No Face Detected! "); }else{ //prompt.setText(String.valueOf(faces.length) + " Face Detected :) "); try{ camera.takePicture(myShutterCallback,myPictureCallback_RAW, myPictureCallback_JPG);...
java,android,opencv,face-detection,eye-tracking
I've no idea whether there is any library for that, but using technique descirbed in article Eye-blink detection system for human–computer interaction by Aleksandra Królak and Paweł Strumiłło (you can download it here and here and here is some simplified version) in my opinion is a good option. Generally this...
python,face-detection,raspberry-pi2
The problem is in your camera.capture_continuos. First value, output, cannot be just an array as it records with an infinite iteration as the docs says. Instead of this you should put an output file. If you want an stream to capture this you can use the io.Bytes as well. In...
c++,opencv,math,face-detection,face-recognition
For rotating(counterclockwise by an angle θ) a point (x,y) around another point (p,q) you need to use: x′ = (x−p)cos(θ)−(y−q)sin(θ)+p, y′ = (x−p)sin(θ)+(y−q)cos(θ)+q. where x',y' are coordinates after rotation. In your case (p,q) is the center of the image if you rotated around center. Detailed Explanation could be found here:...
Face recognition is not a simple problem, because the human face can vary a lot between two attempts, it sounds to me like perhaps your recognizer is working correctly, but might not be trained as well as you like. The eigen method for face recognition is very sensitive to pose...
c++,opencv,visual-studio-2013,face-detection
cv::CascadeClassifier::CascadeClassifier(void) constructor call doesn't seem to exist. Check openCV documentation here - http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html Seems like a linking problem. Check if you have similar problems like here http://answers.opencv.org/question/9421/cascade-classifier-for-eye-detection-errors-while-compiling/...
ios,objective-c,uiimage,crop,face-detection
For anyone else having a similar issue -- transforming CGImage coordinates to UIImage coordinates -- I found this great article explaining how to use CGAffineTransform to accomplish exactly what I was looking for.
performance,opencv,face-detection,fps
If you want to use the OpenCV algorithm without modifying it, you can extract a sub-image around the location of the faces at the previous frame. In this way the OpenCV face detector performs a sliding window search on a much smaller region. Then you remap the face position in...
java,android,opencv,face-detection
The problem is that your are not using the face detector (CascadeClassifier) class, but a face tracker (DetectionBasedTracker) based on that detector. I didn't find this class in the official documentation and did not look into the code, so i can't tell you exactly how it works, but according to...
opencv,computer-vision,face-detection,face-recognition
A shape-indexed-feature is a feature who's index gives some clue about the hierarchical structure of the shape that it came from. So in face alignment, facial landmarks are extremely important, since they are the things that will be useful in successfully aligning the faces. But, just taking facial landmarks into...
You cannot reply on OpenCV to do this because its model is trained based on face images just like the first one. That is to say, it is supposed to give face detections like the first one. Instead, consider to crop the detected rectangles a little bit, whatever size you...
I have worked with Face recognition for a while. If you want to use OpenCV you could do a better effort searching in SO and you can found things like this one. The best one for me is the SDK provide by lockheed martin... but it's too expensive :S for...
python,opencv,webcam,using,face-detection
You need to check if "ret == True' before going on with cvtColor. The code should look like this: faceCascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') video_capture = cv2.VideoCapture(0) while True: ret, frame = video_capture.read() if ret == True: gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) faces = faceCascade.detectMultiScale( frame, scaleFactor=1.1, minNeighbors=5, minSize=(30, 30), flags=cv2.cv.CV_HAAR_SCALE_IMAGE ) #...
Suggestion: If you are looking for face detection, I suggest you use platform specific APIs like FaceDetector rather than OpenCV Java wrapper. This is since those API's would be hardware accelerated(GPU) unlike OpenCV face detection which till version 3.0 relied on CPU only. The speed difference you perceive between desktop...
java,android,image,face-detection,resize-crop
createBitmap(Bitmap source, int x, int y, int width, int height) receives a start X and start Y, and a width and height value, not an end X and end Y. If you change your commented-out code to this it should work: mIV.setImageBitmap(Bitmap.createBitmap(mFaceBitmap,cropXinit,cropYint,cropXend-cropXinit,cropYend-cropYinit)); ...
image,matlab,computer-vision,face-detection,matlab-cvst
There are a few of things you can try: Definitely move FaceDetect = vision.CascadeObjectDetector; outside of the loop. You only need to create the face detector object once. Re-creating it for every frame is definitely your performance bottleneck. vision.VideoFileReader returns a frame of class 'single' by default. If you change...
matlab,tracking,face-detection,face-recognition,matlab-cvst
Try this example, which uses the Viola-Jones face detection algorithm, and the KLT (Kanade-Lucas-Tomasi) algorithm for tracking.
java,out-of-memory,face-detection,openimaj
The reason you got failed is because of image processing algorithm used. I'm not sure what openimaj uses, but there are two workarounds possible for this: Increase heap size, so that your application has more memory available for image processing. See How can I increase the JVM memory? Decrease image...
some webcams need a warmup time, and deliver empty frames on startup. you want to check for that. also, who said , that cv2.rectangle returns anything ? where did you get that idea ? from SO ? while cap.isOpened(): s, img = cam.read() if s == None: gray = cv2.cvtColor(img,...
opencv,face-detection,haar-classifier
internally, the CascadeClassifier does several detections, and groups those. minNeighbours (in the detectMultiScale call) is the amount of detections in about the same place nessecary to count as a valid detection, so increase that from your current 2 to maybe 5 or so, until you start to miss positives....
c#,kinect,emgucv,face-detection
Ok I got it to work finally. The problem was the Point[j,i] which should have been Point[i,j] . Also my FaceDetection method proved to be a little erratic and I had to fix that too to finally properly debug my code....
face-detection,adaboost,viola-jones
The parameter theta_j is calculated for each feature by the weak learner. Viola and Jones' approach was better documented in their 2004 version of their paper, and, IMHO, is very similar to a ROC analysis. You must test each one of your weak classifiers against the training set looking for...
The problem is, you are never trying to get the face pixels. After you detect face, I suggest you to do something such as: Mat mFaceMatrix = mRgba.submat(facesArray.y, facesArray.y + facesArray.heigth, facesArray.x, facesArray.x + facesArray.width); Now passing this matrix to createBitmap function should do the trick. Bitmap bitmap = Bitmap.createBitmap(mFaceMatrix.cols(),...
image-processing,computer-vision,face-detection
Actually, I think you can't. You have to provide a set of initial landmarks from which the search will start. That's because the program implements the ASM search only and does not include any face or eye detector to find a starting point for the algorithm. Try Stephen Milborrow ASM/AAM...
Here is the answer - (void) captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection { // when do we start face detection if (!_canStartDetection) return; CIImage *ciimage = [CIImage imageWithCVPixelBuffer:CMSampleBufferGetImageBuffer(sampleBuffer)]; NSArray *features = [_faceDetector featuresInImage:ciimage options:nil]; // find face feature for(CIFeature *feature in features) { // if not face feature ignore if (![feature...
ios,avfoundation,face-detection
In your storyboard you should add a new view to the main view and create the outlet: @property (weak, nonatomic) IBOutlet UIView *containerView; And the button that you add should be on the same hierarchical as the newly created subview. Also the button should be in front of the newly...
android,android-layout,face-detection
use framelayout ( relativelayout over image) and align it . then resize the image differently and put it in linearlayout with textview.
python,opencv,image-processing,webcam,face-detection
i guess, you wanted a 'continuous detection, not a 'single shot' one, right ? you're just some small changes away: import numpy as np import cv2 face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') if face_cascade.empty(): raise Exception("your face_cascade is empty. are you sure, the path is correct ?") eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') if eye_cascade.empty(): raise...
php,thumbnails,crop,face-detection
Can you increase the time limit? You can use set_time_limit() or change your php.ini if you have access to it. Also, how big is the detection.dat file? Loading the entire file in memory with file_get_contents() can take some time if the file is large. Unless you mess up with the...