Hello Guest it is June 15, 2021, 02:00:44 AM

Author Topic: setting up cammera and laser  (Read 49136 times)

0 Members and 1 Guest are viewing this topic.

Don C

• 25
setting up cammera and laser
« on: December 01, 2007, 02:00:33 PM »
How is the camera to laser setup. Is the camera and laser running parallel to the X axis (X axis moving front to back (gantry)). What should the angle be of the camera and the laser. Is there any setup notes yet?
Don

TomHubin

• 141
Re: setting up cammera and laser
« Reply #1 on: December 03, 2007, 12:09:00 PM »
Hello Don,

The laser line generator is pointed down, parallel to Z axis, oriented in the YZ plane.

The camera is located a few inches to the left of the laser. It is pointed down and to the right so that it crosses the laser plane at an angle.  A forty five degree angle is a good place to start experimenting.

The goal is to image the laser, and nothing else, onto the camera detector so that the laser ZY plane is imaged onto the camera HV plane. That is, the Z dimension of the laser is imaged onto the camera horizontal dimension and the laser Y dimension is imaged onto the camera vertical dimension.

This is shown at http://www.sensorland.com/HowPage056.html, except that this view shows the camera to the right of the laser.

Try to find a camera with a small angular field of view. Let's say, about 10 degrees. That will image about a 1 inch section of the laser onto the full size of the detector. If you use a wide angle camera, let's say 45 degrees, then you will probably image a 4 to 6 inch length of the laser in the Z dimension. Accuracy is some fraction, possibly 1%, of the full section imaged. So you want to image a small section to get some accuracy.

Also, short depth of field is desirable. Pinhole type webcams focus over a huge range. Let's say from 12 inches to 12 feet. You want points in the laser ZY plane to be in focus on the camera detector and you want everything else out of focus. That is, if something is closer to the camera than the laser or farther from the camera than the laser, you want that feature blurred. You cannot exactly achieve that with a prepackaged camera and lens, but you can come close. To shorten the depth of field use a larger diameter camera lens. That will collect more light from the laser while spreading background light out.

http://www.multires.caltech.edu/pubs/DGPCourse/CurlessChapter.pdf pages 4 and 5 show the correct orientation of the detector as NOT perpendicular to the lens optical axis. This is known as the Scheimpflug condition. (Say that fast three times). This is the way that the pros do it to get high accuracy. This can be done if you mount the camera separate from the lens.

Tom Hubin

Don C

• 25
Re: setting up cammera and laser
« Reply #2 on: December 03, 2007, 12:27:50 PM »
Don

DavidCousins

• 60
Re: setting up cammera and laser
« Reply #3 on: December 03, 2007, 01:08:37 PM »
Tom,
I went back to Arts pictures to confirm your description and wow you are correct the laser line is in the YZ plane.   I thought the laser line would be in the XZ plane.   In another thread, Art indicated that the gantry movement was in the Y direction, which doesn't make sense to me.   I thought we'd want to step in a direction perpendicular to the laser line.

What am I missing?
Dave

TomHubin

• 141
Re: setting up cammera and laser
« Reply #4 on: December 03, 2007, 02:52:02 PM »
Hello Dave,

You have to move a small amount (say 0.010 inch) in the X direction, stop, then grab the frame, then find the spike in each horizontal camera line. This produces a set of (V,H) camera coordinates which will uniquely map to (Y,Z) machine coordinates. The X value is taken from the machine.

When you have completed the X scan you move back to the start of X and over to the next Y value. The Y increment is the width of the track that you just took. That could be a quarter inch or several inches depending on your setup.

You are raster scanning your part in X and Y with small steps in X and large steps in Y.

In order to create the cloud of points in XYZ coordinates you need to know how to map the (V,H) camera coordinates to (Y,Z) machine coordinates. This requires some calibration of the camera and laser combination.

One simple method is to move the head of a pin in the YZ plane of the laser. The pin head should image to a small area on the camera. You could move 0.1 inch steps in Y and Z and find the center of the hot area on the camera for each (Y,Z). This is probably not the most accurate method but it is easy to demonstrate.

Tom Hubin

DavidCousins

• 60
Re: setting up cammera and laser
« Reply #5 on: December 03, 2007, 04:18:12 PM »
Tom,
The light bulb is not burning to brightly right here.

Your description makes me think that the program scans a narrow camera view in the X direction, then translates in the Y, a distance equal to the narrow view.  Then repeats the X scan.  How am I doing?

Makes me think of a Zamboni cleaning ice, except all scans are directly adjacent to each other.
Dave

Don C

• 25
Re: setting up cammera and laser
« Reply #6 on: December 03, 2007, 04:24:15 PM »
I think the line should go across the tablle (from left to right) and the camera travels with the light from front to back. Correct or not?
Don

TomHubin

• 141
Re: setting up cammera and laser
« Reply #7 on: December 03, 2007, 06:11:27 PM »
Hello Don,

If you arrange the laser so that it is on the left end of the table with laser light traveling from left to right then you will be locating points on the left side of your part. Not what most folks want.

However, I think that what you are trying to do is make the laser plane parallel to the detector plane. This is the way the camera was meant to be used. However, getting data on the left side of a part is not popular.

It would make more sense to have the laser pointed down so that the light is in the YZ plane. Then locate the camera on the left end of the table looking to the right and focused on the laser YZ plane. This would allow you to measure the height of points on a surface. However, most points would be occluded from the camera. That is, laser light hits the part at some point but the light scattered from that point often cannot get to the camera.

So you raise the camera above the surface then rotate it clockwise so that it is pointing in the neighborhood where the laser light hits the surface. This works fine for a pinhole camera but not so well for a camera lens of significant diameter.

As the camera lens diameter increases it becomes apparent that the plane of the laser is not imaged on the detector unless the detector is also rotated an appropriate amount. I have formulas and graphical methods for all of that but I want to avoid the math until the principle of operation is established.

Some of this is explained here:
http://www.multires.caltech.edu/pubs/DGPCourse/CurlessChapter.pdf pages 4 and 5 show the correct orientation of the detector as not perpendicular to the lens optical axis. This is known as the Scheimpflug condition.

Tom Hubin

TomHubin

• 141
Re: setting up cammera and laser
« Reply #8 on: December 04, 2007, 10:20:13 AM »
How is the camera to laser setup. Is the camera and laser running parallel to the X axis (X axis moving front to back (gantry)). What should the angle be of the camera and the laser. Is there any setup notes yet?
Don

Hello Don,

Try this experiment to demonstrate the concept of laser triangulation.

Install a simple laser pointer (not a line generator) in the spindle. Use a drill chuck or endmill holder or collet. Whatever works. Battery operated pointer might be easier to avoid wiring difficulties. Otherwise, figure out how to route laser pointer wiring. DO NOT RUN THE SPINDLE MOTOR.

The laser is pointing downward and hitting a piece of white paper on the XY table. You see a bright red spot where the laser hits the paper.

Attach the camera somewhere on the Z axis and pointed down at the bright red spot where the laser hits the paper. Use tape or rubber bands to lash the camera into place. You should see the bright spot somewhere on the camera monitor screen.

Move the Z axis up and down and observe that the bright spot on the monitor moves. For every Z position the spot appears in a unique location on the monitor.

Tom Hubin

You probably also see the table and whatever happens to be in the field of view of the camera. Turn off all of the nearby lighting. This will make the table and other stuff disappear but the laser spot is still visible.

Again, move the Z axis up and down and observe that the spot moves on the monitor. Other than the laser spot, the screen should be pretty dark.

Tom Hubin