Hello Guest it is April 26, 2024, 03:31:55 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TomHubin

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »
121
Video P*r*o*b*i*n*g / Re: setting up cammera and laser
« on: February 20, 2008, 01:13:56 AM »
Hello Mark,

> So if I understand correctly the ideal is to have a F-theta type optic in front of the CCd
> to bring the laser plane in focus over the entire CCD while still having the camera axis a
> something less than the ideal 90 degrees included angle

No. The lens is a typical imaging lens...an fTan(theta) lens if you want to put a math label on it. An fTheta lens is used to produce a constant velocity line scan from a rotating mirror. An fTheta lens will produce distortion if used for imaging.

I will say that a small angular field of view is preferred as that is simply a longer focal length and otherwise nothing special. A short focal length lens produces a wide angular field of view but usually also produces significant barrel distortion unless you buy an expensive wide angle lens. Try to keep the full angular field of view under 20 degrees where the tangent of the angle is nearly equal to the angle in radians. Focal lengths in the 10mm to 25mm range are much better than 3mm to 10mm range for low distortion. 

> Now I guess the challenge is to ... use sofware to find the center of a fuzzy beam
> image (less than ideal and sacrifice accuracy and resolution).

Bad plan. That is like saying that you will not use an antenna because you can digitally salvage a radio signal. There is only so much you can do with software to salvage a poor signal buried in noise.

> Anybody got access to ray tracing software?

I do.
 
> Might make finding the right layout and optics choice easier.

I have done this many times. However, I need the lens prescription to do a proper trace. That info is not included with a $30 webcam. I have reverse engineered one camera but cannot possibly reverse engineer the variety of cameras being used by this group.

When I did this for hire I started with customer requirements then chose the camera and its lens and the laser and its lens from optical engineering catalogs and designed everything else. Costwise these components put the project out of the amateur's reach.

But to see for yourself how bad it is when the ccd plane IS parallel to the lens while the laser plane IS NOT parallel to the lens you need only do a paraxial ray trace on graph paper or with line drawing software. If I can figure out how to post embedded drawings I will post some and describe the problem details.

Tom Hubin
thubin@earthlink.net

122
Video P*r*o*b*i*n*g / Re: setting up camera and laser
« on: February 19, 2008, 05:27:17 AM »
Hello Mark,

Thanx for commenting and questioning. I work best in an interactive mode.

Accuracy depends on being able to find the center of the image of the laser where it encounters the target surface. Noise, like illuminated background objects, can be a serious problem. Part of the solution is to make the laser diameter very small so that it is 100 to 10000 times brighter than any other light on the target surface. Another part is to be sure that the laser is to be imaged small on the camera ccd array while anything closer or farther is blurred.

That means that the laser plane must be imaged onto the ccd plane. A short depth of focus will permit a fine image of the laser while blurring any sources not originating in the laser plane.

Most of the drawings I have seen that explain the principle of laser triangulation show a single line being traced from the intersection of laser and target, through the center of the lens, to the ccd array. This is valid for a pinhole camera that does not have a lens but uses a tiny pinhole instead. Unfortunately a pinhole camera has low resoultion, low sensitivity, and high depth of focus...all undesirable characteristics.

When you use a lens you need to consider the point where the laser encounters the surface as a small source scattering light in all directions. A cone of that light passes through the lens and is imaged to a small area. If you trace several such cones you will find out that if the ccd array plane is parallel to the lens plane then the laser plane must also be parallel to the lens plane. If this is not so then most of the points in the laser plane will not be imaged onto the ccd array. Putting it another way, the "points" on the ccd array will be large blurs.

To use an inexpensive camera like a webcam, with the lens built in so that the lens plane is parallel to the ccd plane, it is necessary to arrange the camera and laser so that the laser plane is also parallel to the ccd plane.

Ideally the laser would point straight down the z axis and the camera would be off to the left and looking to the right. However, the camera's view would be blocked by the target.

A more practical solution would be for the assembled gauge to be rotated. Suppose the setup is rotated 30 degrees CW. Then the laser plane is 30 degrees CW of the z axis and the camera axis is 60 degrees CCW of the z axis. The ccd plane and lens plane are parallel to each other and to the laser plane. This also results in very little distortion since the only source of distortion is the lens itself.l

