I´m developing an interactive floor projection based installation (4x3 meters).
I´m already sort of tracking people´s activity/position, however, it´s sort of hard to get a single blob for each person since IR light shows differently depending on the part of the body.
See attached images as an example of what I see as the camera input and how it’s processed on oF via openCV add-on.
[attachment=1:207dp5mw]Captura de pantalla 2010-09-16 a las 18.57.28.png[/attachment:207dp5mw]
Is there any way of getting a single blob per person? Should I do something different with the light? As you see, the lack of height to the ceiling is an important restriction.
I even tried CCV to send data to oF (since CCV has more tweaking options) but nothing changed too much.
[attachment=0:207dp5mw]Captura de pantalla 2010-09-16 a las 19.01.21.png[/attachment:207dp5mw]
Thanks in advance.
!(http://forum.openframeworks.cc/uploads/default/895/Captura de pantalla 2010-09-16 a las 18.57.28.png)
!(http://forum.openframeworks.cc/uploads/default/896/Captura de pantalla 2010-09-16 a las 19.01.21.png)
Im not a genius in Of, but i think that you can try 2 options:
First its using the openCV example and modifing the min area per blob its maybe eliminate the tiny blobs.
contourFinder.findContours(grayDiff, 10, 5000, 2, true); // find holes
// the parameter 2 is min and the 3 is max
Second option can be trying to eliminate blobs using the distance between each of them (can play 1 o more than 1 users??) and making a average of positions.
i hope it helps, sorry for my english.
Thanks for your input, I’ll also give it a try.
nice to see you in OF forum.
- I think playing with a minim and maximum blob size is necesary.
- But try use more thresholl
- And also apply a bit blur then you will have more blobs together.
I hope this helps.
If you’re not projecting onto the ground, using another surface would be ideal (something more absorptive/darker, a black carpet or felt). That would allow you to lower your threshold and help solve the problem.
If you don’t need precise outlines, you might consider blurring the image before blob detection like mar.canet mentioned. You can do this with the ofxOpenCv blur function on the cvImage or even by defocusing the camera lens.
I think the best solution would be using a surface that doesn’t reflect the light so much. However, I need to project on the floor so a white surface is required.
Playing with the different blob sizes is not such a good idea as the installation has to work for kids too.
Thanks to all of you. I’ll keep playing with the parameters and effects (not like I haven’t done it before) or try to find a workaround.
However, in case somebody faces this challenge in the future, the way to go is using optical flow algorithms or Haar-like features. I can’t spend the required it would require though since the project is in quite a late stage.
In the end is not easy to get a perfect shape from a person as some people wear dark jeans, or have dark skin and all the usual IR reflection issues.
Thanks anyway as usual
I’ll go for playing with the settings of the camera and threshold. Maybe you can set the camera in a different angle or just lower de luminescence of the IR light.