Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Advanced OpenCV 3 python hole detection

Advanced OpenCV 3 python hole detection

centersOpenCV is a well known computer vision library used as base framework used by major companies like Google, IBM, Sony and numerous others. It enables quick vision based tool development and results can be seen in a minutes after starting to code. This time I will show how to find round blobs (for example fiducial marks or holes on PCB). There are many ways to accomplish this task, but many of them don’t produce stable results. After many hours of research I stumbled on SimpleBlobDetector.

For this experiment I will be using standard Python 2.7 installation and OpenCV 3.1 library. OpenCV can be installed numerous ways, for Windows feel free to install from official OpenCV page (requires more steps to get started) or download from Unofficial Windows Binaries for Python Extension Packages and install with command like this:

pip install opencv_python-3.1.0-cp27-cp27m-win32.whl
out

Detection results

Script is provided below and hosted on Github. To start experimenting supply video file and adjust parameters if needed. Code is pretty simple and requires no more explanation (hopefully).

Read more Here







 

More Articles to Read

App note: Infrared remote control implementation with MSP430FR4xx
App note: Infrared remote control implementation with MSP430FR4xx
Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone

Top


Shares