Click here to Skip to main content
15,908,843 members
Home / Discussions / C#
   

C#

 
AnswerRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
DaveAuld26-Oct-10 9:50
professionalDaveAuld26-Oct-10 9:50 
Answer1212 Pin
Luc Pattyn26-Oct-10 9:53
sitebuilderLuc Pattyn26-Oct-10 9:53 
GeneralRe: 1212 [modified] Pin
DaveAuld26-Oct-10 9:55
professionalDaveAuld26-Oct-10 9:55 
GeneralRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
inayathussaintoori26-Oct-10 11:37
inayathussaintoori26-Oct-10 11:37 
AnswerRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
Luc Pattyn26-Oct-10 12:01
sitebuilderLuc Pattyn26-Oct-10 12:01 
GeneralRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
inayathussaintoori26-Oct-10 12:35
inayathussaintoori26-Oct-10 12:35 
GeneralRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
Dave Kreskowiak26-Oct-10 13:49
mveDave Kreskowiak26-Oct-10 13:49 
AnswerRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
Alan Balkany27-Oct-10 4:51
Alan Balkany27-Oct-10 4:51 
The Hough Transform suggested by Luc will work, but in this situation a quick and dirty approach may be easier:

1. We can assume the face color is (generally) different than the background. Find a threshold on your sample images that seems to separate the face/background the best.

2. Use this threshold to create a binary image (1 = face, 0 = background).

3. Do a morphological closing (http://homepages.inf.ed.ac.uk/rbf/HIPR2/close.htm[^]) on the binary image to close gaps (eyes, mouth, etc).

The closing is a dilation followed by an erosion. These sound more complicated than they are, and are explained in the link. They're just a set of Boolean operations on the image, and can be implemented entirely with ANDing or ORing the image with an offset copy of itself.

4. Do a morphological opening on the image to eliminate stray background pixels that are 1's.

5. You should have a convex blob in the face area. You can then trace the outline programmatically to find the bounds.

6. The outline should give you the general regions to look for other facial features in the original image.
Questionface detection problem Pin
inayathussaintoori26-Oct-10 8:04
inayathussaintoori26-Oct-10 8:04 
AnswerRe: face detection problem PinPopular
Pete O'Hanlon26-Oct-10 9:06
mvePete O'Hanlon26-Oct-10 9:06 
GeneralRe: face detection problem Pin
Ennis Ray Lynch, Jr.26-Oct-10 9:22
Ennis Ray Lynch, Jr.26-Oct-10 9:22 
GeneralRe: face detection problem Pin
inayathussaintoori26-Oct-10 9:30
inayathussaintoori26-Oct-10 9:30 
GeneralRe: face detection problem Pin
Dalek Dave26-Oct-10 9:35
professionalDalek Dave26-Oct-10 9:35 
GeneralRe: face detection problem Pin
Pete O'Hanlon26-Oct-10 9:40
mvePete O'Hanlon26-Oct-10 9:40 
GeneralRe: face detection problem Pin
inayathussaintoori26-Oct-10 9:52
inayathussaintoori26-Oct-10 9:52 
GeneralRe: face detection problem Pin
Keith Barrow26-Oct-10 9:53
professionalKeith Barrow26-Oct-10 9:53 
AnswerRe: face detection problem Pin
Adam R Harris26-Oct-10 9:48
Adam R Harris26-Oct-10 9:48 
GeneralRe: face detection problem Pin
inayathussaintoori26-Oct-10 10:28
inayathussaintoori26-Oct-10 10:28 
GeneralRe: face detection problem PinPopular
Richard MacCutchan26-Oct-10 10:32
mveRichard MacCutchan26-Oct-10 10:32 
GeneralRe: face detection problem Pin
Adam R Harris26-Oct-10 11:11
Adam R Harris26-Oct-10 11:11 
GeneralRe: face detection problem Pin
inayathussaintoori26-Oct-10 11:33
inayathussaintoori26-Oct-10 11:33 
GeneralRe: face detection problem Pin
Adam R Harris26-Oct-10 11:36
Adam R Harris26-Oct-10 11:36 
GeneralRe: face detection problem Pin
inayathussaintoori26-Oct-10 11:41
inayathussaintoori26-Oct-10 11:41 
GeneralRe: face detection problem Pin
Adam R Harris26-Oct-10 11:50
Adam R Harris26-Oct-10 11:50 
GeneralRe: face detection problem Pin
inayathussaintoori26-Oct-10 12:32
inayathussaintoori26-Oct-10 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.