CN115063487A - Method for positioning array product by camera - Google Patents
Method for positioning array product by camera Download PDFInfo
- Publication number
- CN115063487A CN115063487A CN202210402209.5A CN202210402209A CN115063487A CN 115063487 A CN115063487 A CN 115063487A CN 202210402209 A CN202210402209 A CN 202210402209A CN 115063487 A CN115063487 A CN 115063487A
- Authority
- CN
- China
- Prior art keywords
- product
- point
- camera
- angle
- center
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a method for positioning an array product by a camera, which comprises the following steps of firstly carrying out array on the product, then carrying out photographing on a static product, photographing in a flying photographing state, and then carrying out calibration; then, the camera takes a flyshot of the product, and compensation and correction of a MARK point are carried out on the product according to a software algorithm; and outputting the correction result to the coordinate, and correcting the final output. The method for positioning the array product by the camera mainly comprises a high-brightness stroboscopic light source, a high-frequency camera and a software algorithm, determines coordinates and calibrates deviation by means of fast and slow flying shooting, adopts three axes, a CCD camera and a high-speed stroboscopic light source, positions the product at high speed and high precision under the assistance of the software algorithm, meets the requirement of intensive positioning of the product, and improves the production efficiency.
Description
Technical Field
The invention relates to the technical field of camera positioning methods, in particular to a method for positioning an array product by a camera.
Background
With the development of modern society, the production and manufacture of industrial equipment are highly automated, and the equipment is always available in life, and the automated equipment becomes an indispensable part of people's life. The camera positioning is the most important thing on the automation equipment, the existing camera positioning mode is slow, products with dense product arrays cannot be quickly identified and accurately positioned, and the production efficiency of the automation equipment is influenced; therefore, a new camera positioning method is needed to solve the above problems.
Disclosure of Invention
The invention mainly aims to provide a method for positioning an array product by a camera, and aims to solve the prior technical problem.
In order to achieve the above object, the present invention provides a method for positioning an array product by a camera, comprising the steps of,
s1: firstly, carrying out array on a product, then photographing a static product, photographing in a flying photographing state, and then calibrating;
s2: then, the camera takes a flyshot of the product, and compensation and correction of a MARK point are carried out on the product according to a software algorithm;
s3: and outputting the correction result to the coordinate, and correcting the final output.
Preferably, step S1 is implemented by shifting the camera to a single product to view the image of the product with the cross target of the camera at the center of the product, and since the products are regularly positioned, shifting the camera to the last point and then inputting the number of rows and columns of X and Y to see the center point of each product, and performing fine adjustment if the center point cannot be seen.
Preferably, according to step S1, before photographing, calibrating the camera, inputting the coordinates of the current product, then photographing again the product using the flying shoot fast movement and inputting, inputting the coordinates of the flying shoot product, outputting a matrix, and determining the relative relationship between X, Y and X1, Y1;
then quickly moving to the product position for photographing to obtain X1 and Y1 of each product, and utilizing a matrix to reversely deduce a X, Y coordinate and correcting;
and finally, correcting and carrying out track conversion.
Preferably, according to step S3, the specific calculation method for compensation and correction of Mark points of the product is as follows:
firstly, determining Mark points, dispensing paths and center points of products;
after the file programming is finished, the center (xm0, ym0) of the Mark point and the dispensing path are fixed and unchanged, and the angle of the Mark point is defaulted to be 0 degree;
when the machine is produced, the system can take pictures again to find Mark points; the system will get the new coordinates of Mark center point (xm1, ym 1);
the Angle deviation of Mark points is Angle.
Preferably, the X, Y position deviation of Mark point is:
x-direction deviation xOffset-xm 1-xm0
Y-direction deviation yOffset ═ ym1-ym0
The new dispensing path rotation center is:
NewX=OldX+xOffset
NewY=OldY+yOffset
wherein OldX and OldY are the photographing coordinates of Mark1 point, and the Mark1 point is the photographing point and is a known coordinate.
Preferably, the point of each dispensing path is connected with the center point of the product by a straight line, and then the slope of each section of connecting line is calculated by the slope formula:
calculating the original slope of the dispensing path point a as ka ═ tanAa ═ m0-ya0)/(xm0-xa0)
......
Calculating the original slope of the dispensing path point d as kd ═ tanAd ═ (ym0-yd0)/(xm0-xd0)
Therefore, the angle of the connecting line between each point of the dispensing path and the center of the template can be calculated as follows:
Aa0=arctan(ka)
......
Ad0=arctan(kd)
preferably, the point of each dispensing path is connected to the center point of the product by a straight line, and the new connecting line angle is
Aa1 ═ Aa0+ Angle, where Angle is the recognition Angle of Mark, and is known.
......
Ad1 ═ Ad0+ Angle, where Angle is Mark's recognition Angle and is known.
Preferably, the center point of the product is regarded as the center of a circle, the point on each new dispensing path is regarded as a point on the circle, the respective connection is the radius of the circle, and the radius is calculated as Ra ═ v (xa0-xm0)2+ (ya0-ym0)2 by virtue of the law of collusion
......
Rd=√(xd0-xm0)2+(yd0-ym0)2
The final problem is to find the coordinates of the point on the circle, knowing the center of the circle, the radius, and the angle of the radius in the circle.
The corrected dispensing path coordinates can be solved by using a parameter equation of a circle:
xa1=NewX+Ra*cosAa
ya1=NewY+Ra*sinAa
......
xd1=NewX+Rd*cosAd
yd1=NewY+Rd*sinAd
and finally, positioning of the product is realized.
The technical scheme of the invention has the beneficial effects that:
according to the method for positioning the array product by the camera, the triaxial module is combined with the CCD camera and the high-speed stroboscopic light source, the product is positioned at high speed and high precision under the assistance of a software algorithm, intensive positioning of the product is met, and production efficiency is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for positioning an array product by a camera according to an embodiment of the present invention;
FIG. 2 is a track diagram of an embodiment of a method for positioning an array product by a camera;
FIG. 3 is a product array diagram of one embodiment of a method for camera locating array products of the present invention;
FIG. 4 is a schematic coordinate diagram of an embodiment of a method for positioning an array product by a camera according to the invention;
FIG. 5 is a schematic diagram illustrating a connection between a dispensing path and a center point of a product according to an embodiment of a method for positioning an array product by a camera;
fig. 6 is a test data table of the flying shoot in an embodiment of the method for positioning an array product by a camera.
Detailed Description
In the following, the embodiments of the present invention will be described in detail with reference to the drawings in the following, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all 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.
It should be noted that: like reference numbers and letters below refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it is to be understood that the terms "upper" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, or orientations or positional relationships that are conventionally placed when the products of the present invention are used, or orientations or positional relationships that are conventionally understood by those skilled in the art, and are used for convenience of description and simplification of the description, but do not indicate or imply that the equipment or elements that are referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention.
Furthermore, the terms "first" and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed" and "connected" are to be interpreted broadly, e.g., as being either fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The present invention provides a method for positioning an array product by a camera, referring to fig. 1-6, comprising the following steps,
s1: firstly, arraying products, then photographing static products, photographing in a flying photographing state, and then calibrating;
s2: then, the camera takes a flyshot of the product, and compensation and correction of a MARK point are carried out on the product according to a software algorithm;
s3: and outputting the correction result to the coordinate, and correcting the final output.
The method for positioning the array product by the camera mainly comprises a high-brightness stroboscopic light source, a high-frequency camera and a software algorithm, determines coordinates and calibrates deviation by means of fast and slow flying shooting, adopts three axes, a CCD camera and a high-speed stroboscopic light source, positions the product at high speed and high precision under the assistance of the software algorithm, meets the requirement of intensive positioning of the product, and improves production efficiency.
In a preferred embodiment, referring to fig. 3, the method for positioning the array products by the camera at step S1 is specifically operated by using the camera to shift to a single product to view the image of the product with the cross target of the camera at the center of the product, and since the products are regularly positioned, shifting the camera to the last point and then inputting the number of rows and columns of X and Y to see the center point of each product, and performing fine adjustment if the center point cannot be seen.
In a preferred embodiment, referring to fig. 4, according to step S1, before taking a picture, the camera is calibrated, the coordinates of the current product, i.e. pixels X, Y, are input, then the product is taken again and input using the flying-shoot fast-move, the coordinates of the flying-shoot product, i.e. pixels X1 and Y1, are input, a matrix is output, and the relative relationship between X, Y and X1 and Y1 is determined; then quickly moving to the product position for photographing to obtain X1 and Y1 of each product, and utilizing a matrix to reversely deduce a X, Y coordinate and correcting; and finally, correcting and carrying out track conversion.
In a preferred embodiment, according to step S3, the concrete calculation method for compensation and correction of Mark points of the product is as follows:
referring to fig. 2, the outer frame is a Mark point template, the inner frame inside is a dispensing path, and the cross in the middle is a center point of the template;
firstly, determining Mark points, dispensing paths and center points of products;
after the file programming is finished, the center (xm0, ym0) of the Mark point and the dispensing path are fixed and unchanged, and the angle of the Mark point is defaulted to be 0 degree;
when the machine is produced, the system can take pictures again to find Mark points; the system will get the new coordinates of Mark center point (xm1, ym 1);
the Angle deviation of Mark points is Angle.
The X, Y position deviation of Mark point is:
x-direction deviation xOffset-xm 1-xm0
Y-direction deviation yOffset ═ ym1-ym0
The new dispensing path rotation center is:
NewX=OldX+xOffset
NewY=OldY+yOffset
wherein OldX and OldY are the photographing coordinates of Mark1 point, and wherein Mark1 point is the photographing point and is a known coordinate.
In a preferred embodiment, referring to fig. 5, the point of each dispensing path is connected to the center point of the product by a straight line, and then the slope of each connecting line is determined by the slope formula:
calculating the original slope of the dispensing path point a as ka ═ tanAa ═ m0-ya0)/(xm0-xa0)
......
Calculating the original slope of the dispensing path point d as kd ═ tanAd ═ (ym0-yd0)/(xm0-xd0)
Therefore, the angle of a connecting line between each point of the dispensing path and the center of the template can be calculated, and is obtained by an inverse trigonometric function:
Aa0=arctan(ka)
......
Ad0=arctan(kd)
and connecting the point of each dispensing path with the center point of the product by using a straight line, wherein the new connecting line Angle is Aa1 ═ Aa0+ Angle, and the Angle is the identification Angle of Mark and is known.
......
Ad1 ═ Ad0+ Angle, where Angle is the recognition Angle of Mark, and is known.
Regarding the center point of the product as the center of the circle, regarding the point on each new dispensing path as a point on the circle, the respective connection is the radius of the circle, and the radius is calculated as Ra ═ v √ (xa0-xm0) + (ya0-ym0) according to the law of collusion and thigh
......
Rd=√(xd0-xm0)+(yd0-ym0)
The final problem is to find the coordinates of the point on the circle, knowing the center of the circle, the radius, and the angle of the radius in the circle.
The corrected dispensing path coordinates can be solved by using a parameter equation of a circle:
xa1=NewX+Ra*cosAa
ya1=NewY+Ra*sinAa
......
xd1=NewX+Rd*cosAd
yd1=NewY+Rd*sinAd
and finally, positioning of the product is realized.
The above description is only a part of or preferred embodiments of the present invention, and neither the text nor the drawings should be construed as limiting the scope of the present invention, and all equivalent structural changes, which are made by using the contents of the present specification and the drawings, or any other related technical fields, are included in the scope of the present invention.
Claims (8)
1. A method of camera positioning an array product, comprising: comprises the following steps of (a) carrying out,
s1: firstly, arraying products, then photographing static products, photographing in a flying photographing state, and then calibrating;
s2: then, the camera takes a flyshot of the product, and compensation and correction of a MARK point are carried out on the product according to a software algorithm;
s3: and outputting the correction result to the coordinate, and correcting the final output.
2. The method of claim 1, wherein step S1 is performed by shifting the camera to a single product to view the image of the product with the cross target of the camera at the center of the product, and moving the camera to the last point to input the number of rows and columns of X and Y to see the center point of each product, and performing fine adjustment if the center point cannot be seen, because the products are regularly positioned.
3. The method for positioning array products by cameras as claimed in claim 1, wherein according to step S1, before taking pictures, calibrating the cameras, inputting the coordinates of the current product, then taking pictures again and inputting the coordinates of the products using the flying shot fast movement, inputting the coordinates of the products under flying shot, outputting a matrix, and determining the relative relationship between X, Y and X1 and Y1;
then quickly moving to the product position for photographing to obtain X1 and Y1 of each product, and utilizing a matrix to reversely deduce a X, Y coordinate and correcting;
and finally, correcting and carrying out track conversion.
4. The method for positioning array product by camera as claimed in claim 3, wherein the specific calculation method for compensation and correction of Mark point of the product according to step S3 is as follows:
firstly, determining Mark points, dispensing paths and center points of products;
after the file programming is finished, the center (xm0, ym0) of the Mark point and the dispensing path are fixed and unchanged, and the angle of the Mark point is defaulted to be 0 degree;
when the machine is produced, the system can take pictures again to find Mark points; the system will get the new coordinates of Mark center point (xm1, ym 1);
the Angle deviation of Mark points is Angle.
5. The method for positioning array product by camera as claimed in claim 4, wherein X, Y positional deviation of Mark point is:
x-direction deviation xOffset-xm 1-xm0
Y-direction deviation yOffset ═ ym1-ym0
The new dispensing path rotation center is:
NewX=OldX+xOffset
NewY=OldY+yOffset
wherein OldX and OldY are the photographing coordinates of Mark1 point, and wherein Mark1 point is the photographing point and is a known coordinate.
6. The method of camera localization array product of claim 4,
connecting the point of each dispensing path with the central point of the product by using a straight line, and then solving the slope of each section of connecting line by using a slope formula:
calculating the original slope of the dispensing path point a as ka ═ tanAa ═ m0-ya0)/(xm0-xa0)
......
Calculating the original slope of the dispensing path point d as kd ═ tanAd ═ (ym0-yd0)/(xm0-xd0)
Therefore, the angle of the connecting line between each point of the dispensing path and the center of the template can be calculated as follows:
Aa0=arctan(ka)
......
Ad0=arctan(kd)。
7. the method of claim 4, wherein the new line angle is set as follows, when the point of each dispensing path is connected to the center point of the product by a straight line
Aa1 ═ Aa0+ Angle, where Angle is the recognition Angle of Mark, and is known.
......
Ad1 ═ Ad0+ Angle, where Angle is the recognition Angle of Mark, and is known.
8. The method of claim 4, wherein the center point of the product is regarded as the center of a circle, the points on each new dispensing path are regarded as points on the respective circle, the respective connection is the radius of the circle, and the radius is calculated as the radius from the stock-collusion law
Ra=√(xa0-xm0)+(ya0-ym0)
......
Rd=√(xd0-xm0)+(yd0-ym0)
The final problem is to find the coordinates of the point on the circle, knowing the center of the circle, the radius, and the angle of the radius in the circle.
The corrected dispensing path coordinates can be solved by using a parameter equation of a circle:
xa1=NewX+Ra*cosAa
ya1=NewY+Ra*sinAa
......
xd1=NewX+Rd*cosAd
yd1=NewY+Rd*sinAd
and finally, positioning of the product is realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210402209.5A CN115063487A (en) | 2022-04-18 | 2022-04-18 | Method for positioning array product by camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210402209.5A CN115063487A (en) | 2022-04-18 | 2022-04-18 | Method for positioning array product by camera |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115063487A true CN115063487A (en) | 2022-09-16 |
Family
ID=83196690
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210402209.5A Pending CN115063487A (en) | 2022-04-18 | 2022-04-18 | Method for positioning array product by camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115063487A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116148186A (en) * | 2023-04-19 | 2023-05-23 | 高视科技(苏州)股份有限公司 | Pole piece flying deviation rectifying method, electronic equipment and storage medium |
-
2022
- 2022-04-18 CN CN202210402209.5A patent/CN115063487A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116148186A (en) * | 2023-04-19 | 2023-05-23 | 高视科技(苏州)股份有限公司 | Pole piece flying deviation rectifying method, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106444852B (en) | Image processing apparatus, method for correcting position and commercial plant | |
CN107358631B (en) | Binocular vision reconstruction method considering three-dimensional distortion | |
CN109671122A (en) | Trick camera calibration method and device | |
CN111896221B (en) | Alignment method of rotating optical measurement system for virtual coordinate system auxiliary camera calibration | |
CN109448054A (en) | The target Locate step by step method of view-based access control model fusion, application, apparatus and system | |
CN103150724B (en) | Segmented model-based camera calibration method | |
CN115063487A (en) | Method for positioning array product by camera | |
CN109544643A (en) | A kind of camera review bearing calibration and device | |
CN109465830B (en) | Robot monocular stereoscopic vision calibration system and method | |
CN111047586B (en) | Pixel equivalent measuring method based on machine vision | |
CN109807937A (en) | A kind of Robotic Hand-Eye Calibration method based on natural scene | |
CN110766759B (en) | Multi-camera calibration method and device without overlapped view fields | |
CN111260734B (en) | Calibration method of XY theta platform machine vision alignment system | |
CN104424601B (en) | Centering assembly method and device for special-shaped body assembly parts | |
CN112507755A (en) | Target object six-degree-of-freedom positioning method and system for minimizing two-dimensional code corner re-projection error | |
JP2012007934A (en) | Mobile object control system, program and mobile object control method | |
CN111652945A (en) | Camera calibration method | |
CN116734890A (en) | Star sensor and optical telescope on-orbit calibration method | |
CN114283207B (en) | Calibration method for alignment crimping of FPC (flexible printed circuit) and screen body cell | |
CN114252099B (en) | Multi-sensor fusion self-calibration method and system for intelligent vehicle | |
CN112971984B (en) | Coordinate registration method based on integrated surgical robot | |
CN109670204A (en) | Carrier rocket video image parallax error modification method | |
CN110815203A (en) | Method for correcting end effector of robot arm | |
CN113787541A (en) | Robot position correction method and robot positioning system | |
CN116100564B (en) | High-precision calibration method and device for calibrating manipulator |
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 |