CN111504193A - Automatic detection method for data line plug size - Google Patents

Automatic detection method for data line plug size Download PDF

Info

Publication number
CN111504193A
CN111504193A CN202010378783.2A CN202010378783A CN111504193A CN 111504193 A CN111504193 A CN 111504193A CN 202010378783 A CN202010378783 A CN 202010378783A CN 111504193 A CN111504193 A CN 111504193A
Authority
CN
China
Prior art keywords
data line
target
edge
image
line plug
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.)
Pending
Application number
CN202010378783.2A
Other languages
Chinese (zh)
Inventor
杨旭光
田广毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Helu Electronic Technology Co ltd
Original Assignee
Shandong Helu Electronic Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong Helu Electronic Technology Co ltd filed Critical Shandong Helu Electronic Technology Co ltd
Priority to CN202010378783.2A priority Critical patent/CN111504193A/en
Publication of CN111504193A publication Critical patent/CN111504193A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The invention relates to the technical field of wire harness detection in the electronic industry, in particular to an automatic detection method for the size of a data wire plug, which comprises the following detection steps: s1: inserting plugs at two ends of the data line into the jig side by side; s2: arranging two cameras to shoot data line plugs and acquiring data line plug images; s3: performing image processing on the data line plug image to obtain a target contour image; s4: performing image edge fitting on the target contour image to obtain a target edge of the data line plug; s5: acquiring a target size pixel value; s6: acquiring a target size physical value; s7: judging a data detection result according to the deviation between the target size physical value and the target value; s8: and displaying the detection result and broadcasting the detection result by voice. The invention can manually set the error allowable range, automatically judge the detection result, automatically display the detection data and the judgment result, and perform voice broadcasting, thereby further improving the detection efficiency of the data line plug.

Description

