tracking a laser with the AVRcam

This forum is used for discussing hardware, software, and technical details of the AVRcam embedded system.

tracking a laser with the AVRcam

Postby techcare » Thu Dec 02, 2004 10:22 am

I am considering building an inexpensive scanning laser range finder for mobile robot navigation based on the AVRcam.

Can the AVRcam track a small red laser( 650mn) spot?, and to what distance?
techcare
 

Postby Guest » Thu Dec 02, 2004 3:10 pm

Hello,
Tracking a red laser dot with the AVRcam should be a fairly straight-forward task (well, as long as the red laser dot isn't on a red wall ;-) My only concern would be if the laser dot simply appeared as a bright spot to the camera (in which case it could still be made to work, except your now tracking a bright spot compared to a red spot). I haven't tried it myself, but when I get home tonight I'll give it a try and report back the results.

John
Guest
 

Postby Kinema » Thu Dec 02, 2004 3:59 pm

Would it be easier to track the dot if it were pulsed at a know rate?
Kinema
 

Postby Guest » Fri Dec 03, 2004 9:30 am

My apologies...I didn't get to test the laser pointer idea last night...I'm going to be away from the connected world for the weekend so I probably won't get to it until Monday...stay tuned.

Would it be easier to track the dot if it were pulsed at a know rate?


Not necessarily...though there will definitely be more "information" if it were. What I mean is that the real benefit of the AVRcam is that all the gathered tracking info can be post-processed to do more interesting things with the data. Looking for a "blinking" pattern among the packets that are being received (or doing a time-difference between the tracking packets received) would definitely be doable.
Guest
 

Postby Kinema » Fri Dec 03, 2004 9:51 pm

Awhile back I was thinking of a system where you would have a constellation of LEDs mounted on the celing each blinking a distinct code. These beacons would then be tracked using a camera that was aimed straight up. The robot could then calulate it's current position relative to the beacons. Essentially you would have a micro-GPS system based on trilateration instead of triangulation.

One problem is I'm not sure that the resolution of the AVRcam would be sufficient for this.
Kinema
 

Postby Kinema » Fri Dec 03, 2004 10:19 pm

Although it would be nice to be able to implement such a positioning system in a device like the AVRcam because it is more or less self contained the robots I'm interested in could use a USB webcam and do the image processing on a PC like one of VIA's mini-itx boards.

It would be nice if infrared LEDs could be used but this would obvously require a camera sensitive to IR. A benifit of doing this on a PC is that multiple cameras at different angles could be used to cover a larger area.

Another thing is that I don't see why you would have to limit yourself to placing beacons on the celinng. They could be anywhere in three dimensions as long as they could be seen by at least one camera.

A larger system like this might require more horsepower then an AVR can supply as you would have to isolate the beacons from the environment (easier if they are IR and you utilize a filter to get rid of the majority of visible light), decode the beacon code and perform all the required trig.
Kinema
 
Posts: 1
Joined: Fri Dec 03, 2004 9:56 pm

Is phased lighting possible? Would it be hard?

Postby Guest » Mon Dec 06, 2004 1:59 pm

I've played some with laser pointers and USB and firewire cameras.

My plan is to aim some lasers at the floor in front of the camera.
If the camera doesn't see the laser dots in the right place in the image,
that means that the robot shouldn't go that direction. Either there
is an obstruction, so the laser is blocked, or the floor is missing
(top of stairs, edge of cliff, etc...).

The laser modules don't draw much current, so they can be driven directly
from an AVR pin, if one is available. Are any available? I want to start
with five lasers, left wall, left floor, center, right floor, right wall.
If the robot is following a wall on the right side, the right wall laser
should hit the wall, and the right floor laser should not.

In a phased lighting setup, alternate frames are captured with the
phased lights on. Even with many other confusing light sources,
such as children with laser pointers, the robot can distinquish
its own lights from the decoy lights. This requires that the light
controller knows when frames start and end, so it can turn the lights
on and off as appropriate.
Even if the AVRcam doesn't have any available I/O pins, the host computer can
control the lights, if it can get accurate frame timing information from
the AVRcam.

It would be easier if the red laser dot was always red in the image.
On my firewire cameras, a dim red dot is red, as it gets brighter, it
changes color. The USB camera suffered something similar, but with a
different sequence of colors. The cameras were adjusting the gain, white
balance, and other parameters in real time to maintain a "good" image.
So as the ambient light got dimmer, the laser dot got relatively brighter.
I could manually adjust the laser brightness to maintain a constant
relative brightness. If the AVR driving the laser has an available
timer, it could control the laser brightness with pwm.
Guest
 

Postby eddy » Sat Dec 11, 2004 10:16 am

You probably to use a second microcontroller to handle the robot and the detection work. AVR chips aren't expensive and it would give you a ton of I/O, interrupts, timers, etc without interfering with the operation of the camera.
Eddy Wright
Wright Hobbies, LLC
http://www.wrighthobbies.net
eddy
 
Posts: 3
Joined: Thu Dec 02, 2004 10:47 pm
Location: Near Chicago, IL USA

Phased lighting should be easy.

Postby hamjudo » Wed Dec 15, 2004 1:45 pm

I finished building my avrcam. Phased lighting should be easy. A couple AVR pins are exposed as sig1 and sig2. So I can use those to drive my lights.

I did a wee tiny bit of experimenting. My red laser dot is white or yellow in the captured image. It is surrounded by a red halo. I could track the red halo. The central dot is smaller than the noise filter.

I don't know if I'll have a chance before Christmas to set up gcc and try controlling sig1 and sig2. The yellow LED is also connected to sig1, so I could see about tracking that in a mirror.

I'm the guest above, I posted that right after I created my account. I didn't mean to post anonymously, I thought I was logged in as "hamjudo".
hamjudo
 
Posts: 6
Joined: Mon Dec 06, 2004 11:49 am
Location: Ypsilanti MI USA

laser tracking

Postby techcare » Wed Dec 15, 2004 2:16 pm

I have just done some priliminary tests with laser tracking

A red laser shows up only as a bright spot on the camera image, not red as expected. If I put a red filter in front of the camera lens all of the image shows up as shades of red except the laser spot which appers white, and can be tracked if the spot size is lagre enough. Anyone know Why?

I may have to adjust the tracking filter so it can deal with a smaller spot size to get more useful range. Right now I can track a 1/2" dia. laser spot to a distance of about 4 feet.
techcare
 

Bright enough red is yellow, brighter red is white

Postby hamjudo » Wed Dec 15, 2004 4:05 pm

The peak sensitivity for blue pixels is blue light, but they are also slightly sensitive to red light, the green pixels are a bit more sensitive to red.

There may also be some electrical leakage from adjacent pixels, but that is probably not as significant.

If you've got a green or blue filter handy, look at the laser light through that. Unless it's a really good filter, you'll see a little red through it. A 635nm red laser might go through a particular filter better than a 650nm red laser, or vice versa, but both wavelengths look the same to the human eye. I may be seeing more yellow than you because I have a different wavelength red laser.

In any case, for my application, which is short range sensing in doors, the red filter trick is an excellent idea. What is a good source for red filters?
hamjudo
 
Posts: 6
Joined: Mon Dec 06, 2004 11:49 am
Location: Ypsilanti MI USA

Postby Guest » Wed Dec 22, 2004 10:05 am

I have found an interesting site about laser distance measure with laser

http://www.pages.drexel.edu/~twd25/webcam_laser_ranger.html
Guest
 


Return to AVRcam Embedded System

Who is online

Users browsing this forum: No registered users and 14 guests

cron