Using the camera to find a laser dot

headingwest

Member
Licensed User
Longtime User
Hi,

For my robot I'm considering the best way to use the camera to locate a red laser pointer dot.

So I want to take a picture and then scan for the red dot.

So far I can only think to use the CameraEx and the JPEG library to do this, but this uses a lot of resources.

Does the camera always need a "preview" and initialize to a panel? I don't need to see the picture. I just want to take a picture and find the dot as fast as possible.

Is there an easy way to access the raw image data in a stream, before it gets to jpeg format?

Thanks for your help,

Jim.
 

kolbe

Active Member
Licensed User
Longtime User
Last time I used CameraEx it needed a preview panel. I just hid it off the screen because I didn't need it either.

I'm curious... do you plan an using OpenCV to find your dot. Still hoping/waiting that someone may make an OpenCV library one of these days. That would open up all kinds of possibilities in B4A.
 
Upvote 0

headingwest

Member
Licensed User
Longtime User
Still hoping/waiting that someone may make an OpenCV library one of these days.

Hi Kolbe, unfortunately I don't have enough skills for creating that library, it would add a lot to VB4A.

I'm also considering using something like this:
OV7670 300KP VGA Camera Module for Arduino | eBay

And using the IOIO board to talk to it, then process the I2C data through the Android device. That's a bit of a waste when androids already have working cameras.
 
Upvote 0

kolbe

Active Member
Licensed User
Longtime User
Hadn't seen that one. I2C interesting. I'm using the linksprite with the IOIO. I've got it working but only one VGA photo every 3 secs or so. Was hoping for a bit faster. The pic quality is good however and works well with IR for low light conditions. My code eventually crashes too if I let it take successive pictures. The timing is a bit tricky with the IOIO and my error handling isn't robust enough.

I might give opencv a try one day but it is not on the top of my projects list.
 
Upvote 0

headingwest

Member
Licensed User
Longtime User
My current plan is to use a picaxe 20X2 chip to process the camera data and find the dot. The laser dot is for precise distance measurement. The 20X2 can also be set as an I2C slave, so the IOIO will just fetch the data from the 20X2.

This is for a robot, so the 20X2 might also capture the bump sensors and possibly the HR04 ultrasonic sensor.

This all goes back to the IOIO device for decision making and mapping the area with the huge memory available. The IOIO will probably control the motors and servos directly.

Plan is there but the execution will be interesting.
 
Upvote 0
Top