フィルターのクリア

Can i take output from viola jones algorithm

1 回表示 (過去 30 日間)
AP
AP 2020 年 5 月 4 日
回答済み: Walter Roberson 2020 年 5 月 6 日
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 件のコメント
Walter Roberson
Walter Roberson 2020 年 5 月 4 日
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 日
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

Community Treasure Hunt

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

Start Hunting!

Translated by