270 likes | 438 Views
NIWeek Vision Summit August 2-3, 2011 Austin, Texas. www.ni.com/niweek/summit_vision. NIWeek Vision Summit August 2–3, 2011 Austin, Texas. Breaking New Ground with Vision Inspection Systems. Dr. Dan Milkie Senior Developer Coleman Technologies, Inc.
E N D
NIWeek Vision SummitAugust 2-3, 2011 Austin, Texas www.ni.com/niweek/summit_vision
NIWeek Vision SummitAugust 2–3, 2011 Austin, Texas Breaking New Ground with Vision Inspection Systems Dr. Dan Milkie Senior Developer Coleman Technologies, Inc.
What if there’s no existing solution? • Prototyping tips • Planning guide • Implementation • Imaging algorithms • Finding small defects • 3D laser triangulation • Final lessons
About us • 16 year National Instruments Alliance Partner • Basler Vision System Integrator • NI Certified Developers & NI Professional Instructors • Advanced engineering & science degrees
Vision Applications Industrial • Dinnerware defect detection system • Dinnerware color pattern inspection system • Robotic seed germination classifier • High-speed seed counting system • Laser drilling inspection • Thin film defect identification • Mirror defect detection • PCB contact pad inspection system • Color tablet tracking • Particle size analysis (powders) • Particle size analysis (liquid suspension) • Glass rod inspection • Well plate inspection system • Bio-sample thermal imaging • Wellplate imaging system • Crystal finder/classifier • Biaxial tissue tester • Two-photon microscopy Plate Inspection System Research
The Challenge Dinnerware Inspection • Many different dishes • 1 dish per second • Most difficult defect: • White bumps onwhite plates Defects
Can we image the defects? • Prototype with what you have (or loaners) • Area-scan camera (GigE) • Lighting • Directional : Desk lamp • Broad sources : Room lights, diffusers • NI Vision Development Module • Optimize lighting & camera placement • Tip : Replace camera with your eye
Okay, I see the defects, but can the computer? • Start with NI Vision Assistant • Fastest way to test processing functions • Estimate time using the “Performance Meter” • Quickly turn scripts into LabVIEW VIs
Okay, I see the defects, but can the computer? • Start with NI Vision Assistant • Fastest way to test processing functions • Estimate time using the “Performance Meter” • Quickly turn scripts into LabVIEW VIs
Proof of Principle • Are you confident in your plan yet? • If not, prototype in LabVIEW! • Combine acquisition and analysis • Tip : Use tester with fresh data or saved image sets • Practice good coding style • Prototypes Final version • Good code encourages trying new ideas • Documentation should be automatic
Going for it Ready to build your system? • Know your test set, criteria • Balance goals with sliding scales instead of all-or-nothing • Solve most pressing issues first • Example : Our 1st generation machine tested 1 plate type (their most popular) and only 4 defect types
Modular, Modular, Modular 1 2 3 Independent Stations • Bottom view • 3D imaging • Top view Lesson learned : • Needed to add baffles • Found interference between stations • Changed how plates cross gaps • Vibration issues PC NI PCIe-8235 4x GigE NI PCIe-1430 Dual CameraLink
Small defect imaging Glancing Angle • First version : • Next version: • Defects show up as dark spots: LED light Transmission Line scan Camera
Small Defects are Hard to Find! • Problems : • Defects are small, low contrast • Large gradients in image • Plate-to-plate variations • Image size (8MP!) • Must process in < 0.5 second • Solution: • A custom pixel-by-pixel threshold for each image. Defect!
Step 1 : Unwrap Image Problem : We just need rim pixels • Use image masks? • Longer process times • Still have large images Solution : IMAQ Unwrap • 8M pixel square -> 1.5M pixel strip • Aligns gradients, rim transitions in one direction
Step 2 : Create Custom Golden Master What should this image look like if it were perfect? • Remove defects using median smoothing • Tip : Use X Size >> Y Size to preserve gradients & edges • Performance Boost : Reduce image resolution , Smooth, then Resample back to original size. Median Smoothed “Golden Master” Unwrapped Original Defect Defect Removed!
Step 3 : Pixel-by-pixel Threshold Original Results “Golden Master” Threshold original image using IMAQ Compare Subtract a constant to set a “lower” threshold. Defect Found!
Benefits of Pixel-by-pixel Thresholds • Works with: • Gradients, edges, speckle, large dynamic contrasts • Every image checks against itself • Robust against image-image variations, changing lighting conditions • Fast (<100ms for 1.5MP) • Limited by smoothing performance
3D Imaging • Simple inspection for geometric errors • Gouges, bulges, warp Warp examples
Laser Triangulation Laser Line Area Camera Original Threshold applied
Convert pixels to height Laser Line Area Camera Height = dy H WD q With a little more geometry, we can also correct for perspective :
3D Laser Height Measurement • Each camera frame = 1 cross section (per laser line) • Tip : Add multiple laser lines for more cross sections • 250 um cross section resolution (100 FPS @ 1” per sec) • Tip : Reduce ROI for fastest frame rates • 100 um height resolution
Completed system • Fast development with NI tools: • Completed in < 3 months • Reliable • Inspected over 1 million dishes • Multiple follow-up systems
Conclusions • Invest in good prototyping practices • Prepare for unknown hurdles • Use modular, flexible architectures in hardware, layout, software • Defect finding algorithm • Pixel-by-pixel thresholds • Simple 3D laser scanner • Inexpensive, easy to setup