1. How to make IF statement for im.MergeThreshold use in Viola-Jones Algorithm
Show older comments
Hi, i am trying to code an algorithm to detect facial features and extract its values.
I am using viola-jones algorithm for mouth, nose, and eyes detection. In the code, theres a threshold that is used to determine the number of detected object in the image. My problem is, when i input a new image, the algorithm cannot detect the features. Only when i change the threshold value will it detect. The values i specifies are random and are by trial and error. Are there a way for using an if or switch case statement for it to automatically try other threshold value? I am using a normalized 100x100 grayscale images of already cropped out face from original image to detect the eyes, nose, mouth.
example code:
mouthdetect = vision.CascadeObjectDetector('Mouth');
% Threshold value //CHANGE HERE IF ROI IS NOT DETECTED
mouthdetect.MergeThreshold = 50;
% Detects mouth in image.
bb_m = step(mouthdetect, face);
% Annotation
an_m = insertObjectAnnotation(face, 'rectangle', bb_m, 'Mouth');
% Crop segmented mouth
mouth = imcrop(face, bb_m);
2. Also, does anyone know what should i extract from gabor filtered image for expression recognition? I've read some research that uses std, var, pca, dct. But i get an array of values not a single value.
Accepted Answer
More Answers (0)
Categories
Find more on Face Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!