Automatic detection method for data line plug size
Technical Field
The invention relates to the technical field of wire harness detection in the electronic industry, in particular to an automatic detection method for the size of a data line plug.
Background
The data line is the signal connection line that commonly uses in daily life, and the data line plug mainly includes shell, Pin needle etc. and the size of its dimensional error has directly decided the height of data line quality, but in the wire rod course of working, because external force extrusion or assembly error lead to that data line plug size can not satisfy the operation requirement. In order to improve the quality of the data line, the plug size, i.e., the housing size and Pin size, of the data line needs to be checked.
In industry, the size detection means of the data line plug mainly comprises caliper measurement or measurement of a two-dimensional image measuring instrument.
Caliper measurement can realize the measurement of data line shell size, but can't realize the detection of inside Pin needle size to measurement accuracy is easily disturbed by the operator, and artificial measurement difference is great.
The measurement of the quadratic element image measuring instrument is a high-precision image measuring method, the measurement precision meets the requirements, but the equipment cost is high, the detection efficiency is low, and the popularization detection of all products is difficult to realize.
In view of the above, we propose an automatic detection method for the size of a data line plug to solve the above drawbacks well.
Disclosure of Invention
In order to solve the technical problems, the invention provides an automatic detection method for the size of a data line plug, so as to achieve the purposes of reducing human factor interference and improving the detection efficiency of the data line plug.
In order to achieve the purpose, the technical scheme of the invention is as follows: a method for automatically detecting the size of a data line plug comprises the following detection steps:
s1: inserting plugs at two ends of the data line into the jig side by side;
s2: arranging two cameras to shoot data line plugs and acquiring data line plug images;
s3: performing image processing on the data line plug image to obtain a target contour image;
s4: performing image edge fitting on the target contour image to obtain a target edge of the data line plug;
s5: calculating a target edge and acquiring a target size pixel value;
s6: converting the target size pixel value to obtain a target size physical value;
s7: judging a data detection result according to the deviation between the target size physical value and the target value;
s8: and displaying the detection result and broadcasting the detection result by voice.
Preferably, in S2, the two cameras are respectively arranged in the vertical direction and the horizontal direction of the data line plug; the data line plug image includes: data line plug vertical direction image and data line plug terminal surface image.
Preferably, in S3, the image processing includes image preprocessing and edge point extraction performed in sequence; the image preprocessing adopts an image binarization method to process a data line plug image to obtain a binarization image; and calculating the minimum value and the maximum value of the pixel width and the minimum value and the maximum value of the pixel height in the target area of the binary image according to the top edge, the bottom edge, the left edge and the right edge of the target area of the binary image.
Preferably, in S4, the edge fitting adopts a least square method to perform linear fitting on the edge of the target region of the target profile image, so as to obtain a fitted linear line; in S5, the intermediate level of the light and dark levels of the target contour image is used as a threshold to intercept and intersect the fitted straight line to obtain an intersection point, and the intersection point is used as the position of the edge point of the target contour image when the target edge is calculated.
Preferably, in S4, the target edge includes: the data line plug comprises a data line plug shell edge target edge and a data line Pin needle edge target edge.
Preferably, in S6, the target-size physical value is a product of the target-size pixel value and the scale.
Compared with the prior art, the invention has the following beneficial effects:
1. the two cameras can shoot the upper images and the end face images of the plugs at the two ends of the data line at the same time, the sizes of the shells and the Pin needles of the two plugs of the whole data line can be finished at a time, and the detection efficiency is high;
2. the method automatically performs image preprocessing, edge point extraction and edge fitting to obtain the positions of target edges such as the edge of a data line plug shell, the edge of a Pin needle and the like, then performs calculation to obtain the pixel value of the target dimension, and finally performs conversion according to the pixel value to obtain the physical dimension of the target dimension, the whole process automatically operates, the interference of human factors can be reduced, and the detection precision is high;
3. the invention can manually set the error allowable range, automatically judge the detection result, automatically display the detection data and the judgment result, and perform voice broadcasting, thereby further improving the detection efficiency of the data line plug.
Drawings
FIG. 1 is a flow chart of a method for automatically detecting the size of a data line plug according to the present invention;
FIG. 2 is a vertical view of a data line plug according to the present invention;
fig. 3 is an image of an end surface of a data line plug according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an automatic detection method for a data line plug size includes the following steps:
s1: inserting plugs at two ends of the data line into the jig side by side;
s2: arranging two cameras in the vertical direction and the horizontal direction of a data line plug respectively, and shooting to obtain data line plug images, wherein the data line plug images comprise data line plug vertical direction images and data line plug end face images;
s3: sequentially carrying out image preprocessing and edge point extraction on the data line plug image to obtain a target contour image;
s4: performing image edge fitting on the target contour image to obtain a target edge of the data line plug, wherein the target edge comprises a data line plug shell edge target edge and a data line Pin needle edge target edge;
s5: calculating a target edge and acquiring a target size pixel value;
s6: converting the target size pixel value to obtain a target size physical value;
s7: judging a data detection result according to the deviation between the target size physical value and the target value;
s8: and displaying the detection result and broadcasting the detection result by voice.
In S3, the image preprocessing is performed by processing the data line plug image using an image binarization method, that is, if the gray value of the image is greater than a set value, the gray value is set to 255, otherwise, the gray value is set to 0, and the binarized image is obtained through the above processing. And calculating the minimum value and the maximum value of the pixel width and the minimum value and the maximum value of the pixel height in the target area of the binary image according to the top edge, the bottom edge, the left edge and the right edge of the target area of the binary image.
In the step S4, the edge fitting adopts a least square method to perform linear fitting on the edge of the target region of the target contour image to obtain a fitted straight line, so that the influence of the camera noise on the imaging quality can be effectively eliminated, that is, the influence of the error on a single signal point on the measurement result is reduced.
The equation of a straight line for fitting the edge of the target region of the target contour image is V (n) = tn + r, and the parameters t and r are obtained by the principle of least squares so that the sum of squared errors e2 is minimized
Figure DEST_PATH_IMAGE002
Respectively partial differentiating the spheres by e2 and making the partial differentiation to zero to obtain
Formula (1)
Figure DEST_PATH_IMAGE004
Formula (2)
Figure DEST_PATH_IMAGE006
Obtained by the formulae (1) and (2)
Formula (3)
Figure DEST_PATH_IMAGE008
+
Figure DEST_PATH_IMAGE010
=
Figure DEST_PATH_IMAGE012
Formula (4)
Figure DEST_PATH_IMAGE014
+
Figure DEST_PATH_IMAGE016
-
Figure DEST_PATH_IMAGE018
=
Figure DEST_PATH_IMAGE020
From equations (3) and (4), two parameters t and r of a fitted straight-line equation v (n) = tn + r for edge fitting can be obtained.
In S5, the middle level of the light and dark levels of the target contour image is used as the threshold VkAnd cutting the intersection fitting straight line to obtain an intersection point Xs.
Signal at Xs V (Xs) = V (Vk)
Vk is located in the middle of the target contour image light level VH and dark level V L, i.e.:
Vk=(VH+VL)/2
then tXs + r = (V)H+VL)/2,Xs=[(VH+VL)-2r]/2t
And taking the intersection point Xs as the position of an edge point of the target contour image when the target edge is calculated, and calculating the target size pixel value according to the position of the intersection point.
In S6, the target size physical value is a product of the target size pixel value and a scale, and the scale is manually set.
In S7, the target value is the actual required size of the data line plug, and the deviation determination is based on whether | the physical value of the target size-the target value |/the target value × 100% exceeds 1%, if so, it is a defective product, and if not, it is a good product.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (6)

1. A method for automatically detecting the size of a data line plug is characterized by comprising the following steps: the method comprises the following detection steps:
s1: inserting plugs at two ends of the data line into the jig side by side;
s2: arranging two cameras to shoot data line plugs and acquiring data line plug images;
s3: performing image processing on the data line plug image to obtain a target contour image;
s4: performing image edge fitting on the target contour image to obtain a target edge of the data line plug;
s5: calculating a target edge and acquiring a target size pixel value;
s6: converting the target size pixel value to obtain a target size physical value;
s7: judging a data detection result according to the deviation between the target size physical value and the target value;
s8: and displaying the detection result and broadcasting the detection result by voice.
2. The method for automatically detecting the size of the data line plug as claimed in claim 1, wherein the method comprises the following steps: in S2, the two cameras are respectively arranged in the vertical direction and the horizontal direction of the data line plug; the data line plug image includes: data line plug vertical direction image and data line plug terminal surface image.
3. The method for automatically detecting the size of the data line plug as claimed in claim 1, wherein the method comprises the following steps: in S3, the image processing includes image preprocessing and edge point extraction performed in sequence; the image preprocessing adopts an image binarization method to process a data line plug image to obtain a binarization image; and calculating the minimum value and the maximum value of the pixel width and the minimum value and the maximum value of the pixel height in the target area of the binary image according to the top edge, the bottom edge, the left edge and the right edge of the target area of the binary image.
4. The method for automatically detecting the size of the data line plug as claimed in claim 1, wherein the method comprises the following steps: in S4, performing straight line fitting on the edge of the target area of the target contour image by using a least square method in the edge fitting to obtain a fitted straight line; in S5, the intermediate level of the light and dark levels of the target contour image is used as a threshold to intercept and intersect the fitted straight line to obtain an intersection point, and the intersection point is used as the position of the edge point of the target contour image when the target edge is calculated.
5. The method for automatically detecting the size of the data line plug as claimed in claim 1, wherein the method comprises the following steps: in S4, the target edge includes: the data line plug comprises a data line plug shell edge target edge and a data line Pin needle edge target edge.
6. The method for automatically detecting the size of the data line plug as claimed in claim 1, wherein the method comprises the following steps: in S6, the target-size physical value is a product of the target-size pixel value and the scale.
CN202010378783.2A 2020-05-07 2020-05-07 Automatic detection method for data line plug size Pending CN111504193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010378783.2A CN111504193A (en) 2020-05-07 2020-05-07 Automatic detection method for data line plug size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010378783.2A CN111504193A (en) 2020-05-07 2020-05-07 Automatic detection method for data line plug size

Publications (1)

Publication Number Publication Date
CN111504193A true CN111504193A (en) 2020-08-07

Family

ID=71869892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010378783.2A Pending CN111504193A (en) 2020-05-07 2020-05-07 Automatic detection method for data line plug size

Country Status (1)