Certainly it is desirable to package in other ways. Like maybe have the laser pointed straight down the z axis and have the camera axis 30 degrees CCW from the z axis. This is the type that I used to design. The problem is that the laser plane is not parallel to the ccd plane. In order to form an image onto the ccd array it is necessary to separate the lens from the camera and mount it at an appropriate angle.

We can talk about those calculations if there is interest. But to use a prepackaged camera and lens it is essential that the laser plane be parallel to the ccd and lens planes. The lens should have the lowest fNumber you can arrange so that only the laser plane is imaged onto the array while background and foreground are blurred as much as possible.

If you do this then you can turn off the camera AGC and set the exposure time for 1ms or less. All of the foreground and background will be black since the exposure time is so short. The laser scattered from the target will be bright enough to be detected by the camera and it will only cover a few pixels. This allows for faster capture of frames and faster processing of the small data set.

I don't know what hardware arrangement Art and others are using. The written descriptions that I have seen have been vague and I have seen no drawings.

Tom Hubin
thubin@earthlink.net

123
Video P*r*o*b*i*n*g / Webcam Image Analysis Software
« on: January 24, 2008, 06:33:30 AM »
Hello,

I want to examine a single webcam frame for details. I need a list of camera horizontal, vertical, and intensity for each pixel. Or 3d graphs showing the horizontal and vertical as a plane and the intensity as mountains and peaks. I am primarily interested in getting info on laser width and intensity imaged onto the ccd array.

Even an output data file would work since I can 3d graph with MathCad or possibly with Excel.

Any suggestions for freeware or shareware?

Tom Hubin
thubin@earthlink.net

124
General Mach Discussion / Re: Using Mach3 on notebook
« on: January 20, 2008, 04:26:26 AM »
Yes you can use traansdigital PCMCI card to parallel port and will work perfectly. I have notebook Toshiba portege 3480 CT ,600MHz and 192 Mb ram memory, and I had same problem . This solved it witheout any problems. If you have some more question please do not hesitate to contact me. Best regards Raca Sasa

Are you able to use the video plug ins ok?

I ask because I borrowed a 700MHz Compaq Armada M700 with Windows XP. It has a built in parallel port that works fine but jogging is crippled after I load a video plug in. So I am still looking for a suitable shop laptop for Mach3.

Tom Hubin
thubin@earthlink.net

125
Feature Requests / Video Rotation
« on: January 16, 2008, 02:24:51 PM »
Hello,

I have mounted a 3Com Watchport/V camera on my Sherline 5410 CNC mill. Attachment was done effortlessly with Sherline's Z axis extension. The extension normally uses a 1/4-20 screw and I was able to use this to secure the camera looking down the Z axis.

Because the bottom of the camera is toward the rear of the machine the result is an inverted image.

The Mach3 Video Window plug in allows for the image to be flipped on the X axis to correct for a horizontal mirror image. In order to get my image displayed normally I also need the ability to flip on the Y axis. Both flips are equivalent to a 180 degree rotation which is what I need for the video image to appear normal.

Tom Hubin
thubin@earthlink.net

126
Hello,

I have mounted a 3Com Watchport/V camera on my Sherline 5410 CNC mill. Attachment was done effortlessly with Sherline's Z axis extension. The extension normally uses a 1/4-20 screw and I was able to use this to secure the camera looking down the Z axis.

Because the bottom of the camera is toward the rear of the machine the result is an inverted image.

The Mach3 Video Window plug in allows for the image to be flipped on the X axis to correct for a horizontal mirror image. In order to get my image displayed normally I also need the ability to flip on the Y axis. Both flips are equivalent to a 180 degree rotation which is what I need for the video image to appear normal.

Tom Hubin
thubin@earthlink.net

127
Forum suggestions and report forum problems. / Video Cripples Jogging
« on: January 16, 2008, 02:32:15 AM »
Hello,

I have a Sherline 5410 (metric 5400) 3 axis CNC mill and a PMDX controller that I normally run with TurboCnc version 4.x under DOS.

I am new to Mach3 and just exploring it until I am comfortable with the features that I need. Video capabilities are of especial interest to me.

