android - OpenCV4Android - capturing images in rectangles (face detection) -
i've been using opencv c/c++ in past, , i'm trying android. detecting face features. use opencv example face detection , detecting features via cascades. want ask is:
1) how capture area in reactangle variable/device memory:
in opencv worked that:
cvsetimageroi(img1, cvrect(10, 15, 150, 250)); iplimage *img2 = cvcreateimage(cvgetsize(img1), img1->depth, img1->nchannels); cvcopy(img1, img2, null);
in android example have array rectangles of found faces:
rect[] facesarray = faces.toarray(); (int = 0; < facesarray.length; i++) core.rectangle(mrgba, facesarray[i].tl(), facesarray[i].br(), face_rect_color, 3);
but have no clue how save because cant work on iplimage. can guide me bit or give me source can study?
2) if there way set onclick on areas found on camera view, can click on choosen face, @ write kind of variable or save in memory
i think, you're looking mrgba.submat(facesarray[i])
(very biased personal opinion: you're still using iplimages (aka c-api) ? whaa. bad habit. move on c++ api!)
Comments
Post a Comment