CN110068271B - PIN needle position degree detection method for large-size product with sub-pixel precision - Google Patents
PIN needle position degree detection method for large-size product with sub-pixel precision Download PDFInfo
- Publication number
- CN110068271B CN110068271B CN201910317864.9A CN201910317864A CN110068271B CN 110068271 B CN110068271 B CN 110068271B CN 201910317864 A CN201910317864 A CN 201910317864A CN 110068271 B CN110068271 B CN 110068271B
- Authority
- CN
- China
- Prior art keywords
- image
- sub
- coordinate system
- subsection
- product
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 65
- 238000000034 method Methods 0.000 claims abstract description 36
- 238000012545 processing Methods 0.000 claims abstract description 25
- 238000003860 storage Methods 0.000 claims description 10
- 238000004891 communication Methods 0.000 claims description 9
- 230000000877 morphologic effect Effects 0.000 claims description 5
- 238000000605 extraction Methods 0.000 claims description 4
- 238000003709 image segmentation Methods 0.000 claims description 4
- 101100518987 Mus musculus Pax1 gene Proteins 0.000 claims description 3
- 101100518992 Mus musculus Pax2 gene Proteins 0.000 claims description 3
- 101100189471 Mus musculus Pbx1 gene Proteins 0.000 claims description 3
- 230000001131 transforming effect Effects 0.000 claims description 2
- 238000005259 measurement Methods 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/002—Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The method for detecting the PIN needle position degree of the large-size product with sub-pixel precision comprises the steps of fixing the positions of a camera and a light source, driving the product to move by using a servo system, dividing the product into a plurality of subsections, respectively collecting images of all the subsections, establishing a new reference coordinate system by using common pixel points in all the images, and finally comparing the distance between the calculated PIN needle point and the new reference with a set tolerance value so as to distinguish qualified products from non-qualified products. The invention abandons the method of obtaining the size of a large-size product by adopting an image stitching method, can greatly reduce errors caused by splicing, and has a sub-pixel function when processing pixels. In addition, the detection method is suitable for cameras of different brands, can be applied to detection of different products, and is high in universality and compatibility.
Description
Technical Field
The invention relates to the field of PIN needle position degree detection, in particular to a PIN needle position degree detection method for large-size products with sub-pixel precision.
Background
In industrial production, a large number of products with different forms need high-precision dimension measurement, and for products with larger dimensions, the traditional image detection system can only process one image, so that the measurement precision cannot meet the requirement.
For products with larger size, the method of directly stitching two images is generally adopted at present, the precision is poorer, and the error caused by stitching exceeds 1 pixel, so that the method cannot be used for size measurement; in addition, the conventional image detection system uses the image of the line scan camera, which is easily affected by the stability of motion, external vibration, and other factors when acquiring the image, and is not suitable for size measurement, and the measurement time is long.
Disclosure of Invention
In order to solve the problems, the invention provides a PIN needle position degree detection method for a large-size product, which has the advantages of sub-pixel function, high system precision, good repeatability and convenience in maintenance.
The main content of the invention is as follows:
the PIN needle position degree detection method of the large-size product with sub-pixel precision comprises the following steps:
s1, dividing a product to be detected into a plurality of sub parts A in the length directioniSetting a first reference point and a second reference point for detecting the position degree on the product, wherein the value of i is more than or equal to 1; adjacent subsection AiWith an overlap region B therebetweeniAnd the first reference point on the product is located at the first sub-partOn the part, a second reference point on the product is located on the last sub-part;
s2, sequentially collecting the sub-parts A by adopting a PIN detection systemiIs marked as PiAnd the image P of each sub-partiNumbering and storing in sequence;
s3, adopting a PIN detection system to detect the image P of each subsectioniThe overlapping area in (1) is preprocessed to respectively obtain each subsection AiOverlap region B ofiThe position information of the same pixel points in the image coordinate system is established, and a uniform image coordinate system is established;
s4, adopting a PIN detection system to detect the image P of each subsectioniThe area of the PIN needle in the step (A) is preprocessed to obtain each subsection AiThe central point of each PIN needle is in the position information of the unified image coordinate system;
s5, acquiring position information of the first reference point and the second reference point in a unified image coordinate system, and creating a new reference coordinate system;
s6, respectively calculating a distance DX between the center point of each PIN needle and the X axis of the new reference coordinate system and a distance DY between the center point of each PIN needle and the Y axis of the new reference coordinate system, wherein when DX and DY simultaneously meet a set numerical value, the position degree of the corresponding PIN needle is qualified; otherwise, the position degree of the corresponding PIN needle is unqualified;
the PIN detection system comprises PIN detection equipment and an industrial personal computer, wherein the PIN detection equipment comprises a camera, a light source and a servo system; a product to be tested is fixed on a positioning fixture of a servo system, the light source is arranged above the servo system, and the camera is arranged above the light source; in collecting each subsection AiIn the process of the image, the positions of the camera and the light source are kept unchanged, and the servo system drives the product to be detected to move along the first direction; the industrial personal computer is connected with the camera and used for reading the image acquired by the camera so as to process and calculate the image.
Preferably, S2 includes the following sub-steps:
s21, fixing a product to be detected on a positioning fixture of the servo system;
s22, debugging a camera and a light source, driving a product to be tested to sequentially move to each preset position by a servo system, synchronously acquiring images by the camera, and respectively obtaining an image B of each subsectioni;
S23, image P of each sub partiAnd storing the data in the industrial personal computer in sequence.
Preferably, the step of establishing a unified image coordinate system in S3 includes:
s31, carrying out initial positioning on the product through an edge searching method, and carrying out initial positioning on the overlapping area B of each sub-partiAfter binarization and morphological processing, performing Blob detection on the image to obtain coordinates of the center points of the same pixel points in corresponding superposed regions;
s32, calculating image P of each subsection according to the result obtained in S31iRelative to the image P of the subsequent subsectioni+1The amount of change in the image coordinate system converts the corresponding image coordinate system of the image of each subsection to the image coordinate system of the image of the first subsection.
Preferably, the calculation process of S32 is as follows:
s321, setting the image of the jth sub-part as PjThen, the images of the two subsequent subsections are respectively denoted as Pj+1,Pj+2Image P of jth sub-partjWith the image P of the (j +1) th sub-partj+1Pa, the coordinates of Pa in the jth sub-portion image are (PaX1, PaY1), the coordinates of Pa in the (j +1) th sub-portion image are (PaX2, PaY 2); the coordinates of Pb in the (j +1) th partial image are (PbX1, PbY1), and the coordinates in the (j +2) th partial image are (PbX2, PbY 2);
s322, calculating the variation of the coordinate system of the image of the (j +1) th sub-part relative to the image coordinate system of the image of the j-th sub-part, and recording DX1 as PaX1-PaX 2; DY1 ═ PaY1-PaY 2; calculating the variation of the image coordinate system of the image of the j +1 th sub-part and the image coordinate system of the image of the j +2 th sub-part, and recording as DX 2-PbX 1-PbX 2; DY2 ═ PbY1-PbY 2;
s323, converting the image coordinate system of the image of the (j +1) th sub-part and the image coordinate system of the image of the (j +2) th sub-part into the image coordinate system of the image of the (j) th sub-part according to the calculation result of the S322;
and S324, calculating the images of the rest of the subsections according to the steps from S321 to S323, and establishing a uniform image coordinate system.
Preferably, each subsection A is obtained in S4iThe position information of the central point of each PIN needle in a unified image coordinate system comprises the following steps:
s41, initially positioning the product by an edge searching method, carrying out binarization and morphological processing on the area including the PIN needle in the image of each subsection, and carrying out Blob detection on the area to obtain the coordinate of the central point of the bright spot of the PIN needle in the image coordinate system of the image of each subsection;
and S42, transforming the coordinates of the central point of the bright spot of the PIN needle in the image of each subsection except the image of the first subsection into an image coordinate system of the image of the first subsection.
Preferably, the step of creating a new reference coordinate system in S5 is as follows:
s51, recording the coordinates of the first reference point as (xs1, ys1), converting the coordinates of the second reference point into the coordinates of the image coordinate system of the image of the first subsection as (xs2, ys 2);
s52, rotating the second reference point relative to the first reference point by an angle alpha to obtain a third reference point, wherein the coordinates of the third reference point are (xs3, ys3), wherein,
xs3=(xs2-xs1)*cosα-(ys2-ys1)*sinα+xs1;
ys3=(ys2-ys1)*cosα+(xs2-xs1)*sinα+ys1;
s53, taking a straight line passing through the first datum point and the third datum point simultaneously as an X axis of a new datum coordinate system;
s54, rotating the second reference point relative to the first reference point by an angle beta to obtain a fourth reference point, and recording coordinates of the fourth reference point as (xs4, ys4), wherein,
xs4=(xs2-xs1)*cosβ-(ys2-ys1)*sinβ+xs1;
ys4=(ys2-ys1)*cosβ+(xs2-xs1)*sinβ+ys1;
s55, taking a straight line passing through the first datum point and the fourth datum point simultaneously as a Y axis of a new datum coordinate system;
where α equals 29.1 ° and β equals 119.1 °.
Preferably, the PIN detection device comprises a detection bracket, and the camera and the light source are arranged on the detection bracket in a sliding manner; the servo system comprises a detection slide rail and a driving cylinder, and the driving cylinder drives the positioning clamp to slide on the detection slide rail.
Preferably, the camera is an area-array camera.
Preferably, the PIN detection system further comprises a detection management module integrated in the industrial personal computer, the detection management module comprises a user management submodule, an image acquisition submodule, an image processing submodule, an image storage submodule, a communication module and a user interface submodule, and the user management submodule is used for setting the authority of an operator and an administrator and switching roles between the administrator and the operator; the image acquisition sub-module is used for receiving the image transmitted by the camera and transmitting the image to the image storage sub-module; the image processing submodule is used for carrying out image denoising, image enhancement, image restoration, image segmentation and feature extraction processing on the image received by the image acquisition submodule to judge whether the product is qualified or not; the image storage submodule is used for sequentially storing the images transmitted by the image acquisition submodule and storing the images processed by the image processing submodule and the judgment result; the communication module is used for realizing the communication between the industrial personal computer and an external circuit; the user interface sub-module is used for providing a graphical display interface.
The invention has the beneficial effects that: the invention provides a PIN needle position degree detection method of a large-size product with sub-pixel precision, which comprises the steps of fixing the positions of a camera and a light source, driving the product to move by using a servo system, dividing the product into a plurality of subsections, respectively collecting images of the subsections, establishing a new reference coordinate system by using a unified image coordinate system of the images of the subsections by using common pixel points in the images of the adjacent subsections, and finally comparing the distance between the calculated PIN needle point and the new reference with a set tolerance value so as to distinguish a qualified product from a non-qualified product. The invention abandons the method of obtaining the size of a large-size product by adopting an image stitching method, can greatly reduce errors caused by splicing, and has a sub-pixel function when processing pixels.
In addition, the camera adopts an area-array camera, the time for acquiring a single image is extremely short, the camera is not easily interfered, the system is suitable for cameras of different brands, and the system compatibility is strong.
Drawings
Fig. 1 is a schematic structural diagram of a PIN position degree detection device.
Detailed Description
The technical scheme protected by the invention is specifically explained in the following by combining the attached drawings.
Please refer to fig. 1. The PIN position degree detection method of the large-size product with sub-pixel precision is realized by adopting a PIN detection system, wherein the PIN detection system comprises a hardware part and a software part, the hardware part comprises PIN detection equipment and an industrial personal computer, the software part runs on the industrial personal computer, and the industrial personal computer controls the PIN detection equipment to work and processes, stores and displays images and data acquired by the PIN detection equipment.
The PIN detection equipment comprises a servo system, a light source 12 and a camera 11, wherein the light source 12 is arranged above the servo system, the camera 11 is arranged above the light source 12, in the process of collecting images, the servo system can drive a product to be detected to move along one direction, and the camera 11 and the light source 12 are kept at the same position, so that the images collected each time have partially same pixels, and the precision is ensured; the industrial personal computer can process and operate the image collected by the camera, so that whether the product to be detected is qualified or not is judged.
Specifically, the detection device comprises a detection bracket 10, wherein the camera 11 and the light source 12 are arranged on the detection bracket 10 in a sliding manner; the servo system comprises a detection slide rail 14 and a driving air cylinder 15, and the driving air cylinder 15 drives the positioning clamp 13 to slide on the detection slide rail 14.
The software part is a detection management module integrated in the industrial personal computer, the detection management module comprises a user management submodule, an image acquisition submodule, an image processing submodule, an image storage submodule, a communication module and a user interface submodule, and the user management submodule is used for setting the authority of an operator and an administrator and switching roles between the administrator and the operator; the image acquisition sub-module is used for receiving the image transmitted by the camera and transmitting the image to the image storage sub-module; the image processing submodule is used for carrying out image denoising, image enhancement, image restoration, image segmentation and feature extraction processing on the image received by the image acquisition submodule to judge whether the product is qualified or not; the image storage submodule is used for sequentially storing the images transmitted by the image acquisition submodule and storing the images processed by the image processing submodule and the judgment result; the communication module is used for realizing the communication between the industrial personal computer and an external circuit; the user interface sub-module is used for providing a graphical display interface.
The detection method comprises the following steps:
s1, dividing a product to be detected into a plurality of sub parts A in the length directioniSetting a first reference point and a second reference point for detecting the position degree on the product, wherein the value of i is more than or equal to 1; adjacent subsection AiWith an overlap region B therebetweeniAnd a first reference point on the product is located on the first subsection and a second reference point on the product is located on the last subsection;
s2, sequentially collecting the sub-parts A by adopting a PIN detection systemiIs marked as PiAnd the image P of each sub-partiNumbering and storing in sequence;
s3, adoptImage P of each subsection by PIN detection systemiThe overlapping area in (1) is preprocessed to respectively obtain each subsection AiOverlap region B ofiThe position information of the same pixel points in the image coordinate system is established, and a uniform image coordinate system is established;
s4, adopting a PIN detection system to detect the image P of each subsectioniThe area of the PIN needle in the step (A) is preprocessed to obtain each subsection AiThe central point of each PIN needle is in the position information of the unified image coordinate system;
s5, acquiring position information of the first reference point and the second reference point in a unified image coordinate system, and creating a new reference coordinate system;
s6, respectively calculating a distance DX between the center point of each PIN needle and the X axis of the new reference coordinate system and a distance DY between the center point of each PIN needle and the Y axis of the new reference coordinate system, wherein when DX and DY simultaneously meet a set numerical value, the position degree of the corresponding PIN needle is qualified; otherwise, the position degree of the corresponding PIN needle is unqualified.
For convenience of description, in the present embodiment, the product to be tested is divided into three sub-portions, and the PIN detection system sequentially acquires images of the three sub-portions, which are respectively denoted as image one P1, image two P2 and image three P3, and the above steps will be described in detail below.
Firstly fixing a product to be tested on a positioning fixture of a servo system, debugging a camera and a light source to enable the acquired image to have better precision, when the servo system drives the product to move to a first position, triggering and opening the light source, then acquiring the image of the first part of the product by the camera, marking as the image P1, according to the set photographing time, in the embodiment, the camera adopts a planar array camera, the time for acquiring a single image is less than 30ms and is not easy to be interfered, after 50ms of delay, the servo system drives the product to move to a second position, acquiring the image second P2 of the second part of the product, after 50ms of delay, the servo system drives the product to move to a third position, and acquiring the image third P3 of the third part of the product, namely, the invention divides the large-size product into three parts and respectively acquires the images of the three parts, the resolution ratios of the three collected images are the same, and the three collected images keep better precision; meanwhile, overlapping areas are ensured to be formed in the obtained three images, specifically, partial overlapping areas exist in the product part acquired by the first image and the second image, and are respectively marked as overlapping areas B1 and B2, namely, the overlapping areas B1 and B2 have the same pixel points, and the same pixel points are marked as Pa; similarly, the second image and the third image have an overlapping region, and the same pixel point in the overlapping region of the two images is marked as Pb.
Then, sequentially storing the acquired first image, the second image and the third image in an image storage submodule, and then sequentially processing the three images by the image processing submodule, wherein the processing comprises image denoising, image enhancement, image restoration, image segmentation and feature extraction processing to obtain coordinates of feature points for calculation; specifically, the method specifically comprises the following steps:
(1) the method comprises the steps of initially positioning a product by an edge searching method, carrying out binarization and morphological processing on a coincidence region B1, a coincidence region B2 and a coincidence region B3, and carrying out Blob detection on the products to obtain coordinates of the center point of the corresponding same pixel point in an image coordinate system of an image of each subsection, such as coordinates of Pa in an image coordinate system of an image I P1 are marked as (PaX1, PaY1) and coordinates of Pa in an image coordinate system of an image II P2 (PaX2, PaY 2); meanwhile, the coordinates (PbX1, PbY1) of the same pixel points of the image two P2 and the image three P3 in the image coordinate system of the image two P2 and the coordinates (PbX2, PbY2) of the same pixel points in the image coordinate system of the image three are obtained;
(2) calculating the amount of change of the second position relative to the first position: DX1 is PaX1-PaX 2; DY1 ═ PaY1-PaY 2; and calculating the amount of change of the third position relative to the second position: DX 2-PbX 1-PbX 2; DY2 ═ PbY1-PbY 2; thereby converting the union of the image coordinate system of image two P2 and the image coordinate system of image three P3 to the image coordinate system of image one P1.
(3) Obtaining the central points of the bright spots of the PIN needles in the image I P1, the image II P2 and the image III P3 and the coordinates of the first reference point and the second reference point in the corresponding images by using the methods of (1) and (2), and creating a new reference coordinate system;
the process of creating a new reference coordinate system is as follows:
s51, recording the coordinates of the first reference point as (xs1, ys1), converting the coordinates of the second reference point into the coordinates of the image coordinate system of the image of the first subsection as (xs2, ys 2);
s52, rotating the second reference point relative to the first reference point by an angle alpha to obtain a third reference point, wherein the coordinates of the third reference point are (xs3, ys3), wherein,
xs3=(xs2-xs1)*cosα-(ys2-ys1)*sinα+xs1;
ys3=(ys2-ys1)*cosα+(xs2-xs1)*sinα+ys1;
s53, taking a straight line passing through the first datum point and the third datum point simultaneously as an X axis of a new datum coordinate system;
s54, rotating the second reference point relative to the first reference point by an angle beta to obtain a fourth reference point, and recording coordinates of the fourth reference point as (xs4, ys4), wherein,
xs4=(xs2-xs1)*cosβ-(ys2-ys1)*sinβ+xs1;
ys4=(ys2-ys1)*cosβ+(xs2-xs1)*sinβ+ys1;
s55, taking a straight line passing through the first datum point and the fourth datum point simultaneously as a Y axis of a new datum coordinate system;
where α equals 29.1 ° and β equals 119.1 °.
And finally, the image processing sub-module processes the image I P1, the image II P2 and the image III P3, calculates a distance DX of each PIN point relative to the X axis of the new reference coordinate system and a distance DY of each PIN point relative to the Y axis of the new reference coordinate system, compares the values of DX and DY with a set tolerance value, judges the PIN points to be qualified when the values of DX and DY are within the range allowed by tolerance, otherwise judges the PIN points to be unqualified, and displays the result by the user interface sub-module.
The images and data generated in the image acquisition and image processing processes are stored in the image storage sub-module, so that the subsequent problem tracing is facilitated.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (8)
1. The PIN needle position degree detection method of the large-size product with sub-pixel precision is characterized by comprising the following steps of:
s1, dividing a product to be detected into a plurality of sub parts A in the length directioniSetting a first reference point and a second reference point for detecting the position degree on the product, wherein the value of i is more than or equal to 1; adjacent subsection AiWith an overlap region B therebetweeniAnd a first reference point on the product is located on the first subsection and a second reference point on the product is located on the last subsection;
s2, sequentially collecting the sub-parts A by adopting a PIN detection systemiIs marked as PiAnd the image P of each sub-partiNumbering and storing in sequence;
s3, adopting a PIN detection system to detect the image P of each subsectioniThe overlapping area in (1) is preprocessed to respectively obtain each subsection AiOverlap region B ofiThe position information of the same pixel points in the image coordinate system is established, and a uniform image coordinate system is established;
s4, adopting a PIN detection system to detect the image P of each subsectioniThe area of the PIN needle in the step (A) is preprocessed to obtain each subsection AiThe central point of each PIN needle is in the position information of the unified image coordinate system;
s5, acquiring position information of the first reference point and the second reference point in a unified image coordinate system, and creating a new reference coordinate system;
s6, respectively calculating a distance DX between the center point of each PIN needle and the X axis of the new reference coordinate system and a distance DY between the center point of each PIN needle and the Y axis of the new reference coordinate system, wherein when DX and DY simultaneously meet a set numerical value, the position degree of the corresponding PIN needle is qualified; otherwise, the position degree of the corresponding PIN needle is unqualified;
wherein the PIN detection system comprises a PIN detection deviceThe PIN detection equipment comprises a camera, a light source and a servo system; a product to be tested is fixed on a positioning fixture of a servo system, the light source is arranged above the servo system, and the camera is arranged above the light source; in collecting each subsection AiIn the process of the image, the positions of the camera and the light source are kept unchanged, and the servo system drives the product to be detected to move along the first direction; the industrial personal computer is connected with the camera and used for reading the image acquired by the camera so as to process and calculate the image;
the step of creating a new reference coordinate system in S5 is as follows:
s51, recording the coordinates of the first reference point as (xs1, ys1), converting the coordinates of the second reference point into the coordinates of the image coordinate system of the image of the first subsection as (xs2, ys 2);
s52, rotating the second reference point relative to the first reference point by an angle alpha to obtain a third reference point, wherein the coordinates of the third reference point are (xs3, ys3), wherein,
xs3=(xs2-xs1)*cosα-(ys2-ys1)*sinα+xs1;
ys3=(ys2-ys1)*cosα+(xs2-xs1)*sinα+ys1;
s53, taking a straight line passing through the first datum point and the third datum point simultaneously as an X axis of a new datum coordinate system;
s54, rotating the second reference point relative to the first reference point by an angle beta to obtain a fourth reference point, and recording coordinates of the fourth reference point as (xs4, ys4), wherein,
xs4=(xs2-xs1)*cosβ-(ys2-ys1)*sinβ+xs1;
ys4=(ys2-ys1)*cosβ+(xs2-xs1)*sinβ+ys1;
s55, taking a straight line passing through the first datum point and the fourth datum point simultaneously as a Y axis of a new datum coordinate system;
where α equals 29.1 ° and β equals 119.1 °.
2. The method for detecting the PIN position degree of a large-size product with sub-pixel precision according to claim 1, wherein S2 comprises the following sub-steps:
s21, fixing a product to be detected on a positioning fixture of the servo system;
s22, debugging a camera and a light source, driving a product to be tested to sequentially move to each preset position by a servo system, synchronously acquiring images by the camera, and respectively obtaining images P of each subsectioni;
S23, image P of each sub partiAnd storing the data in the industrial personal computer in sequence.
3. The method for detecting the PIN position degree of a large-sized product with sub-pixel accuracy according to claim 1, wherein the step of establishing a unified image coordinate system in S3 includes:
s31, carrying out initial positioning on the product through an edge searching method, and carrying out initial positioning on the overlapping area B of each sub-partiAfter binarization and morphological processing, performing Blob detection on the image to obtain coordinates of the center points of the same pixel points in corresponding superposed regions;
s32, calculating image P of each subsection according to the result obtained in S31iRelative to the image P of the subsequent subsectioni+1The amount of change in the image coordinate system converts the corresponding image coordinate system of the image of each subsection to the image coordinate system of the image of the first subsection.
4. The method for detecting the PIN position degree of a large-size product with sub-pixel precision according to claim 3, wherein the calculation process of S32 is as follows:
s321, setting the image of the jth sub-part as PjThen, the images of the two subsequent subsections are respectively denoted as Pj+1,Pj+2Image P of jth sub-partjWith the image P of the (j +1) th sub-partj+1Pa, the coordinates of Pa in the jth sub-portion image are (PaX1, PaY1), the coordinates of Pa in the (j +1) th sub-portion image are (PaX2, PaY 2); the coordinates of Pb in the (j +1) th partial image are (PbX1, PbY1), and the coordinates in the (j +2) th partial image are (PbX2, PbY 2);
s322, calculating the variation of the coordinate system of the image of the (j +1) th sub-part relative to the image coordinate system of the image of the j-th sub-part, and recording DX1 as PaX1-PaX 2; DY1 ═ PaY1-PaY 2; calculating the variation of the image coordinate system of the image of the j +1 th sub-part and the image coordinate system of the image of the j +2 th sub-part, and recording as DX 2-PbX 1-PbX 2; DY2 ═ PbY1-PbY 2;
s323, converting the image coordinate system of the image of the (j +1) th sub-part and the image coordinate system of the image of the (j +2) th sub-part into the image coordinate system of the image of the (j) th sub-part according to the calculation result of the S322;
and S324, calculating the images of the rest of the subsections according to the steps from S321 to S323, and establishing a uniform image coordinate system.
5. The method for detecting the position of a PIN in a large-size product with sub-pixel accuracy according to claim 3, wherein each of the sub-portions A is obtained in S4iThe position information of the central point of each PIN needle in a unified image coordinate system comprises the following steps:
s41, initially positioning the product by an edge searching method, carrying out binarization and morphological processing on the area including the PIN needle in the image of each subsection, and carrying out Blob detection on the area to obtain the coordinate of the central point of the bright spot of the PIN needle in the image coordinate system of the image of each subsection;
and S42, transforming the coordinates of the central point of the bright spot of the PIN needle in the image of each subsection except the image of the first subsection into an image coordinate system of the image of the first subsection.
6. The method for detecting the position degree of the PIN needle of a large-size product with sub-pixel precision according to claim 1, wherein the PIN needle detection device comprises a detection bracket, and the camera and the light source are arranged on the detection bracket in a sliding manner; the servo system comprises a detection slide rail and a driving cylinder, and the driving cylinder drives the positioning clamp to slide on the detection slide rail.
7. The method for detecting the PIN position degree of a large-size product with sub-pixel precision according to claim 6, wherein the camera is an area-array camera.
8. The method for detecting the position degree of the PIN of the large-size product with sub-pixel precision according to claim 1, wherein the PIN detection system further comprises a detection management module integrated in the industrial personal computer, the detection management module comprises a user management sub-module, an image acquisition sub-module, an image processing sub-module, an image saving sub-module, a communication module and a user interface sub-module, and the user management sub-module is used for setting the authority of an operator and an administrator and switching roles between the administrator and the operator; the image acquisition sub-module is used for receiving the image transmitted by the camera and transmitting the image to the image storage sub-module; the image processing submodule is used for carrying out image denoising, image enhancement, image restoration, image segmentation and feature extraction processing on the image received by the image acquisition submodule to judge whether the product is qualified or not; the image storage submodule is used for sequentially storing the images transmitted by the image acquisition submodule and storing the images processed by the image processing submodule and the judgment result; the communication module is used for realizing the communication between the industrial personal computer and an external circuit; the user interface sub-module is used for providing a graphical display interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910317864.9A CN110068271B (en) | 2019-04-19 | 2019-04-19 | PIN needle position degree detection method for large-size product with sub-pixel precision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910317864.9A CN110068271B (en) | 2019-04-19 | 2019-04-19 | PIN needle position degree detection method for large-size product with sub-pixel precision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110068271A CN110068271A (en) | 2019-07-30 |
CN110068271B true CN110068271B (en) | 2021-03-30 |
Family
ID=67368050
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910317864.9A Active CN110068271B (en) | 2019-04-19 | 2019-04-19 | PIN needle position degree detection method for large-size product with sub-pixel precision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110068271B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111145247B (en) * | 2019-12-18 | 2023-07-07 | 配天机器人技术有限公司 | Position degree detection method based on vision, robot and computer storage medium |
CN112577428B (en) * | 2020-12-10 | 2022-05-03 | 苏州凌创电子系统有限公司 | Visual detection equipment based on detection of position degree of servo turntable type PIN needle |
CN114299026A (en) * | 2021-12-29 | 2022-04-08 | 广东利元亨智能装备股份有限公司 | Detection method, detection device, electronic equipment and readable storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3006566B2 (en) * | 1997-11-04 | 2000-02-07 | 日本電気株式会社 | Lead bending inspection equipment |
CN105678720A (en) * | 2014-11-20 | 2016-06-15 | 深圳英飞拓科技股份有限公司 | Image matching judging method and image matching judging device for panoramic stitching |
CN104483331A (en) * | 2014-12-03 | 2015-04-01 | 东莞市神州视觉科技有限公司 | Three-dimensional detection method, three-dimensional detection device and three-dimensional detection system for connector contact pin |
CN204705323U (en) * | 2015-07-01 | 2015-10-14 | 江南大学 | A kind of car body controller connector pin normotopia degree pick-up unit |
CN106683043B (en) * | 2015-11-10 | 2020-03-06 | 中国航天科工集团第四研究院指挥自动化技术研发与应用中心 | Parallel image splicing method and device of multi-channel optical detection system |
CN106500593A (en) * | 2016-10-31 | 2017-03-15 | 哈尔滨工业大学 | Aviation electric connector contact pin position deviation detection method |
CN107478164A (en) * | 2017-08-01 | 2017-12-15 | 成都尊华荣域科技有限公司 | A kind of bonder terminal detection means based on machine vision |
-
2019
- 2019-04-19 CN CN201910317864.9A patent/CN110068271B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110068271A (en) | 2019-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110068271B (en) | PIN needle position degree detection method for large-size product with sub-pixel precision | |
CN108269255B (en) | Electric connector detection method based on machine vision | |
US20210319588A1 (en) | Method and Apparatus for Calibrating External Parameters of Image Acquisition Device, Device and Storage Medium | |
CN104180769A (en) | System and method for efficient surface measurement using a laser displacement sensor | |
CN109544628B (en) | Accurate reading identification system and method for pointer instrument | |
CN109916304B (en) | Mirror surface/mirror surface-like object three-dimensional measurement system calibration method | |
CN110569849B (en) | AR (augmented reality) -glasses-based multi-instrument simultaneous identification and spatial positioning method and system | |
TWI628415B (en) | Positioning and measuring system based on image scale | |
KR19990036608A (en) | How to Create Wafer Measurement Information and How to Position Measurement | |
CN104121854A (en) | Precision measuring system and precision measuring method for positions and diameters of automotive frame assembling holes | |
US20220222857A1 (en) | Camera calibration method, electronic device, storage medium, and road side device | |
US6718074B1 (en) | Method and apparatus for inspection for under-resolved features in digital images | |
CN109596054A (en) | The size detection recognition methods of strip workpiece | |
CN114577135B (en) | 3D detection method and system for chip pin warpage based on single lens | |
CN111986267A (en) | Coordinate system calibration method of multi-camera vision system | |
US8390731B2 (en) | System and method for measuring a border of an image of an object | |
JP5375488B2 (en) | Appearance inspection apparatus, appearance inspection method, and appearance inspection program | |
KR20220060080A (en) | Method of inspecting defect of display substrate | |
US6571196B2 (en) | Size inspection/measurement method and size inspection/measurement apparatus | |
KR20140068543A (en) | Inspectiing device of display panel and inspecting method of the same | |
US20150287177A1 (en) | Image measuring device | |
CN112433640B (en) | Automatic calibration interactive projection system of multiple image sensors and implementation method thereof | |
CN108230385A (en) | One camera motion detection superelevation lamination, ultra-thin cigarette-brand quantitative approach and device | |
Wang et al. | Distance measurement using single non-metric CCD camera | |
CN114627055A (en) | Cylindrical label quality detection method and system |
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 | ||
CP03 | Change of name, title or address |
Address after: Building 4, No. 280, 10th Street, Baiyang Street, Qiantang District, Hangzhou City, Zhejiang Province, 310000 Patentee after: Yinawei (Hangzhou) Intelligent Technology Co.,Ltd. Country or region after: China Address before: 310018 No. 280, No. 10, Hangzhou economic and Technological Development Zone, Zhejiang Patentee before: INTERPLEX ELECTRONIC (HANGZHOU) CO.,LTD. Country or region before: China |
|
CP03 | Change of name, title or address |