Better way then clone() to get a single frame [closed]

asked 2016-09-09 06:40:34 -0600

atv gravatar image

Hi all, Noob question: I'm creating a history of faces, and currently the only way i found to do that is to create a face.clone() (other methods just make a copy of the video and then i have lots of little video's on the side, and i need a still frame) of the face it found. Is there a less cpu intensive way to do that (maybe like cap >> frame) ?

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-13 13:53:35.183132

Comments

seeing your code will be useful to understand your problem well.

sturkmen gravatar imagesturkmen ( 2016-09-09 06:53:48 -0600 )edit

It's just your average Facerecognizer code. After detectmultiscale and putting the face detected into Mat face, i do a : Vector<mat> facehistory; Mat tmp=face.clone(); facehistory[i].pushback(tmp) facehistory++;

And just go through the index later like so: for(i=facehistory-1;i>20;i--)

To show the last images.This works, but maybe this is the only way to do it ?

atv gravatar imageatv ( 2016-09-09 08:48:34 -0600 )edit