passport-photo | Passport Photo Maker | Runtime Evironment library
kandi X-RAY | passport-photo Summary
kandi X-RAY | passport-photo Summary
Passport Photo Maker
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of passport-photo
passport-photo Key Features
passport-photo Examples and Code Snippets
Community Discussions
Trending Discussions on passport-photo
QUESTION
ANSWER
Answered 2020-Oct-01 at 10:22Your calculations for the mouth co-ordinates appear to be correct.
However, I see you are using:
QUESTION
I've been working with MATLAB for a couple of weeks now. But I am having trouble getting an accurate inner boundary of an input face image.
My code involves using Haar cascades to get the box around the face and the nose. Then I use the mid point of the nose box as the tip of the nose [nx, ny]
. From then on, I try to get the boundary of the face by:
- Converting it to gray scale
- Increasing the contrast
- Plotting the "Active Countour" of the face by searching only in the box bounded by the mask of range
[rows, cols]
plotted in blue. This active contour gives a rough image around the face - Since The boundary started going outside the face, I thought I needed to "erode" the image with
imerode
. This is followed bybwboundaries
. I also commented out the alternative of usingbwmorph
andbwtraceboundaries
. imgradient, imfilter
may be unnecessary, but I was playing around with it to see how everything would play out. When the boundary came inside the face, I thought of dialating the image withimdilate
. I don't know if it is common practice to do so, but the boundary is mehh, but very ugly.
Here is the original image (without markers) : http://images.wisegeek.com/passport-photo.jpg
Here is the ungly bordered image:
The code that powers this :
...ANSWER
Answered 2017-Mar-26 at 09:01I extended your code to detect the face as shown below.
- I started from the detection of nose and eyes using the
CascadeObjectDetector
. I extended these regions to include the mouth and eyebrows, respectively. These regions are forced to be part of the final face region. The detection of the face boundary is done by thresholding the second order derivatives of the gray scale image. Especially the chin is hard to detect correctly. The border between the chin and the neck is highlighted by applying a large erosion step. Because this step is sensitive to noise in the face region, the image is first filtered non linearly by applying a small dilation and erosion step.
The face region is determined using the eroded image, otherwise the boundary between the chin and the neck may not be clear. Afterwards, the large erosion is undone by applying the (inverse) dilation step.
The results are quite good for the simple approach, but not perfect. You may obtain better results by iteratively changing the threshold used for the second order derivatives. If you start from a large threshold the neck will be included in the face region. You can detect it by assuming some maximum distance between the nose region and the bottom of the face. Then, you can decrease the threshold until the neck is not included anymore. Another alternative to make this method more robust may be to normalise the LoG.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install passport-photo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page