jmltinc Posted July 4, 2016 Report Share Posted July 4, 2016 Hi Folks, Newb to Lava and Machine Vision. I hope these questions have not been posted before. We have products (RF amplifiers) that are roughly 20" square. I need to image for several things, the most demanding perhaps - edge detection with a tolerance of +/- .8mm. I cannot sell my company on a system that will break the bank and my math says I cannot image the complete unit, but must take it in bites. Additionally, we make several products of different depths, so presumably either the product or the imaging system must be adjustable in the Z-axis with adequate precision. After weeks of reading about selection of sensors and lenses, I haven't answered a basic questions: 1) For resolving to .8mm, what is a reasonable maximum FOV to expect? 2) What is a "normal" Working Distance in such an application? To capture 20" with a 35mm lens, I am at 3'... 3) I think at one point I came up with 11,000 horizontal pixels to achieve what I want to do. Not going to happen either with the imager or processing. What suggestions would be a work-around? Multiple cameras; rotate the product beneath the camera and image quadrants; line scan? While I am trying to walk before running, it is obvious all I am doing is stumbling. All thoughts and suggestions are appreciated. -John Quote Link to comment
MikaelH Posted July 4, 2016 Report Share Posted July 4, 2016 If I want to do accurate measurements I always go with a telocentric lens. Of cause to buy one that can cover 20” is too expensive, but maybe consider a smaller FOV and an XY stage/gantry for the camera to move around over the object. Quote Link to comment
ensegre Posted July 5, 2016 Report Share Posted July 5, 2016 20*25.4/0.8=635. How do you get to 11000? Let's say you allow for some PSF blur and you overresolve your details x4 (which is already much). You'd be then in the range of a 5Mp sensor, nothing special these days. If your illumination conditions and sensor noise are good, you may even able to rely on subpixel interpolation, and get along with a smaller resolution. Normally the working distance is mainly dictated by the space available, based on that and on the sensor size you chose a lens with a suitable focal distance and resolution power. If you are designing the system and have some freedom on the working distance, go for a good lens first and use the resulting distance. Are your objects more than a cm deep? Then I subscribe to telecentric. I don't have rules of thumb, but I would say very tentatively that more than say 5% depth/working distance requires either a large f stop or telecentric. Translation stages add a mechanical complication. Whereas, you can achieve a reasonably precise measurement with deforming optics and fixed point of view, if you calibrate it geometrically. Quote Link to comment
jmltinc Posted July 5, 2016 Author Report Share Posted July 5, 2016 MichaelH, thank you for the X-Y suggestion. I thought that too, but was hoping for a simpler solution. ensegre, I did use 4px in my calculations. It was a week ago, and my mind has been cluttered with everything from this steep learning curve, I may have made a mistake on the calc or just don't remember (exactly) the pixel count. I am glad that you have allayed my fears of the working distance being a problem. I have no restriction on that. Still: Can I achieve .8mm resolution over a FOV which is ~500mm? Also, you asked if my objects are over a cm deep. I am imaging the placement of PC boards inside chassis of differing depths from 1 1/4" to up to 3". Also, imaged (looking into the open chassis) are machined cut-outs (reliefs) which allow for placement of SMT components on the underneath of the PCB. If the reliefs are not properly machined, the components are shorted. This is really where I need the .8mm specification. Thanks, John Quote Link to comment
ensegre Posted July 5, 2016 Report Share Posted July 5, 2016 (edited) 6 hours ago, jmltinc said: ensegre, I did use 4px in my calculations. my bet is that you could even tuck along with less than 2px/800um, if I understand your problem. 6 hours ago, jmltinc said: Can I achieve .8mm resolution over a FOV which is ~500mm? I presume 800um lateral resolution, not vertical. I'd say with any decent lens for sure - provided the camera is properly centered on the object, the object is plane, the focal surface of the lens is plane, the lens is well focused, etc. 6 hours ago, jmltinc said: Also, you asked if my objects are over a cm deep. I am imaging the placement of PC boards inside chassis of differing depths from 1 1/4" to up to 3". Do you need to keep in focus different PCBs/different cut out recesses at different levels at the same time? If so it is more a question of depth of focus than of FOV. Otherwise adjustable focus may be simpler to motorize than vertical translation. With a telecentric lens you'd also keep the same magnification at any depth, is that as important to you? Edited July 5, 2016 by ensegre Quote Link to comment
jmltinc Posted July 27, 2016 Author Report Share Posted July 27, 2016 Thank you ensegre for your response and my apologies for my tardy reply. I had a hot project and had to table everything else... A - I am new to this, so let me apologize for my ignorance. Everything I have read suggests 4px. When you say I could make do with 2px/800um are you saying I might require only 2px for a sensor's pixel size of 800um? A - products are 19" wide and vary in length from ~7" to 20". My plan was to image the width and take the length in bites (more than one image). A - I need not image cutouts or other features of different heights at the same time for a single product, but the products that will be imaged have the ROI at different heights, so I guess the answer to your question is yes. I understand DOF is a concern and I would like to avoid having to reposition the camera in the Z axis. As the difference between products can be a couple inches, I expect focus will have to be varied. I was unaware that there was a capability to control focus automatically with Machine Vision Cameras/lenses. May I impose and ask the math for choosing the components I require? I have seen all the formulae, but the individual equations are dependent upon another. I truly do not know where to start. Do I start with sensor size/pixel size? Depth of Field? Field of Vision? Yes, I am pathetic... Thank you for sharing your knowledge. John Quote Link to comment
ensegre Posted July 27, 2016 Report Share Posted July 27, 2016 (edited) 1 hour ago, jmltinc said: A - I am new to this, so let me apologize for my ignorance. Everything I have read suggests 4px. When you say I could make do with 2px/800um are you saying I might require only 2px for a sensor's pixel size of 800um? Not exactly. Sensor pixels are usually just a few um wide; different sensors have different sizes. The demagnification of your lens has to be such that it projects a detail of 800um length over 2 or 4 or so many sensor pixels. In my view, simplifying, if the optic system is fine enough, and you have say a white pixel followed by a black pixel, and the centers of the pixels image two points which are 800um apart, you have enough basis to say that the edge falls inbetween. If you have a white, a grey and a black pixel, you'll say that the edge falls somewhere close to the center of the second pixel. The whiter that, the farther close to the third. To be rigorous you should normalize the image and have a proper mathematical model for the amount of light collected by a pixel; to be sketchy let's say that if x1, x2, x3 are the coordinates of the image projected on the three pixels, and 0<y<1 is the intensity of the second pixel, the edge is presumed to lie at x1+(x2-x1)/2+(x3-x2)*y. This is subpixel interpolation. (a common way this is mathematically done, for point features, is computing the correlation between the image and a template pattern, fitting the center of the correlation peak with a gaussian or a paraboloid, and deriving the subpixel center coordinates by parametrical fit) 1 hour ago, jmltinc said: A - products are 19" wide and vary in length from ~7" to 20". My plan was to image the width and take the length in bites (more than one image) Then you have to move either the product or the camera perpendicularly to the optical axis, which I presume you'd want perpendicular to the focal plane. But, if you put together an optical system which is able to have in view ~19" in one dimension, why should you need to move at all, to see 20" in the other? 1 hour ago, jmltinc said: A - I need not image cutouts or other features of different heights at the same time for a single product, but the products that will be imaged have the ROI at different heights, so I guess the answer to your question is yes. I understand DOF is a concern and I would like to avoid having to reposition the camera in the Z axis. As the difference between products can be a couple inches, I expect focus will have to be varied. I was unaware that there was a capability to control focus automatically with Machine Vision Cameras/lenses. Look the net for "Motorized zoom lenses", "zoom camera", or the like. Here are a few links but absolutely no experience, nor endorsement. http://www.theimagingsource.com/products/zoom-cameras/gige-monochrome/dmkz30gp031/ http://www.tokina.co.jp/en/security/cctv-lenses/standard-motorized-zoom-lens/ https://www.tamron.co.jp/en/data/cctv/m_index.html otherwise I would have said, just rig out a pulley connected to a stepper motor, actioning the manual lens focus... 1 hour ago, jmltinc said: May I impose and ask the math for choosing the components I require? I have seen all the formulae, but the individual equations are dependent upon another. I truly do not know where to start. Do I start with sensor size/pixel size? Depth of Field? Field of Vision? Yes, I am pathetic... Before getting into that, I'd say: choose first a camera using a sensor with the resolution and speed and quality you desire. Once you know the sensor size, look (or ask a representative) for a suitable lens, with enough resolution power, and the capability of imaging 20" at the working distance you choose. Once you have alternatives there, check if by chance you're able already to work at fixed focus with a closed enough iris (https://en.wikipedia.org/wiki/Circle_of_confusion). Edited July 27, 2016 by ensegre Quote Link to comment
jmltinc Posted August 14, 2016 Author Report Share Posted August 14, 2016 ensegre, Thank you form the additional information, and once again, my apologies for the tardy reply. I have been working on a priority database project and haven't had the time to continue to explore MV... At some point I will find a hole where I can digest your advice and hopefully you will be gracious enough to answer a few more question that will certainly pop-up. Thanks, again. -John Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.