Country Link
CN (1) CN111504193A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117115154A (en) * 2023-10-23 2023-11-24 深圳市欧康精密技术有限公司 Socket connector precision detection method based on machine vision

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02298810A (en) * 1989-05-15 1990-12-11 Iwai Kinzoku Kogyo Kk Method and apparatus for measuring length of pin in implement with pin attached
CN101603818A (en) * 2009-07-14 2009-12-16 中国科学院安徽光学精密机械研究所 Cigarette tipping paper hole line width, hole line-spacing hem width degree measurement mechanism and method
CN103063159A (en) * 2012-12-31 2013-04-24 南京信息工程大学 Part size measurement method based on charge coupled device (CCD)
CN103292701A (en) * 2013-06-24 2013-09-11 哈尔滨工业大学 Machine-vision-based online dimensional measurement method of precise instrument
CN204128504U (en) * 2014-10-20 2015-01-28 深圳市欣中大自动化技术有限公司 Attaching plug refers to the physical dimension self-operated measuring unit of sheet
CN204346362U (en) * 2014-12-24 2015-05-20 昆山视杰维光电科技有限公司 USB interface image acquisition detection system
CN204988181U (en) * 2015-07-18 2016-01-20 东莞市三姆森光电科技有限公司 Charger plug surface dimension automated inspection equipment
CN108662977A (en) * 2018-03-14 2018-10-16 浙江大学山东工业技术研究院 A kind of refractory brick geometric dimension measurement method
CN109470162A (en) * 2018-11-07 2019-03-15 上海第二工业大学 A kind of atomizer micropore hole shape intelligent checking system and method based on machine vision
CN109506571A (en) * 2018-10-26 2019-03-22 北京航天控制仪器研究所 A kind of part dimension measurement method in place and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02298810A (en) * 1989-05-15 1990-12-11 Iwai Kinzoku Kogyo Kk Method and apparatus for measuring length of pin in implement with pin attached
CN101603818A (en) * 2009-07-14 2009-12-16 中国科学院安徽光学精密机械研究所 Cigarette tipping paper hole line width, hole line-spacing hem width degree measurement mechanism and method
CN103063159A (en) * 2012-12-31 2013-04-24 南京信息工程大学 Part size measurement method based on charge coupled device (CCD)
CN103292701A (en) * 2013-06-24 2013-09-11 哈尔滨工业大学 Machine-vision-based online dimensional measurement method of precise instrument
CN204128504U (en) * 2014-10-20 2015-01-28 深圳市欣中大自动化技术有限公司 Attaching plug refers to the physical dimension self-operated measuring unit of sheet
CN204346362U (en) * 2014-12-24 2015-05-20 昆山视杰维光电科技有限公司 USB interface image acquisition detection system
CN204988181U (en) * 2015-07-18 2016-01-20 东莞市三姆森光电科技有限公司 Charger plug surface dimension automated inspection equipment
CN108662977A (en) * 2018-03-14 2018-10-16 浙江大学山东工业技术研究院 A kind of refractory brick geometric dimension measurement method
CN109506571A (en) * 2018-10-26 2019-03-22 北京航天控制仪器研究所 A kind of part dimension measurement method in place and device
CN109470162A (en) * 2018-11-07 2019-03-15 上海第二工业大学 A kind of atomizer micropore hole shape intelligent checking system and method based on machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
萨克洛符斯基 著: "《仪器制造刀具》", 31 March 1959 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117115154A (en) * 2023-10-23 2023-11-24 深圳市欧康精密技术有限公司 Socket connector precision detection method based on machine vision

Similar Documents

Publication Publication Date Title
CN109003258B (en) High-precision sub-pixel circular part measuring method
CN108537772B (en) Visual detection method for printing defects of chip resistor positive conductor
CN110838097A (en) Conveyor belt offset measurement method based on machine vision
CN114494045A (en) Large-scale straight gear geometric parameter measuring system and method based on machine vision
CN113554667A (en) Three-dimensional displacement detection method and device based on image recognition
CN109990711A (en) A kind of appearance quality detection method of punched nickel-plated steel band
CN111354047A (en) Camera module positioning method and system based on computer vision
CN111504193A (en) Automatic detection method for data line plug size
CN113552133B (en) Cell skirt edge cracking detection method and visual detection device
CN114820439A (en) PCB bare board defect detection system and method based on AOI
CN110889874A (en) Error evaluation method for calibration result of binocular camera
CN113963054A (en) Intelligent express box size measuring method and system based on binocular camera
CN113567451A (en) Cable defect detection and diameter measurement method
CN108180825A (en) A kind of identification of cuboid object dimensional and localization method based on line-structured light
CN113607058B (en) Straight blade size detection method and system based on machine vision
CN106960437B (en) Liquid level detection method for oil-immersed power transformer of power inspection robot
Ziqiang et al. Research of the algorithm calculating the length of bridge crack based on stereo vision
CN112036393B (en) Shale gas field production single pointer instrument reading based identification method
CN205607332U (en) Measuring device is striden to bridge crane crane span structure based on machine vision
CN110081828B (en) Machine vision shield tail gap detection image grid characteristic point reliability filtering method
CN114963981A (en) Monocular vision-based cylindrical part butt joint non-contact measurement method
CN113822104B (en) Artificial intelligence surface of water detecting system based on virtual scale of many candidates
CN111829439B (en) High-precision translation measuring method and device
CN214138538U (en) Track range unit and system based on vision measurement
CN111595292A (en) Binocular vision distance measurement method based on unequal focal lengths

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200807