I am running the latest Mach3 version on a 700MHz Compaq Armada 700 laptop under Windows XP. My Webcam is a 3Com Watchport/V #301-9010-01 with a 12mm lens. The Webcam is mounted on the Z axis pointed straight down at the XY table.

I have rapids set for 20 inches per minute. Jogging works fine until I select Video Window or 3d Video Probe from the Plug In list.

Video itself works ok but jogging speed is then about 1/25 inch per minute (maybe 1mm per minute?). The problem also persists after I exit the Video Window. Reseting motors does not help. To get jogging to work right I exit Mach3 and then start Mach3 again.

Video cripples both continuous and incremental jogging. I have not tried to move motors with any other method.

If I simultaneously run the camera vendor's software for the video and run Mach3 for the motors then all is well. That is, these two programs play nice together.

Tom Hubin
thubin@earthlink.net

128
General Mach Discussion / Re: Jogging buttons in Mach3
« on: January 14, 2008, 03:52:10 PM »
What I have is a DRO that I can enter the value I want, I also have my most common amounts that I use on 4 buttons, that way I known when I it the "0.001" button that it will always be set to that.

If you open up your screen in "Screen 4" or use a Flash screen I would recommend adding 4 buttons. You could use Mach codes as well:

Select Step value 1 Button 265  (1.000)
Select Step value 2 Button 266  (0.100)
Select Step value 3 Button 267  (0.010)
Select Step value 4 Button 268  (0.0010)

Alternatively, you can send the value and turn on Incremental mode using Flash script or VB script...if you need help with the script let use know.


Great. I have done enough C programming for DOS and Windows in the past that I can probably handle the programming itself. Where I need help right now is finding out how to copy, rename, and modify an existing screen. Is the script editor part of the Mach3 download? I have downloaded other stuff like the SDK but have not installed anything but Mach3 itself.

My main interest in Mach3 is for laser triangulation. I have some professional experience in laser triangulation hardware and software design. Right now I am concentrating on hardware but may want to fool around with the software later. I presume that this involves more than just scripts. Probably writing and linking to c or VB subroutines. Can you point me toward reading for the process of grabbing a single USB Webcam frame?

Tom Hubin
thubin@earthlink.net

129
General Mach Discussion / Re: Jogging buttons in Mach3
« on: January 13, 2008, 01:19:23 AM »
I am accustomed to TurboCnc and new to Mach3. In a few hours I had very little difficulty applying most of my TurboCnc configuration info to Mach3.

I only use incremental jogging.

I see that Alt-J is used to change the jog increment to the next smaller size. What key is used to change the jog increment to the next larger size?

Accidentally changing from the smallest to the largest jog increment can be disastrous. How can I disable jog increment table wraparound?

Tom Hubin
thubin@earthlink.net

130
Video P*r*o*b*i*n*g / Re: Improving Signal to Noise Ratio
« on: December 29, 2007, 12:28:28 PM »
Hello Art,

> I think I may need an attenuation filter as well as the laser typically overwhelms the cameras sensors.

From this comment and those made by others about seeing the background I suspect that your exposure time is way too long. I just did a quick experiment with a 3Com Watchport/V webcam and an old red laser pointer of unknown power but probably 1mw or 2mw. The laser pointer  produced a 2mm x 6mm spot about 10 feet away.

I can set the camera AGC to off/average/center/peak for various results. Newer versions of this camera go for about $150 to $200 but older versions on ebay go for about $35 including shipping.

AGC set to "average" results in exposure time of 1/40 sec. The background is very visible. The laser spot is too bright, too large, and speckle around it is obvious.

AGC set to "center" reduces the exposure time a little.

AGC set to "peak", which should key on the laser spot, reduces the exposure time to 1/80 sec. This makes the background a little darker but does very little to improve the laser spot characteristics.

With AGC set to "off", I set the exposure time to 1/1000 sec. Background blacked out and the laser spot was clearly visible but not nearly as large and the speckle was gone. Even with 1/10000 sec exposure  I could see the laser on a wall 10 feet away. Not real bright but clearly detectable.

So I am guessing that your exposure time is too long. You can use a neutral density filter to reduce the light but you may find that the AGC just increases the exposure time to compensate. Also, CCD dark current will produce a low signal that is proportionate to exposure time so short exposure time is better than adding a neutral density filter.

Tom Hubin
thubin@earthlink.net

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »