Colour blob tracking in jitter
Hi, I am getting really stuck looking at cv.jit.label and jit.fiundbounds and exploring the rest fo the cv.jit bundle.
I need to track a red dot on a live camera feed and track its exact position within the camera screen and then use that position to become the mouse state so that by moving the red dot I can congtrol the mouse cursor.
I look at cv.jit.track which obviously uses the grayscale imagine but i thought it might be able to track the actual dot but it looks the dot easily and I need it to track the dot accurately.
Does anyone have any idea what I need to do?
Sorry for just asking such an open ended question but I have looked into quite a few of the cv.jit objects and i am really stuck as to where to go!
Thank you very much in advance!
All the best
If you manege to extract just the red dot, use cv.jit.centroids or cv.jit.blobs.centroids to get the center of the mass.
Hope thet i was of some help.
Hi Cheers for this. I am stuck now because the red laser dot gets picked up if i shine it onto a black background but not when it shines onto a white background and I need it on a white background. Any idea of how to get around this?
Perhaps reversing the colors of the matrix so that your input is a green light on a black background would help.
can you explain a bit more about the project, maybe it would be more aesthetically helpful to use black, but if you need white im sure theres a workaround.. Also dont forget about infra red, usually works on any color and you can pick it up without being seen by the naked eye!!
I didnt think about that that’s a good diea, cheers!
How would i go about doing that?
I replied to the previous message but hadn’t seen your post Axiom-Crux.
I need to track on a white background because I will be using it to present a presentation, and I want to be able to point at the presentation and get the camera to track the laser position and use the co ordinates to move the cursor accordingly.
I was originally going to use infra red but it turned out that the infra red laser diodes were too expensive and most of them were form america and would have to be shipped in. I am approaching the deadline for this so the red laser was going to be my backup plan!
Thanks for all your help, any other suggestions would be much appreciated!
nah, you lookin in da wrong place if you think infra red is too expensive, in fact I got a cool system with a pen thats made to use the wiimotes, basically makes any projector into a giant wacom tablet! wiimote costs about 30 bux and the pen is well under 10 bux, leds cost about 1 dollar or less, and you can make your own pen with just a button and a battery and an infra red led.
This may not be what your looking for but could lead to a new avenue
That is the thing though, I need an infra red laser, not an led, so i can point at the projection screen and control the cursor as opposed to just using a pen like an interactive whiteboard
|robtherich wrote on Wed, 13 May 2009 09:00|
How do you mean? Im confused!
Forums > Jitter