Can i take output from viola jones algorithm

Hello everyone,
I need image output from viola jones algorithm. I have used Viola jones on gray image and result has square box around face regions in image. I need these detected face images for further processing.
how i should take out those detected faces and save it as image?
Thank you in advance.

댓글 수: 2

imcrop()
AP
AP 2020년 5월 6일
Thank you sir. I have tried using imcrop but it's manual process. I want the output face detected from viola jones algorithm to be directly displayed as output. Please need help for this. Thank you.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2020년 5월 6일

0 개 추천

When you step() the viola jones detector, you get an array of bounding boxes. You can loop through each row of the bounding box, passing the row to imcrop.
bbox = step(my_viola_detector_object, IMG);
nbox = size(bbox,1);
pieces = cell(nbox,1);
for K = 1 : nbox
pieces{K} = imcrop(IMG, bbox(K,:));
end

카테고리

도움말 센터File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

질문:

AP
2020년 5월 4일

답변:

2020년 5월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by