Giter Site home page Giter Site logo

kentavv / haimer_probe Goto Github PK

View Code? Open in Web Editor NEW
23.0 8.0 6.0 5.13 MB

Automate LinuxCNC with machine vision by detecting and probing holes while reading the dial of a Haimer 3D Sensor

License: GNU General Public License v3.0

Python 100.00%
machine-vision opencv python linuxcnc linuxcnc-probe haimer-3d-probe haimer-camera computer-vision computer-vision-opencv

haimer_probe's Introduction

haimer_probe

Use webcams to read a Haimer 3D Sensor and to estimate dimensions of holes, and interface both to LinuxCNC.

Use machine vision to 1) read the mechanical gauge dial face of a Haimer 3D Sensor probe and create an electronic probe for LinuxCNC; and with a second webcam estimate the positions of holes that are then verified with automated sensing of the Haimer 3D Sensor.

A Microsoft LifeCam Cinema webcam is attached to a Haimer 3D Taser with a 3d printed part. The software monitors the two hands of the dial face, presenting debug views, and returning the combined value of the two dials. Keyboard commands begin edge probing and circle center locating. This code is then extended with a second downward facing webcam that detects and estimates dimensions of holes. The dimensions of the holes are then directly measured with the Haimer probe.

Examples of identifying and probing holes: https://www.youtube.com/watch?v=7mBQwIzaiaQ Examples of reading mechanical gauge: https://www.youtube.com/watch?v=w3novypPqos

Keyboard commands (haimer_camera.py)

  • p: toggle display updates, image analysis continues
  • r: toggle recording raw and displayed frames (overwriting)
  • s: save current raw and displayed frames (non-overwriting)
  • z: toggle tare (zeroing) calculations
  • d: toggle debug view stages of image analysis
  • q: quit
  • KEY_LEFT: move pivot point to the left
  • KEY_UP: move pivot point up
  • KEY_RIGHT: move pivot point to the right
  • KEY_DOWN: move pivot point down

Keyboard commands (z_camera.py)

  • p: toggle display updates, image analysis continues
  • l: lock in holes (identical to 'p', no longer needed?)
  • r: toggle recording raw and displayed frames (overwriting)
  • s: save current raw and displayed frames (non-overwriting)
  • a: perform alignment of a plate by selecting four corners and entering physical dimensions
  • q: quit
  • 0, 1, 2, 3: change view (change to 'd' of haimer_camera.py?)

Keyboard commands (linuxcnc_driver.py)

These commands are in addition to those inherited from haimer_camera.py (highest priority) and z_camera.py.

The additional commands are best seen on a numeric keypad. The direction shown on the keypad indicates the direction the probe approaches the part.

  • g: probe the dimensions of all the holes found by z_camera.py
  • t: toggle touch-off mode, if touch-off mode is active, the following commands have priority
  • 0: find center of hole, internal edges
  • 4: find edge moving to the left, -x
  • 6: find edge moving to the right, +x
  • 8: find edge moving forward, away from operator, +y
  • 2: find edge moving aft, towards the operator, -y
  • 5: find top surface, moving down, towards part
  • 1: find upper-right corner, moving to the left, then around the corner, and then towards the operator
  • 3: find upper-left corner, moving to the right, then around the corner, and then towards the operator
  • 7: find lower-right corner, moving to the left, then around the corner, and then away from the operator
  • 9: find lower-left corner, moving to the right, then around the corner, and then away from the operator

Some references

http://www.insticc.org/Primoris/Resources/PaperPdf.ashx?idPaper=73860 https://github.com/intel-iot-devkit/python-cv-samples/tree/master/examples/analog-gauge-reader https://www.researchgate.net/publication/282582478_Machine_Vision_Based_Automatic_Detection_Method_of_Indicating_Values_of_a_Pointer_Gauge/fulltext/5686db1508ae051f9af42749/Machine-Vision-Based-Automatic-Detection-Method-of-Indicating-Values-of-a-Pointer-Gauge.pdf https://www.degruyter.com/view/j/phys.2019.17.issue-1/phys-2019-0010/phys-2019-0010.xml https://pdfs.semanticscholar.org/639e/d0c018925e6b900e6ddd2956b63ffd5f56dc.pdf https://pdfs.semanticscholar.org/7083/1ea22f494e044c4861b3fb2bbfad578dd9a1.pdf

haimer_probe's People

Contributors

kentavv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haimer_probe's Issues

youtube

it might be an idea to check your youtube link
am sure you did not want to link to "The Bed of Procrustes by Nassim Nicholas Taleb"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.