CN111028227B - Quick alignment method for numerical control machine tool - Google Patents
Quick alignment method for numerical control machine tool Download PDFInfo
- Publication number
- CN111028227B CN111028227B CN201911300663.4A CN201911300663A CN111028227B CN 111028227 B CN111028227 B CN 111028227B CN 201911300663 A CN201911300663 A CN 201911300663A CN 111028227 B CN111028227 B CN 111028227B
- Authority
- CN
- China
- Prior art keywords
- numerical control
- machine tool
- blank
- picture
- control machine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Numerical Control (AREA)
Abstract
The invention provides a quick alignment method of a numerical control machine tool. The method is based on an artificial intelligence image recognition technology, a raspberry (Rashberry) open source electronic platform is selected to load camera hardware equipment, firstly, a position picture of a blank on a numerical control machine tool is obtained through a camera, then an image is analyzed and processed by using an open source image library based on a PYTHON language OPENCV to obtain position data and a position deflection angle of the blank on the machine tool, and finally, the position data and a position variable of a program processing origin in a numerical control system are transmitted and modified through a wireless transmission module, so that the blank alignment position is rapidly realized. The quick alignment method for the numerical control machine tool provided by the invention has the advantages of simple required equipment, convenience in use and low cost, and can shorten the processing period, stabilize the quality and reduce the labor intensity.
Description
Technical Field
The invention belongs to the technical field of numerical control, and particularly relates to a rapid alignment method of a numerical control machine tool.
Background
In the numerical control machine part machining, blank side lines are required to be calibrated to be aligned with the X axis and the Y axis of a numerical control machine tool, and then a program machining origin is set. At present, a scriber or a measuring probe is generally used, an origin is processed by a manual alignment program, the method is long in time and complex in operation, and the deviation of manually recorded data is large and easy to make mistakes.
Disclosure of Invention
In order to solve the defects in the prior art, the technical problem to be solved by the invention is to provide a quick alignment method for a numerical control machine tool, which can realize quick alignment of a program processing origin in numerical control processing, reduce manual downtime and improve the use efficiency of numerical control equipment.
In order to solve the technical problems, the quick alignment method of the numerical control machine tool comprises the following steps: an image recognition technology based on artificial intelligence selects a raspberry group (Rashberry) open source electronic platform to load camera hardware equipment, and the specific steps are as follows:
step1: acquiring a position picture of a blank on a numerical control machine tool through a camera;
step2: analyzing and processing the pictures by using an OPENCV open source image library based on a PYTHON language to obtain position data and position deflection angles of the blank on a machine tool;
step3: and through the wireless transmission module, data are transmitted, a program processing origin position variable in the numerical control system is modified, and the blank alignment position is rapidly realized.
Further, the specific method for obtaining the position picture of the blank in the numerical control machine in the Step1 of the method is as follows: the raspberry Pi (Rashberry) open source electronic platform loading camera hardware equipment is arranged on a machine tool spindle, the raspberry Pi (Rashberry) open source electronic platform loading camera hardware equipment is moved to the position above a blank to be aligned, and then a position picture of the blank on a numerical control machine tool is obtained through a camera.
Further, in the Step2 of the method, the specific method for analyzing and processing the picture by using the OPENCV open source image library is as follows: firstly, performing binary processing on the picture by using an OpenCV library function and setting a threshold value, so that blank areas and non-blank areas are changed into black-and-white clear pictures; and secondly, processing the binary picture, calculating to obtain pixel positions of corner points or hole circle centers and the like in the picture, comparing the pixel positions with a calibration picture, and correcting to obtain coordinate data and position deflection angles at the position of the machine tool.
In the technical scheme, the quick alignment method for the numerical control machine tool is simple in required equipment, convenient to use and low in cost, can shorten the processing period, is stable in quality and reduces the labor intensity.
Drawings
Fig. 1 is a schematic diagram of a rapid alignment method of a numerical control machine tool according to the present invention.
FIG. 2 is an exemplary graph of the effects of processing pictures using OPENCV library functions in accordance with the present invention
Detailed Description
The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to fig. 1 and 2, and it is obvious that the described embodiments are only a specific embodiment of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention relates to a quick alignment method of a numerical control machine tool.
As shown in fig. 1, the camera and the raspberry group data line are connected to form a front module, which can be installed on a machine tool spindle and moved to above the origin to be aligned of the blank. And (5) calibrating the position before use, and obtaining a picture of the blank in the machine tool.
Then, the picture processing is formulated in the raspberry group based on the computer PYTHON language program. Firstly, performing binary processing on the picture by using an OPENCV library function and setting a threshold value, namely changing blank areas and non-blank areas into black-and-white clear pictures.
The effect of using the function cv.threshold of the OpenCV machine vision library on picture processing is shown in fig. 2.
And (3) processing the binary picture by using a function cv.findContours () of the OpenCV machine vision library, and acquiring pixel point position values of boundaries and corner points of the graph by using cv.drawContours ().
And calculating the actual coordinate position of the machine tool according to the pixel point position of the corner point in the picture. For example, a 800 x 600 pixel size picture is taken. The initial calibration picture has the initial corner in the machine tool position X, Y as 100 and 200 mm. The pixel positions of the alignment angular points of the blank are 200 and 300, and the alignment points of the blank are calculated by a formula: the formula of the X coordinate value is X=100+alpha (200/800), and the formula of the Y coordinate value is Y=00+beta (300/600) (alpha and beta are coefficients obtained according to the focal length of the lens, the shooting distance and after calibration).
The partial python language program code is as follows:
import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt
img=cv.imread('gradient.png',0)
ret,thresh1=cv.threshold(img,127,255,cv.THRESH_BINARY)
ret,thresh2=cv.threshold(img,127,255,cv.THRESH_BINARY_INV)
ret,thresh3=cv.threshold(img,127,255,cv.THRESH_TRUNC)
ret,thresh4=cv.threshold(img,127,255,cv.THRESH_TOZERO)
ret,thresh5=cv.threshold(img,127,255,cv.THRESH_TOZERO_INV)
titles=['Original
Image','BINARY','BINARY_INV','TRUNC','TOZERO','TOZERO_INV']
images=[img,thresh1,thresh2,thresh3,thresh4,thresh5]
for i in xrange(6):
plt.subplot(2,3,i+1),plt.imshow(images[i],'gray')
plt.title(titles[i])
plt.xticks([]),plt.yticks([])
plt.show()
im=cv.imread('test.jpg')
imgray=cv.cvtColor(im,cv.COLOR_BGR2GRAY)
ret,thresh=cv.threshold(imgray,127,255,0)
contours,hierarchy=cv.findContours(thresh,cv.RETR_TREE,cv.CHAIN_APPROX_SIMPLE)
cv.drawContours(img,contours,-1,(0,255,0),3)
cnt=contours[4]
cv.drawContours(img,[cnt],0,(0,255,0),3)
third, the raspberry dispatch source electronic platform encodes the transmitted signal after transferring the data to a wireless transmitter, which should match the receiver.
And finally, after decoding by the receiver, transferring the data into a machine tool numerical control system. Setting the data to a program origin variable of a designated numerical control system, and executing the setting program in the numerical control system to finish parameter setting such as a program origin G54 and the like before machining the numerical control program. The program origin data setting is performed by the Siemens digital control system according to the system variable $P_UIFR [1] =100.
Claims (1)
1. A quick alignment method of a numerical control machine tool is characterized in that: the method is based on an artificial intelligence image recognition technology, and adopts a raspberry dispatch source electronic platform to load camera hardware equipment, and comprises the following specific steps:
step1: acquiring a position picture of a blank on a numerical control machine tool through a camera;
step2: analyzing and processing the image by using an open source image library based on a PYTHON language OPENCV of a computer to obtain position data and position deflection angles of the blank on a machine tool;
step3: the data are transmitted and the program processing origin position variable in the numerical control system is modified through the wireless transmission module, so that the blank alignment position is quickly realized;
the specific method for acquiring the position picture of the blank on the numerical control machine through the camera comprises the steps of installing a raspberry dispatching source electronic platform loading camera hardware device on a machine tool spindle, then moving the hardware device to the position above the origin to be aligned of the blank, and finally acquiring the position picture of the blank on the numerical control machine through the camera;
the specific method for analyzing and processing the image by using the open source image library based on the PYTHON language comprises the steps of firstly, applying an OpenCV library function to the image, setting a threshold value to perform binary processing on the image, and changing blank areas and non-blank areas into black-and-white clear images; and secondly, processing the binary picture, calculating to obtain the pixel position of the corner or the hole center in the picture, comparing with the calibration picture, and correcting to obtain coordinate data and position deflection angle at the position of the machine tool.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911300663.4A CN111028227B (en) | 2019-12-17 | 2019-12-17 | Quick alignment method for numerical control machine tool |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911300663.4A CN111028227B (en) | 2019-12-17 | 2019-12-17 | Quick alignment method for numerical control machine tool |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111028227A CN111028227A (en) | 2020-04-17 |
CN111028227B true CN111028227B (en) | 2023-07-21 |
Family
ID=70211060
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911300663.4A Active CN111028227B (en) | 2019-12-17 | 2019-12-17 | Quick alignment method for numerical control machine tool |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111028227B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105681813A (en) * | 2014-11-19 | 2016-06-15 | Tcl集团股份有限公司 | Image processing method and system based on Android system |
CN110189347A (en) * | 2019-05-15 | 2019-08-30 | 深圳市优博讯科技股份有限公司 | A kind of method and terminal measuring object volume |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5832278B2 (en) * | 2011-12-26 | 2015-12-16 | 三菱重工業株式会社 | Calibration method for camera measurement system |
KR101712191B1 (en) * | 2015-05-04 | 2017-03-03 | 경남대학교 산학협력단 | Patient Fall Prevention Monitoring Device |
CN105335971B (en) * | 2015-10-19 | 2018-07-13 | 上海交通大学 | Work pieces process accurate positioning method based on image |
CN106570904B (en) * | 2016-10-25 | 2019-04-09 | 大连理工大学 | A kind of multiple target relative pose recognition methods based on Xtion camera |
CN107192716A (en) * | 2017-04-26 | 2017-09-22 | 广东工业大学 | A kind of workpiece, defect quick determination method based on contour feature |
CN107153848A (en) * | 2017-06-15 | 2017-09-12 | 南京工程学院 | Instrument image automatic identifying method based on OpenCV |
CN107687850B (en) * | 2017-07-26 | 2021-04-23 | 哈尔滨工业大学深圳研究生院 | Unmanned aerial vehicle pose estimation method based on vision and inertia measurement unit |
CN109309808A (en) * | 2017-07-26 | 2019-02-05 | 梭维智能科技(深圳)有限公司 | A kind of monitoring system and method based on recognition of face |
CN108521556A (en) * | 2018-03-30 | 2018-09-11 | 北京林业大学 | Intelligent-tracking monitoring camera based on embedded system |
CN108717709B (en) * | 2018-05-24 | 2022-01-28 | 东北大学 | Image processing system and image processing method |
CN109782669A (en) * | 2019-01-30 | 2019-05-21 | 大连交通大学 | A kind of control system based on raspberry pie family event automatic processing |
CN110160543A (en) * | 2019-04-22 | 2019-08-23 | 广东工业大学 | The robot of positioning and map structuring in real time |
-
2019
- 2019-12-17 CN CN201911300663.4A patent/CN111028227B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105681813A (en) * | 2014-11-19 | 2016-06-15 | Tcl集团股份有限公司 | Image processing method and system based on Android system |
CN110189347A (en) * | 2019-05-15 | 2019-08-30 | 深圳市优博讯科技股份有限公司 | A kind of method and terminal measuring object volume |
Also Published As
Publication number | Publication date |
---|---|
CN111028227A (en) | 2020-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108288288B (en) | Method, device and system for measuring precision shaft dimension based on visual identification | |
CN112505056A (en) | Defect detection method and device | |
CN110514906B (en) | High-precision microwave cavity filter debugging method and system based on hand-eye coordination | |
CN109003271A (en) | A kind of Wiring harness connector winding displacement quality determining method based on deep learning YOLO algorithm | |
CN110560376B (en) | Product surface defect detection method and device | |
CN111210392B (en) | Hub valve hole positioning method based on digital image processing | |
CN107833223B (en) | Fruit hyperspectral image segmentation method based on spectral information | |
CN115880296A (en) | Machine vision-based prefabricated part quality detection method and device | |
CN111028227B (en) | Quick alignment method for numerical control machine tool | |
CN118032820A (en) | SMT full-automatic online X-RAY nondestructive testing system | |
CN114257736A (en) | Self-adaptive shooting method for workpieces | |
CN117434568A (en) | Intelligent positioning system based on remote sensing satellite | |
CN111815714B (en) | Fisheye camera calibration method and device, terminal equipment and storage medium | |
CN111596425A (en) | Automatic light focusing system for collimator to focus light | |
CN111986266A (en) | Photometric stereo light source parameter calibration method | |
CN111047702A (en) | Automatic welding method for flange bent pipe based on binocular vision | |
CN103905762B (en) | Method for automatically detecting projection picture for projection module | |
Shen et al. | Design and implementation of PCB detection and classification system based on machine vision | |
CN114966238A (en) | Automatic detection and alignment method for antenna phase center | |
CN108900734B (en) | Wide-angle lens distortion automatic correction device and method | |
CN213342427U (en) | Active alignment system of camera module | |
CN204790413U (en) | Intelligence visual system | |
CN118470099B (en) | Object space pose measurement method and device based on monocular camera | |
CN112964179B (en) | Linewidth measurement error compensation method for CD measuring machine | |
CN113741285B (en) | Tubular product gesture recognition control device based on machine vision |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |