loading
 
Laser Detection?
Anonymous
17 year
I can't seem to figure out any way to detect a laser with Roborealm. I tried circles, and I tried what i could with blobs. I was hoping to somehow the brighest cluster of pixels. Anyone know how to do this?
from Australia  [87 posts] 17 year
I know what you mean. Something that almost guarantees to work is the lock-in technique.

You need to pulse the laser source (light on/off). Use Markers to store 'laser on/off' images. By subtracting the 'laser off' image from 'laser on' image, you will remove all the background and bright reflections too. All that you will have left is the laser spot.

You can either modulate the laser by varying the input current or mechanically flicking a blocker in fornt of the laser.

Hope this helps.

Nemanya
Anonymous 17 year
kersny,

Can you include an image that you've been working on?

Nemanya is right in that technique will work well!

There also was a posting on YouTube that you might be interested in :

http://www.youtube.com/watch?v=ngqZrrx9wgE

STeven.
Anonymous 17 year
Here are some images from my setup"

No effects:

Circle Detection:

With Laser:

and my program:
program.robo
Anonymous 17 year
I dont know if this will work on a laser pointer, but some time ago I got my lego-cam to track a small flashing (~ 1Hz) torchbulb - it used the movement detection module to pick up the change from the flashing ,this doesnt need the light to be synchronised with RR but on the other hand the camera must stay still while it picks up the flashing and works out the COG, before moving.
It would be nice if there was a frequency filter module in RR :-)
Ringo from United States  [18 posts] 17 year
Can roborealm do the image subtraction mentioned here? If so can somoene explain how or post a file? I'd like to try it with a line generating laser.

Thanks
Ringo
Anonymous 17 year
Yes, RoboRealm can do image subtraction but that would need to be coordinated with the application. I.e. how to know when to take a picture and then another. If the frequency is slow enough (i.e. seconds) then you can take a picture, delay, then take another and then subtract the two.

However, in our experiments we found that the RGB_Filter (using a red laser) set to very high values worked quite nicely. See the attached robofile and try it yourself. Note that the room needs to be a little on the dark side otherwise the laser light gets washed out.

Here's our great art piece using this robofile:



STeven.

program.robo
Ringo from United States  [18 posts] 17 year
I'll give that a try tonight. 1 thing I have done in the past is to use a red plastic filter over the camera to help pick out a line. This works great if the camera is dedicated to finding the laser, not so much if you want to use it for other things at the same time.

But, if I wanted to do the subtraction thing, How do I save the files? Do I have to write them to disk the recall them to do the subtraction? Or is there a way to store 2 images in memory and use them. I can see the writing being a bottleneck.
Thanks
Ringo
Thanks, But
Anonymous
17 year
That RGB filter works well for me, but is there any way to get the coordinates of the laser spot using this method?
Nevermind!!
Anonymous
17 year
NEvermind that, I just used COG. It works Great! thanks everyone for your help!
Anonymous 17 year
kersny,

You got it! That's the way to do it.

ringo,

You don't need to save the file to disk. Just use the Other->Marker to remember the Current image and another marker to remember the next ( you can use the Statement->If to only set markers when needed). The math module will pick up on these marked images and allow you to process them as needed. In fact the marked images will appear in all modules that operate on more than one image at a time.

STeven.
Ringo from United States  [18 posts] 17 year
I'm trying to figure out how to use the marker.
If I place the camera on my desk so I can see video from it and then click other->marker and name it 1.
Then I remove somethgin from my desk and click marker and name it 2.
Then I go to math and select 1 and 2 and subtract, shouldn;t I get something where I removed the item fromteh desk? Instead I get a totally black screen. I've tried it with adding items as well.

Over in teh lower right quadrant of the screen it says "marker[1]" and "marker[2]" and "math 1 2". Cliking on marker 1 or 2 shows the exact same picture. The picture it shows seems to be of the last thing the camera saw. If the camera is active (by pressing the camera button) then it shows live video regardless if you are on marker 1 or 2. If you stop the camera that is what it shows. Should it show the screen I was on when I hit marker?

What am I doing wrong?

Thanks
Ringo
Anonymous 17 year
Ringo,

The way the markers work is that they "mark" the image at the current PLACE within the processing pipeline and will always update as the image moves past their point in the processing pipeline. Thus if you have two markers in the pipeline right next to each other they will always contain the same image. If a filter is performed between the two markers then the one will contain the image prior to the filter whilst the next marker will contain the filtered image.

To accomplish what you want to do try this:

1. Start with a blank processing pipeline (ie click delete serveral times)
2. Insert a marker (marker1) set to the current image with the object in view
3. Once at least one frame has run using this marker DELETE the marker. Now you should have a blank pipeline again.
4. Without moving the camera remove the object from its view.
5. Now add in the math module that will subtract the current image from marker1. You should now see the result you were looking for!

So how does this work? Well, the marker1 that you inserted will continue to exist in RoboRealm (behind the scenes) until the RoboRealm program is exited and NOT when the marker is just deleted from the pipeline. Removing it from the pipeline will just stop it from being updated but it will still contain a valid image (assuming you don't move the camera).

To automate this process you can include an if statement to stop updating a marker after some trigger. Below I've included a robo-file that will wait till frame 10 and then stop updating the marker. Thus to update the frame (after the camera has moved) you'd need to exit and rerun RoboRealm (that resets the frame count to < 0). But you could also use other triggers to trigger the updating of that marker. When you run the robo-file it below it will appear black. Try moving your hand in front of the camera or remove the object in view.

Alternatively, if you are wanting to check for movement you can use the Other->Movement module.

STeven.
Anonymous 17 year
And here's the example robofile.

STeven.
program.robo
Ringo from United States  [18 posts] 17 year
Thanks, That is pretty cool.
Ringo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index