cv.jit.faces: keeping order with [coll]'s renumber argument?

Nov 12, 2010 at 10:24am

cv.jit.faces: keeping order with [coll]'s renumber argument?

hello!

I’m trying to replace faces with individual images. the problem is, that in my current set-up image1 always stays present. meaning, when person1 “leaves the building” his image(1) swaps to person2 (automatically replacing image2).

jean-marc pelletier has come up with something similar with cv.jit.touches[recycle] to keep the order in place – its core being [coll]‘s renumber argmuent (which looks more promising than modifying [cv.jit.blobs.sort] for my purpose)

does anyone have hints/suggestions on how to keep an order in this with [coll]?

thankful for ANY hint..
best
-jonas
(images in the zip file)

my set-up:

– Pasted Max Patch, click to expand. –

jean-marc’s [cv.jit.touches.recycle] solution:

– Pasted Max Patch, click to expand. –
Attachments:
  1. face_replace.zip
#53266
Nov 16, 2010 at 8:14pm

I’m giving up on the [coll] approach, I feel there’s no need for that..

in the meanwhile I’d be grateful for at least somebody telling me WHY the coordinates of my second face being detected are allocated to the value of my first?

best

-jonas

http://jonaswolf.com/swap.jpg

#191583
Nov 18, 2010 at 7:20am

The object does not in any way track faces in time. It works on a frame per frame basis. There is no guarantee that the same person’s face will show up at the same index.

Of course, this is a problem for what you are doing. The simplest solution is to try to sort the faces yourself. You could, for instance use cv.jit.track to find out where the person’s nose (in the middle of the face) moved. If it’s inside a face rect then it’s probably the same person.

JM

#191584
Nov 18, 2010 at 2:47pm

thanks for replying, jean-marc!

that’s something I’ll have to wrap my head around. (:

I’ve found this patch by nesa, which at least works with cv.jit.track & cv.jit.faces in one patch.. does this get me close – would you think this to be a good starting point (for modification)?

– Pasted Max Patch, click to expand. –

cheers!

& all the best

-j

#191585

You must be logged in to reply to this topic.