No announcement yet.

Webcam for optical comparator?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Webcam for optical comparator?

    Granted, it would need some calibration, but has anyone tried such a thing?

    I know David Coffer's done the center finder with one, but has anyone used one to do QC tasks? How hard would it be to interface to a couple scales (even simply HF calipers) for on screen readout of measurements?

    I'd like to have a comparator, but they still seem to fetch a wad of cash at auctions, and I'd much rather not dedicate the space to house the real deal. You could generate profile overlays in paint applications to check profiles, or even use your dxf's for the parts themselves.

    Does something like this exist?

  • #2
    Do a forum search on 'meazure'. Then do a Ctrl-f page search on 'meazure' to locate Lazlo's post on this downloadable utility.

    I tried Meazure on a scanner generated image of some lathe bits and it worked OK for angular measurements of the cutter profiles. I didn't attempt an X-Y calibration or any linear measurements. Depth of focus wasn't great and it looks like some experimentation with a tripod mounted digital camera in telephoto or macro mode might prove fruitful.

    David Merrill


    • #3
      I was envisioning much more similarity to a dedicated piece of equipment. A tripod would do it, but you'd need to re-calibrate every time you moved it. However, if you rigged up a webcam with a fixed location at a fixed distance, you could set it up on anything and get pretty repeatable and reasonably accurate results. If your parts dimensions changed much, you could put a scale on the mounting point for the camera to properly offset that distance from the face of the part being read.

      The other advantage of the fixed focal length is that you could adapt your lens to the needed focus and simply leave it. The webcam I picked up for "shop use" has such a poor frame rate it's useless for shooting motion. At the same time, I paid so little for it, I don't care if it suffers premature mortality. I'd never think of leaving my digital camera out in the shop while I was actually working.

      Calibration of the depth from the POV would eliminate the need for scales, and it looks like that's easily do-able with Meazure.



      • #4
        You could mount it on a mill with DRO. Use the centerfinder utility to locate edges or other features and the table movement and DRO for measurements.

        For stand alone application, mount the camera above an x-y table and put a DRO on the table. This way there is no problems with calibration or alignment of the camera.

        I am going to try this when I get my shop set up. Currently have a comparator that I need to get rid of. It weighs about a ton and takes up as much room as a Bridgeport.
        North Central Arkansas


        • #5
          Mounting it on a mill would defeat the purpose in my application.

          The benefit of using software to measure your "image" is that you can calibrate it down to the pixel - that means you can have a pretty darn big part under the lens and still get some good size data as long as you did due diligence in calibration. At the same time, that eliminates the need for the x-y table and scales entirely.

          Depth of field (as was mentioned) could be an issue with a cheap camera (like the crappy web cam I have planned for mine), but you could easily buy a nice 8-10 mega pixel camera for 1/4 what a comparator costs used and be back in the game at a huge discount. Proper lighting will have a big impact on results as well (kinda like a real comparator).

          I'm not sure when I'll get to experimenting with the concept, but I'm pretty excited about the possibilities Meazure offers.


          • #6
            I downloaded that software to check it out. It's nice for what it does but it will not compensate for the distortion normally found in any camera lens when taking a macro shot especially. The problem is that the distortion isn't linear and produces a "fish eye" effect with the amount of distortion growing the further the distance from the centre of the field. Also, even the slightest amount of distance from the normal axis of the object vs the lens normal produces it's own perspective distortion.

            Here is an example of an image taken off axis using a high quality Nikon lens. The block really is square. The normal axis of the lens is aligned with the bottom edge near the bottom left corner. Not only is there a perspective distortion but the aspect ratio is no longer square because of foreshortening.

            What is most special about the lens found in an optical comparator and what makes it very expensive is that the lens has an almost perfectly flat field. That means it shows no distortion of size and shape throughout the working area of the image.
            Last edited by Evan; 06-11-2009, 10:29 PM.
            Free software for calculating bolt circles and similar: Click Here


            • #7
              You'd get the same distortions if you parked your block at those angles in a comparator too... Maybe not the fish eye, but you wouldn't get a precise distance measurement either.

              I would only use a macro lens to compensate for focal length issues. The way to eliminate the field errors is to increase the distance from the lens (something you can't do on a comparator).

              So realistically, how big is your working envelope on the comparator? Maybe 3x8"? Hold the same standard to your working space with the camera and see how much error you have when you set up the frame correctly.

              As was mentioned, a tripod is about bare minimum for making this work. You'll need to shoot straight down onto the part and it will need to be almost dead center to be highly accurate. To encounter the issues you bring up, it would already be well beyond the functional capacity of a comparator that any of us could possibly house let alone pay for.

              One of the things I'll be checking when I start the experiment will be the trig error from the POV. I won't be limiting the experiment to the crappy web cam, I have a decent 5mp camera that'll also participate, and I'll borrow the mrs' 7mp camera as well (even though it has crappy optics).


              • #8
                It all depends on the amount of uncorrected error you can tolerate. I chose that image because the error is enough to easily see. The flat field of a comparator lens is a very real feature compared to a regular camera lens. The main thing is that the software can't correct for nonlinear errors such as perspective foreshortening. All you need to do to calculate that is to take the sin of the angle off axis to the part. Software could be written to do that on a polar coordinate field as long as the distance to the part remains constant.
                Free software for calculating bolt circles and similar: Click Here


                • #9
                  As Evan noted, distortion is a problem, even with fairly expensive photographic lenses. In lower end digital cameras, barrel and pincushion distortion can be quite severe. We have several Kodaks that have very bad barrel distortion and a Nikon that is much better but still not up to snuff for measurement. All were under $300.

                  Edmund Optical has telecentric measuring lenses and a good app note on them. It may give some interesting reading.

                  You might also want to try getting a flatter field by zooming your part from a distance. The rays are taking a much straighter path thru the optics and it might greatly reduce distortion. Haven't tried it yet though

                  For any sort of measurement accuracy, you will probably need additional magnification before hitting the imager (webcam). This will be related to the pixel size and spacing within the camera's imaging chip. Edmund has also had some good notes on this topic in the past and a search there for ccd magnification should locate something. Once you magnify, your field of view will shrink proportionally and you may only see a small area of your part at a time unless it is small.

                  Last edited by nheng; 06-11-2009, 11:11 PM.