Ask Your Question
0

compare two faces opencv node js

asked 2018-12-17 05:57:20 -0600

e1bit gravatar image

Good Morning.

I have an application in Nodejs with opencv that identifies a face, and saves the img of the face in a file.

My question:

I would like to save only once the identified face, as it is analyzing in real time a video, and saving the face, it is reprinting the image several times. Do you have any method to treat this problem? Save only one image of the identified face?

I thought of comparing the current face with the previous face, if different saves the image. But I did not find an "easy" method to do.

Sorry for my bad english, and thank you for your help. Thank you

edit retag flag offensive close merge delete

Comments

that identifies a face,

that means: detects a face ? (identification would be: "who is it ?")

berak gravatar imageberak ( 2018-12-17 06:05:10 -0600 )edit

Only detect, I do not need to know who it is.

e1bit gravatar imagee1bit ( 2018-12-17 06:07:17 -0600 )edit

I already have and saved my face, already saving several pictures of the same face. The face image is being filmed.

e1bit gravatar imagee1bit ( 2018-12-17 06:08:48 -0600 )edit

Currently it works like this: I compare the current face with the face of the previous frame, if it is different I save, if it is the same I will discarto the image, I use the lib (image-diff). But this is not efficient, I would like to evolve this. I am open to suggestions.

e1bit gravatar imagee1bit ( 2018-12-18 04:58:09 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-12-17 06:12:47 -0600

berak gravatar image

updated 2018-12-17 06:37:57 -0600

assuming, you're using opencv.js (we cannot help you with native node bindings), maybe a simple cv.resize() / cv.absdiff() / cv.sum() will already do the job,

however, there is a decent cnn based method here , have a look

(it probably already does everything you wanted)

edit flag offensive delete link more

Comments

I currently use cv.resize (). The cv.absdiff () method I do not know. I'm using the opencv4nodejs library. I'll read about the cnn-based method. tks

e1bit gravatar imagee1bit ( 2018-12-17 06:18:28 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-12-17 05:57:20 -0600

Seen: 1,158 times

Last updated: Dec 17 '18