How to separate detected face region from face image?

3 ビュー (過去 30 日間)
Jaanu
Jaanu 2012 年 8 月 3 日
Hi!
to detect face region. it is nicely giving detected face region. but i need to separate that detected region. is there any way to separate that square which include face region.
Thanks.

回答 (1 件)

Sumit Tandon
Sumit Tandon 2012 年 8 月 3 日
I am assuming that you are using the STEP method of VISION.CASCADEOBJECTDETECTOR that returns a bounding box.
You could just use the bounding box data to crop out the face from the image.
For example, if I is the RGB image and bounding box is [x,y,w,h], you could do:
croppedFace = I(x:x+w, y-h:y,:);
  1 件のコメント
Jaanu
Jaanu 2012 年 8 月 3 日
Actually I used this following link detector where i am confusing how to relate this bounding box [x,y,w,h].

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by