Hello Guest it is March 28, 2024, 05:32:02 AM

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

0 Members and 1 Guest are viewing this topic.

Re: setting up cammera and laser
« Reply #20 on: February 21, 2008, 05:28:39 AM »
Thanks again Tom

Looks like I have home work  ;D first thing will be to figure out how to pronounce Scheimpflug  ???

I'll try slapping something together to do some testing as it may help Art with his s/w debugging if he can separate problems caused by poor optics from those in his algorithms. I have a couple of cams with no labels but the internals have Sony components the other one is a Panasonic WV-BP554. and planned to use a USB video capture dongle I have used to stream video to the web (nothing kinky just the Sydney Hobart race start)

Maybe a bit of destructive reconstruction will be needed with the webcams to "fix" their optics alignment.

Thanks for the formulas as it gives me a starting point to get my head around the issues. Its interesting how magnification has an impact on the tilt angle.

So if I am doing the math properly... simplifying everything if one has a 45 degree object plane and a 1:1 magnification then the lens axis would be tilted 22.5 degrees to rotate the image plane to the CCd plane.

I don't have one but I think the cheap CCd cams one can get at Jaycar or Dick smith (like radio shack / Tandy) are focusable so the optics can be unscrewed and possibly modified.

Well I better go off and start reading my homework.

Cheers

Mark




Re: setting up cammera and laser
« Reply #21 on: February 21, 2008, 06:00:36 AM »
Ok so I need to make one of these :
http://www.oxfordlasers.com/imaging/accessories/scheimpflug_mount

An figure out all the relative geometry to get all the planes to intersect at the right place.

Now that I see how it works I realise that we used perspective corrective lenses  (keystone correction) when I used to do multi projector slide shows in a past job. So that's how they worked!

Brains a bit rusty as I haven't had to use it much in my present job... this is like a get fit routine for my head.

I'm sure with some of the talent around here that have built their own CNC mills etc etc knocking up a mount similar to the one shown should be a breeze.

Cheers

Mark
« Last Edit: February 21, 2008, 06:07:49 AM by mhasting2004 »
Re: setting up cammera and laser
« Reply #22 on: February 21, 2008, 06:37:21 AM »
Hello Mark,

> Looks like I have home work  ;D first thing will be to figure out how to pronounce Scheimpflug  ???

I have had that problem for years. I still have that problem.

> I'll try slapping something together to do some testing as it may help Art with his s/w debugging
> if he can separate problems caused by poor optics from those in his algorithms.

I plan to do the same. Design for a simple non-Scheimpflug layout is nearly complete. I hope to machine the pieces in a few weeks then send a completed laser triangulation gauge to Art to evaluate. I hope to convince him that he needs to disable AGC and set exposure time for less than a millisecond to make all disappear except the laser.

> Thanks for the formulas as it gives me a starting point to get my head around the issues.
> Its interesting how magnification has an impact on the tilt angle.

BTW, that lateral magnification is only valid at the points where the optical axis crosses the object and image planes. It is just a useful number that you can relate to conventional optical layouts. The actual linear magnification needs to be calculated parallel to the object plane and its corresponding point parallel to the image plane. This number will vary with distance from the optical axis.

> So if I am doing the math properly... simplifying everything if one has a 45 degree
> object plane and a 1:1 magnification then the lens axis would be tilted 22.5 degrees
> to rotate the image plane to the CCd plane.

I am not sure what you are saying but it does not sound right. If you have 1:1 magnification then the image plane tilt with respect to the optical axis must be equal to the object tilt with respect to the optical axis. Try laying it out with a paraxial ray trace on graph paper.

Start with all planes vertical. Object on the left, image on the right, lens between them, light traveling from left to right, object distance equal to image distance equal to twice the lens focal length. Then rotate the object plane 45 degrees CW about its center. Trace from the object end points through the lens to the image end points. You will find that the image has rotated 45 degrees CCW. In this particular arrangement the image plane is perpendicular to the object plane.

In a triangulation gauge you are more likely to have latmag between -0.1 and -0.5.

> I don't have one but I think the cheap CCd cams one can get at Jaycar or Dick Smith
> (like radio shack / Tandy) are focusable so the optics can be unscrewed and possibly modified.

I have reverse engineered the optical and mechanical essentials of the 3Com Watchport/V. This is a nice security webcam that lists for $150 but regularly auctions on ebay for $10 to $35, including shipping. I like the 12mm focal length f/2 lens. You take pot luck on which lens comes with it but you can get lens sets for it on ebay. The lens thread is M12-0.5. The active CCD area is 3.6mm x 2.7mm. And it is very close to CS format as I measure with calipers. Four Torx T9 screws hold the covers together and two Torx T8 screws hold the lens mount in place. Windows drivers and standalone software are sometimes included on CD but it is also on the internet for free.

> Well I better go off and start reading my homework.

Be careful! If you fall asleep while reading about Scheimpflug you will have Scheimpflug nightmares. ;-)

Tom Hubin
thubin@earthlink.net
Re: setting up cammera and laser
« Reply #23 on: February 21, 2008, 06:56:18 AM »
Hello Mark,

Ok so I need to make one of these :
http://www.oxfordlasers.com/imaging/accessories/scheimpflug_mount

In principle, yes. In practice, no.

The camera above is adjustable to accommodate any angle that the photographer needs. For a laser triangulation gauge there is only one angle and that is determined by your design.

A typical design would have the laser pointed straight down (parallel to z) and the lens up to the left 30 degrees CCW from the z axis. This would mean that the object (the laser) is tilted 60 degrees CCW from perpendicular to the optical axis. Assume you have a lateral magnification of -0.2. Then the ccd array would be tilted 19.107 degrees CW from perpendicular to the optical axis. Plug the CCD array into the drawing and trace the endpoints through the lens center to see where they intersect the laser.

This assumes that you know the lens focal length and that the lens is thin. To really nail it down you need to ray trace through the lens prescription...if you can get the prescription.

Are you in Australia?

Tom Hubin
thubin@earthlink.net
Re: setting up cammera and laser
« Reply #24 on: February 21, 2008, 07:09:27 AM »
The penny, I hope, drops at last!
I have been watching this thread as I have an interest in scanning and purchased a line laser but I was having a problem understanding this discussion. Scheimpflug! Now I can relate it to photography. In the days of technical plate cameras, it was usual to have a rising front lens plate or a tilting back plate holder. The idea was to be able to get architectural photos without the building looking as if it tapered to the top of the picture. Olympus even did a fancy lens for their OM series SLR cameras to achieve this effect.
You could also get the same correction by tilting the baseplate of the enlarger when printing but you needed to stop the lens right down to get the depth of field to keep the focus sharp.

So, please tell me if I have got this right.

The center of the object, lens and CCD should all be on one line. The planes of the object, lens and CCD should all intersect at one line. The problem then is to set the webcam at 45 degrees and make a lens mounting that fulfills these conditions. This should be only a matter of allowing for some lens tilt and ability to bring the lens onto the centerline - a relatively easy mechanical design problem. This will enable the laser line to be in focus across the CCD.

Or have I got it wrong again!

Ian
Re: setting up cammera and laser
« Reply #25 on: February 21, 2008, 04:25:40 PM »
Hi guys

The penny dropped for me when I saw the plate cameras also in the Wikipedia description of Sheimpflug (Did this guy invent his name just to make it hard for the rest of us to say it or what!?!)

Yeah Tom I'm a Cunuck in the land down under.

The problem between in principle and in practice makes me think an adjustable (although not with a huge amount of range) mount may still be desirable that way if you don't have all the specs for the optics you can shoot for ball park then tweak to get it spot on like I believe you do with plate cameras.

Happy testing.

Cheers

Mark
Re: setting up cammera and laser
« Reply #26 on: February 21, 2008, 08:53:17 PM »

> In the days of technical plate cameras, it was usual to have a rising front lens plate

This method keeps the object, lens, and image planes parallel. This method introduces no distortion. However, the lens must be optimized for wide angle fov. That can mean a very expensive lens.

> or a tilting back plate holder.

This method introduces distortion due to perspective. However, the lens is conventional and the depth of focus need not be high. Hence it is a purely mechanical solution.

> The idea was to be able to get architectural photos without the building looking as if
> it tapered to the top of the picture.
> Olympus even did a fancy lens for their OM series SLR cameras to achieve this effect.
> You could also get the same correction by tilting the baseplate of the enlarger when printing
> but you needed to stop the lens right down to get the depth of field to keep the focus sharp.

I think that the solution for printing is to reverse the process by tilting the film and print paper appropriately to reverse the distortion back to normal.

> So, please tell me if I have got this right.

Yes, but the devil is in the details.

> The center of the object, lens and CCD should all be on one line.

Not actually the centers. The optical axis is perpendicular to and centered on the lens. The optical axis intersects the object and image planes but generally not in their centers.

> The planes of the object, lens and CCD should all intersect at one line.

Correct.

> The problem then is to set the webcam at 45 degrees

or whatever angle you are designing for.

> and make a lens mounting that fulfills these conditions. This should be only a matter of allowing for some lens tilt and ability to bring the lens onto the centerline - a relatively easy mechanical design problem. This will enable the laser line to be in focus across the CCD.

Correct.

I would choose 60 degrees myself. Nothing wrong with 45 degrees but 60 degrees makes a smaller gauge, although it introduces more distortion than 45 degrees. So the choice of angle depends on your accuracy needs over the gauge working range.

BTW, I like to orient the lens so that its optical axis bisects the angular FOV. This minimizes lens aberrations by keeping the angle of incidence on the lens as small as possible.

Tom Hubin
thubin@earthlink.net
Re: setting up cammera and laser
« Reply #27 on: February 22, 2008, 07:06:36 PM »
Tom,

Thanks for your input. I am well out of my comfort zone on this subject and will just have to make a test rig to get a feel for the problems. Art's scanning plug-in for Mach 3 and your technical posts have opened up a very interesting "can of worms."

Ian
Re: setting up cammera and laser
« Reply #28 on: February 23, 2008, 07:20:17 AM »
Hi Guys

Am I right in thinking that my camera/lens mount should have the pivot point around the ccd plane? The lenses I have are variable focus which  (again if I'm reading this right) will have the effect of pivoting the image plane so I may be able to use this to fine tune the focus across the whole ccd. The other thing this Panasonic camera has which may be helpfull in alignment is the ability to move the CCd inside the camera independently from the body of the camera. I also assume you would want to open the aperture fully to decrease the DOF.

Have done a few really rough tests to get my head around the camera /lens / object alignment and voila it actually works :) I got the video into MAch also using a cheap usb video converter (Kworld USB2800 D)

Tom do you know off hand the formula for theoretical spot size? From memory it had the focal length the aperture and the wavelength as a ratio which would give you the minimum waist dimension for a given beam. I only remember this as that is why the went to blue wavelength lasers as they can achieve a smaller spot (hence greater capacity on a DVD) and may make a choice on which laser wavelength (colour) would be better.
Is this the same for a line generator optic? Does it need to be collimated to a small size or just have a long but narrow waist of a focused beam make it thinner. From what I can make out the maximum depth of measurement will be around 2" so as long as its tight for that much will a focused beam be preferable? Or is any of that really that critical given the design envelope we are working under?

What sort of resolution do we want to achieve?


I know for our machine vision systems that vibration was a real quality killer so a sturdy mount would be advisable.


While I'm thinking about it, did Art figure out what was causing that Z-stepping in his scans? Occurred to me that if the step distance was the same as his FOV for each successive pass that it may have been due to a skewed laser plane. The beam would need to be perfectly vertical in the image (assuming camera on RHS and laser on LHS and scanning left to right) if not the measurements would not be linear across the CCD.
If I was to draw a mental picture it is like you are trying to draw a vertical line on a piece of paper with just 1/2" segments. If you draw each segment perfectly vertical you get a straight line if the segments are tilted you get a staircase. The scan he did of his hand looked like a staircase.

I hope Art is following this thread as there are some good ideas being bounced around.

Anyway just a bunch of off the top ideas and comments. BTW some may be way off the mark but if it promotes discussion then its not a waste on time.

Cheers

Mark
Re: setting up cammera and laser
« Reply #29 on: February 27, 2008, 08:43:57 AM »
Hello Mark,

Sorry about the delay in responding. For now I just have a few minutes for the easy questions.

> Am I right in thinking that my camera/lens mount should have the pivot point around the ccd plane?

Yes. That point will be near the center of the array but usually a little off center. There are choices that you can make but I like arranging the optical axis as the bisector of the angular field of view. That minimizes the effect of lens aberrations by keeping the angle of incidence on the lens as small as possible.

> The lenses I have are variable focus which  (again if I'm reading this right) will have the effect  of
> pivoting the image plane so I may be able to use this to fine tune the focus across the whole ccd.

Do you mean variable focal length or just movable for best focus?

> The other thing this Panasonic camera has which may be helpfull in alignment is the
> ability to move the CCd inside the camera independently from the body of the camera.

Is that movable in z for best focus or is that movable to shift the center in the horizontal and vertical?

> I also assume you would want to open the aperture fully to decrease the DOF.

Yes, assuming that the lens aberrations are small at full aperture. A professional grade lens is usually pretty well corrected at full aperture. The $10 webcam lenses might be a bit fuzzy at full aperture. But then, a cheap webcam lens won't usually have an adjustable aperture.

> Have done a few really rough tests to get my head around the camera /lens / object
> alignment and voila it actually works :) I got the video into MAch also using a cheap
> usb video converter (Kworld USB2800 D)

Great.

> Tom do you know off hand the formula for theoretical spot size?
[snip several laser related questions]

Yes but there is a lot to discuss just on laser focusing so I think I will start another topic for that. Might be a couple of days before I sit down to do that. Meantime, if you are eagar, you can look up the following subjects:

LaGrange Invariant (sometimes called Optical Invariant)
Etendue
Photometric Brightness
Optical Throughput

 > What sort of resolution do we want to achieve?

The real question is "What sort of resolution do YOU want to achieve?" Each of us has some project in mind and probably no two of us agree on the necessary range and resolution. In general, with inexpensive webcams and laser modules, I would expect to get something close to 1% of the working range. I would loosely define working range as the range parallel to the z axis.

With better cameras and laser modules and lens choices I would expect more like one thousandth of the working range. That takes the price out of the amateur range but all of the principles are the same. So this is an inexpensive way to learn how laser triangulation works.

> I know for our machine vision systems that vibration was a real quality killer so a sturdy mount would be advisable.

Sounds reasonable but I don't expect my Sherline mill to vibrate much. The machine should not be in motion when the image is formed just before grabbing the frame.
 
> While I'm thinking about it, did Art figure out what was causing that Z-stepping in his scans?

Art described his setup as pretty arbitrary. I don't think the laser is imaged onto the CCD array. The calibration procedure and the distortion correction math could also be off. I don't really have enough info on his setup so I can only speculate.

> Anyway just a bunch of off the top ideas and comments. BTW some may be way off
> the mark but if it promotes discussion then its not a waste on time.

I think you are catching on just fine.

Tom Hubin
thubin@earthlink.net