CN117140558B - Coordinate conversion method, system and electronic equipment - Google Patents

Coordinate conversion method, system and electronic equipment Download PDF

Info

Publication number
CN117140558B
CN117140558B CN202311385786.9A CN202311385786A CN117140558B CN 117140558 B CN117140558 B CN 117140558B CN 202311385786 A CN202311385786 A CN 202311385786A CN 117140558 B CN117140558 B CN 117140558B
Authority
CN
China
Prior art keywords
coordinate
coordinate system
detected
manipulator
picture
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
Application number
CN202311385786.9A
Other languages
Chinese (zh)
Other versions
CN117140558A (en
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.)
Fitow Tianjin Detection Technology Co Ltd
Original Assignee
Fitow Tianjin Detection 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 Fitow Tianjin Detection Technology Co Ltd filed Critical Fitow Tianjin Detection Technology Co Ltd
Priority to CN202311385786.9A priority Critical patent/CN117140558B/en
Publication of CN117140558A publication Critical patent/CN117140558A/en
Application granted granted Critical
Publication of CN117140558B publication Critical patent/CN117140558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J11/00Manipulators not otherwise provided for
    • B25J11/0075Manipulators for painting or coating
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J19/00Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
    • B25J19/02Sensing devices
    • B25J19/04Viewing devices
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/161Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1661Programme controls characterised by programming, planning systems for manipulators characterised by task planning, object-oriented languages
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention provides a coordinate conversion method, a system and electronic equipment, which are applied to a production line carrying a manipulator, wherein the scheme uses a manipulator coordinate system as an intermediate medium, and the conversion relation between an image coordinate system and the manipulator coordinate system is obtained, and the conversion relation between the manipulator coordinate system and a coordinate system of an object to be detected is obtained, so that the conversion of the image coordinate system and the coordinate system of the object to be detected is completed, and finally, the conversion relation between the defect position of the object to be detected in a digital image and the defect position of the object to be detected under the coordinate system of the object to be detected is obtained; the scheme is applicable to shooting a large-size linear array camera, and can realize coordinate conversion of an object to be detected moving in a production line, so that the universality is improved.

Description

Coordinate conversion method, system and electronic equipment
Technical Field
The invention relates to the field of industrial production calibration, in particular to a coordinate conversion method, a coordinate conversion system and electronic equipment.
Background
In industrial flow line production, defect detection is an important link, whether defects exist in the to-be-detected piece is judged through relevant detection equipment, and the to-be-detected piece with the defects is screened to ensure the quality of products. In the defect detection, a plurality of detection links are involved, the defect detection of the vehicle interior decoration plate is taken as an example, the piece to be detected is the vehicle interior decoration plate, the plate moves to a shooting area under the action of a production line and then is shot by a corresponding camera to obtain a digital image, then the defects contained in the plate are detected through an image recognition related algorithm, and the detected defects can be marked by spraying by using a mechanical arm, so that detection personnel can check the plate conveniently. As can be seen, the above process involves various devices such as a manipulator and a camera, and multiple coordinate systems corresponding to the devices need to be used, such as a manipulator coordinate system, an image coordinate system, and an object coordinate system. Because of the plurality of devices, the devices respectively correspond to the coordinate systems of the devices, and the data of the object to be detected can be described only by a complex coordinate corresponding relation, so that the defect position in the digital image corresponds to the actual defect position of the object to be detected.
In the prior art, in the process of corresponding the digital image position and the actual defect position, the actual position of the defect in the object to be detected is mainly realized through single pixel precision in the transverse and longitudinal directions of the digital image, and the relationship between the pixel number and the single pixel precision is utilized to calculate the actual position of the defect in the object to be detected. However, the method is more limited, and the method is only suitable for static environments, can only use an area array camera with consistent accuracy in the transverse and longitudinal directions, cannot be used in a production line provided with a linear array camera, and has the technical problem of poor universality.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a coordinate transformation method, system and electronic device, which utilize a manipulator coordinate system as an intermediate medium, and obtain a transformation relationship between an image coordinate system and the manipulator coordinate system, and obtain a transformation relationship between the manipulator coordinate system and a coordinate system of an object to be measured, so as to complete transformation between the image coordinate system and the coordinate system of the object to be measured, and finally obtain a transformation relationship between a defect position of the object to be measured in a digital image and a defect position under the coordinate system of the object to be measured. The scheme is applicable to shooting a large-size linear array camera, and can realize coordinate conversion of an object to be detected moving in a production line, so that the universality is improved.
In a first aspect, an embodiment of the present invention provides a coordinate transformation method; the method is applied to a production line carrying the manipulator; wherein the pipeline comprises: the device comprises a conveyor belt, a shooting module, an origin sensor and an inkjet manipulator; a photographing area and a code spraying area are arranged in the conveyor belt; the shooting module is located in the shooting area, and the shooting module at least comprises: the first line scanning camera and the second line scanning camera are symmetrically arranged on two sides of the conveyor belt; the original point sensor and the ink-jet manipulator are positioned in the code-jet area;
the method comprises the following steps:
when the object to be detected is detected to be placed on the conveyor belt, the original point sensor is used for controlling the conveyor belt to convey the object to be detected to the code spraying area; wherein, the object to be measured is provided with a datum point; the original point sensor is used for initializing a coordinate system of the object to be detected corresponding to the object to be detected;
controlling an ink jet manipulator to spray a plurality of ink points into preset positions of an object to be tested according to a preset spraying scheme, and acquiring first position coordinates of the ink points under a manipulator coordinate system corresponding to the ink jet manipulator;
after the conveyor belt is controlled to convey the sprayed object to be detected to a photographing area, a first line scanning camera and a second line scanning camera are started to photograph the object to be detected, and a first picture photographed by the first line scanning camera and a second picture photographed by the second line scanning camera are respectively obtained;
Establishing an image coordinate system corresponding to the first picture and the second picture, determining second position coordinates corresponding to ink points in the first picture and the second picture according to the image coordinate system, and determining a coordinate transformation matrix by utilizing the first position coordinates and the second position coordinates; the coordinate transformation matrix is used for converting the image coordinate system into a manipulator coordinate system;
establishing an object to be measured coordinate system corresponding to the object to be measured, respectively obtaining a third position coordinate corresponding to a datum point of the object to be measured under the object to be measured coordinate system and a fourth position coordinate under the manipulator coordinate system, and determining a coordinate translation matrix by utilizing the third position coordinate and the fourth position coordinate; the coordinate translation matrix is used for converting the manipulator coordinate system into an object coordinate system to be measured;
determining a coordinate conversion result corresponding to the object to be detected according to the coordinate conversion matrix and the coordinate translation matrix
In one embodiment, the step of controlling the inkjet manipulator to spray a plurality of ink points into preset positions of the object to be measured according to a preset spraying scheme and acquiring first position coordinates of the ink points under a manipulator coordinate system corresponding to the inkjet manipulator includes:
acquiring a spraying scheme; wherein, at least, the spraying scheme comprises: the number of ink dots, the size data of the ink dots, the position data of the ink dots and the spraying time data of the ink dots;
Controlling an ink-jet manipulator to spray ink points to a preset position of an object to be tested by using a spraying scheme; wherein, the ink points in the preset position are symmetrically distributed along the central axis of the object to be detected; the central axis of the object to be measured is parallel to the conveying direction of the conveying belt;
after a manipulator coordinate system corresponding to the ink jet manipulator is established, a first position coordinate corresponding to the ink point under the manipulator coordinate system is obtained.
In one embodiment, after the control conveyor belt conveys the sprayed object to be measured to the photographing area, the first line scanning camera and the second line scanning camera are started to photograph the object to be measured, and a first picture photographed by the first line scanning camera and a second picture photographed by the second line scanning camera are respectively obtained, which comprises the following steps:
placing the sprayed object to be tested in a conveyor belt, and controlling the conveyor belt to convey the object to be tested to a photographing area;
when an object to be detected is transmitted to shooting areas of a first line scanning camera and a second line scanning camera, the first line scanning camera and the second line scanning camera are controlled to shoot the object to be detected, and a first picture shot by the first line scanning camera and a second picture shot by the second line scanning camera are respectively obtained; the first line scanning camera and the second line scanning camera are the same in height from the conveyor belt; the first line scanning cameras and the second line scanning cameras are symmetrically distributed along the central axis of the conveyor belt, and the central axis of the conveyor belt is parallel to the conveying direction of the conveyor belt.
In one embodiment, the step of establishing an image coordinate system corresponding to the first picture and the second picture, determining second position coordinates corresponding to the ink points in the first picture and the second picture according to the image coordinate system, and determining a coordinate transformation matrix by using the first position coordinates and the second position coordinates includes:
acquiring fitting circles in the first picture and the second picture, and acquiring ink points contained in the first picture and the second picture by using the fitting circles; wherein the ink dots are round ink dots;
respectively establishing an image coordinate system corresponding to the first picture and the second picture by utilizing the preset vertex positions in the first picture and the second picture, and determining second position coordinates corresponding to ink points in the first picture and the second picture;
and calculating an affine transformation matrix converted into a manipulator coordinate system by the image coordinate system according to the first position coordinate and the second position coordinate, and determining the affine transformation matrix as the coordinate transformation matrix.
In one embodiment, establishing an object coordinate system corresponding to an object to be measured, respectively obtaining a third position coordinate corresponding to a reference point of the object to be measured under the object coordinate system and a fourth position coordinate under a manipulator coordinate system, and determining a coordinate translation matrix by using the third position coordinate and the fourth position coordinate, where the method includes:
Establishing an object to be measured coordinate system corresponding to the object to be measured by using a preset coordinate system unit, and translating the manipulator coordinate system according to the coordinate system unit;
acquiring a third position coordinate corresponding to a datum point in the object to be detected under the object to be detected coordinate system;
acquiring a fourth position coordinate corresponding to the datum point in the object to be measured under the coordinate system of the manipulator with the zoom completed;
and determining a coordinate translation matrix according to the position relation of the datum points in the third position coordinate and the fourth position coordinate.
In one embodiment, the step of determining the coordinate transformation result corresponding to the object to be measured according to the coordinate transformation matrix and the coordinate translation matrix includes:
acquiring an initial position coordinate of an object to be detected under an image coordinate system;
performing rotary transformation on the initial position coordinates by using a coordinate transformation matrix to obtain position rotary coordinates of the object to be detected under a manipulator coordinate system;
performing translation transformation on the position rotation coordinates by using the coordinate translation matrix to obtain position translation coordinates of the object to be detected under the object to be detected coordinate system;
and determining the position translation coordinate as a coordinate conversion result corresponding to the initial position coordinate.
In one embodiment, the step of determining the position translation coordinate as a coordinate conversion result corresponding to the initial position coordinate includes:
Acquiring a mechanical deviation value between a photographing area and a code spraying area;
and determining a coordinate conversion result corresponding to the initial position coordinate according to the addition result of the position translation coordinate and the mechanical deviation value.
In one embodiment, when the object to be measured is detected to be placed on the conveyor belt, the conveyor belt is controlled by the in-situ sensor to convey the object to the code spraying area, comprising:
placing an object to be detected on a conveyor belt and sending a conveying instruction to the conveyor belt;
when the object to be detected is detected to be placed on the conveyor belt, controlling the conveyor belt to execute a conveying instruction, and acquiring working parameters of the original point sensor in real time;
and after the working parameters of the original point sensor are used for determining that the object to be measured reaches the code spraying area, the conveyor belt is controlled to stop conveying.
The coordinate conversion method, the coordinate conversion system and the electronic equipment provided by the embodiment of the invention are applied to a production line for carrying a manipulator; the pipeline comprises: the device comprises a conveyor belt, a shooting module, an origin sensor and an inkjet manipulator; a photographing area and a code spraying area are arranged in the conveyor belt; the shooting module is located in the shooting area, and the shooting module at least comprises: the first line scanning camera and the second line scanning camera are symmetrically arranged on two sides of the conveyor belt; the original point sensor and the ink-jet manipulator are positioned in the code-jet area. In the process of coordinate conversion, after detecting that an object to be detected is placed on a conveyor belt, controlling the conveyor belt to convey the object to be detected to a code spraying area by using an original point sensor; a datum point is arranged in the object to be measured; the original point sensor is used for initializing a coordinate system of the object to be detected corresponding to the object to be detected. And then controlling the ink-jet manipulator to spray a plurality of ink points into preset positions of the object to be tested according to a preset spraying scheme, and acquiring first position coordinates of the ink points under a manipulator coordinate system corresponding to the ink-jet manipulator. And then, after the conveyor belt is controlled to convey the sprayed object to be detected to a photographing area, the first line scanning camera and the second line scanning camera are started to photograph the object to be detected, and a first picture photographed by the first line scanning camera and a second picture photographed by the second line scanning camera are respectively obtained. And determining second position coordinates corresponding to the ink points in the first picture and the second picture according to the image coordinate system by establishing an image coordinate system corresponding to the first picture and the second picture, and determining a coordinate transformation matrix by utilizing the first position coordinates and the second position coordinates, wherein the coordinate transformation matrix is used for converting the image coordinate system into a manipulator coordinate system. And then establishing an object to be measured coordinate system corresponding to the object to be measured, respectively obtaining a third position coordinate corresponding to the datum point of the object to be measured under the object to be measured coordinate system and a fourth position coordinate under the manipulator coordinate system, and determining a coordinate translation matrix by utilizing the third position coordinate and the fourth position coordinate, wherein the coordinate translation matrix is used for converting the manipulator coordinate system into the object to be measured coordinate system. And finally, determining a coordinate conversion result corresponding to the object to be detected according to the coordinate conversion matrix and the coordinate translation matrix. According to the scheme, the manipulator coordinate system is used as an intermediate medium, the conversion relation between the image coordinate system and the manipulator coordinate system is obtained, and the conversion relation between the manipulator coordinate system and the object coordinate system to be detected is obtained, so that the conversion between the image coordinate system and the object coordinate system to be detected is completed, and finally, the conversion relation between the defect position of the object to be detected in the digital image and the defect position under the coordinate system of the object to be detected is obtained. The scheme is applicable to shooting a large-size linear array camera, and can realize coordinate conversion of an object to be detected moving in a production line, so that the universality is improved.
Additional features and advantages of the invention will be set forth in the description which follows, or in part will be obvious from the description, or may be learned by practice of the invention.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a production line for carrying a manipulator according to an embodiment of the present invention;
FIG. 2 is a flowchart of a coordinate transformation method according to an embodiment of the present invention;
fig. 3 is a flowchart of step S202 in a coordinate transformation method according to an embodiment of the present invention;
fig. 4 is a flowchart of step S203 in a coordinate transformation method according to an embodiment of the present invention;
Fig. 5 is a flowchart of step S204 in a coordinate transformation method according to an embodiment of the present invention;
fig. 6 is a flowchart of step S205 in a coordinate transformation method according to an embodiment of the present invention;
fig. 7 is a flowchart of step S206 in a coordinate transformation method according to an embodiment of the present invention;
fig. 8 is a flowchart of step S704 in a coordinate transformation method according to an embodiment of the present invention;
fig. 9 is a flowchart of step S201 in a coordinate transformation method according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a board to be tested with ink dots being ejected in a coordinate conversion method according to an embodiment of the present invention;
fig. 11 is a schematic diagram of coordinate system conversion in a coordinate conversion method according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a coordinate transformation system according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon:
1210-a first control unit; 1220-second control unit; 1230-a third control unit; 1240-a coordinate transformation matrix determining unit; 1250-a coordinate translation matrix determination unit; 1260—a coordinate conversion execution unit;
a 101-processor; 102-memory; 103-bus; 104-communication interface.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In industrial flow line production, defect detection is an important link, whether defects exist in the to-be-detected piece is judged through relevant detection equipment, and the to-be-detected piece with the defects is screened to ensure the quality of products. In the defect detection, a plurality of detection links are involved, the defect detection of the vehicle interior decoration plate is taken as an example, the piece to be detected is the vehicle interior decoration plate, the plate moves to a shooting area under the action of a production line and then is shot by a corresponding camera to obtain a digital image, then the defects contained in the plate are detected through an image recognition related algorithm, and the detected defects can be marked by spraying by using a mechanical arm, so that detection personnel can check the plate conveniently. As can be seen, the above process involves various devices such as a manipulator and a camera, and multiple coordinate systems corresponding to the devices need to be used, such as a manipulator coordinate system, an image coordinate system, and an object coordinate system. Because of the plurality of devices, the devices respectively correspond to the coordinate systems of the devices, and the data of the object to be detected can be described only by a complex coordinate corresponding relation, so that the defect position in the digital image corresponds to the actual defect position of the object to be detected.
In the prior art, in the process of corresponding the digital image position and the actual defect position, the actual position of the defect in the object to be detected is mainly realized through single pixel precision in the transverse and longitudinal directions of the digital image, and the relationship between the pixel number and the single pixel precision is utilized to calculate the actual position of the defect in the object to be detected. The camera used in the actual scene is a line scan camera, and the acquisition pulse sent by the encoder rotating on the conveyor belt may cause uneven conveyor belt, so that the acquisition signal of the encoder shakes, and the image part is stretched or compressed. In the code spraying process, the plate and the conveyor belt slide relatively, so that accuracy deviation of the movement direction is caused, and the coordinate conversion accuracy is affected. Therefore, the existing process of corresponding the digital image position and the actual defect position has more limitations, can only be suitable for static environments, can only use an area array camera with consistent accuracy in the transverse and longitudinal directions, cannot be used in a production line provided with a linear array camera, and has the technical problem of poor universality. Based on the above, the embodiment of the invention provides a coordinate conversion method, a system and an electronic device, wherein a manipulator coordinate system is used as an intermediate medium, and the conversion relation between an image coordinate system and the manipulator coordinate system is obtained, and the conversion relation between the manipulator coordinate system and a coordinate system of an object to be detected is obtained, so that the conversion of the image coordinate system and the coordinate system of the object to be detected is completed, and finally the conversion relation between the defect position of the object to be detected in a digital image and the defect position of the object to be detected under the coordinate system of the object to be detected is obtained. The scheme is applicable to shooting a large-size linear array camera, and can realize coordinate conversion of an object to be detected moving in a production line, so that the universality is improved.
For the convenience of understanding the present embodiment, first, a coordinate conversion method disclosed in the present embodiment is described in detail, and the method is applied to a pipeline carrying a manipulator; as shown in fig. 1, the pipeline includes: the device comprises a conveyor belt, a shooting module, an origin sensor and an inkjet manipulator; a photographing area and a code spraying area are arranged in the conveyor belt; the shooting module is located in the shooting area, and the shooting module at least comprises: the first line scanning camera and the second line scanning camera are symmetrically arranged on two sides of the conveyor belt; the original point sensor and the ink-jet manipulator are positioned in the code-jet area.
On the basis of the pipeline, the coordinate conversion method is shown in fig. 2 and comprises the following steps of;
step S201, when detecting that an object to be detected is placed on a conveyor belt, controlling the conveyor belt to convey the object to be detected to a code spraying area by using an original point sensor; wherein, the object to be measured is provided with a datum point; the original point sensor is used for initializing a coordinate system of the object to be detected corresponding to the object to be detected.
The photographing area and the code spraying area in the conveyor belt are arranged at different positions, and the object to be measured can be firstly conveyed to the code spraying area and then conveyed to the photographing area under the drive of the conveyor belt. The condition that the object to be detected passes through the photographing area and then is transmitted to the code spraying area occurs in the conveyor belt in the actual scene, the object to be detected can be firstly placed on the conveyor belt in front of the code spraying area in a manual mode, and the object to be detected is placed in the photographing area manually after the ink spraying is finished.
The conveyer belt can be provided with corresponding sensors to detect whether an object to be detected is placed in the conveyer belt, and after the object to be detected is detected to be placed in the conveyer belt, the object to be detected finally enters a code spraying area under the action of the conveyer belt. The process of entering the code spraying area is also controlled by an original point sensor, the original point sensor can be arranged at the edge of the code spraying area, and when the object to be detected is triggered to the original point sensor, the object to be detected can be controlled to enter the preset position of the code spraying area. Specifically, the object to be measured enters the ink-jet range of the ink-jet manipulator to jet ink. The conveyor belt is operated all the time during the ink jet process, and the manipulator is used for catching the ink jet. When the object to be detected triggers the original point sensor, the object to be detected enters the movement range of the manipulator, and the manipulator ejects ink on the object to be detected along with the forward movement of the object to be detected.
Step S202, controlling an ink jet manipulator to spray a plurality of ink points into preset positions of an object to be tested according to a preset spraying scheme, and obtaining first position coordinates of the ink points under a manipulator coordinate system corresponding to the ink jet manipulator.
After the object to be detected enters the code spraying area, the ink spraying manipulator is controlled to spray ink points into the object to be detected according to a spraying scheme. The ink dots in the spraying scheme are generally arranged in a regular manner, and are sprayed in an object to be tested in a mode of one ink dot array. The preset position of the ink bearing point in the object to be detected is generally a smooth plane, so that the ink bearing point can be uniformly sprayed on the surface of the object to be detected.
The position of the origin sensor can be used as the origin of a mechanical coordinate system, and the mechanical coordinate system is established by combining the shape of the code spraying area through the origin. The manipulator coordinate system is a two-dimensional plane coordinate system, and the plane of the manipulator coordinate system is parallel to the plane of the conveyor belt. After the mechanical coordinate system is established, corresponding coordinate values can be obtained according to the positions of the ink points, and then the first position coordinates of the ink points are determined.
Step S203, after the conveyor belt is controlled to convey the sprayed object to be tested to the photographing area, the first line scanning camera and the second line scanning camera are started to photograph the object to be tested, and a first picture photographed by the first line scanning camera and a second picture photographed by the second line scanning camera are respectively obtained.
After the spraying of the object to be detected is finished, the conveying belt is controlled to convey the object to be detected to a photographing area, and a corresponding sensor can be arranged in the conveying belt to detect whether the object to be detected enters the photographing area, so that the first line scanning camera and the second line scanning camera are started to photograph the object to be detected. Because the shooting module is provided with two line scanning cameras which are symmetrically arranged on two sides of the conveyor belt, ink points in the first picture and the second picture can be symmetrically distributed under a certain condition.
Step S204, an image coordinate system corresponding to the first picture and the second picture is established, second position coordinates corresponding to ink points in the first picture and the second picture are determined according to the image coordinate system, and a coordinate transformation matrix is determined by utilizing the first position coordinates and the second position coordinates; the coordinate transformation matrix is used for converting the image coordinate system into a manipulator coordinate system.
After the first picture and the second picture are acquired, one corner in the pictures can be selected to establish a corresponding image coordinate system, so that coordinates corresponding to ink points in the first picture and the second picture are acquired, and the coordinates are used as second position coordinates. Specifically, an image coordinate system is established by selecting the upper left corner of the picture, the upper left corner is taken as an origin, the right direction is the positive direction of X, and the downward direction is the positive direction of Y. The first position coordinates are coordinate values in the manipulator coordinate system, and the second position coordinates are coordinate values in the image coordinate system, so that affine transformation can be performed on the first position coordinates and the second position coordinates to obtain a coordinate transformation matrix representing the relation between the first position coordinates and the second position coordinates.
Step S205, a coordinate system of an object to be measured corresponding to the object to be measured is established by utilizing an original point sensor, a third position coordinate corresponding to a reference point of the object to be measured under the coordinate system of the object to be measured and a fourth position coordinate under the coordinate system of a manipulator are respectively obtained, and a coordinate translation matrix is determined by utilizing the third position coordinate and the fourth position coordinate; the coordinate translation matrix is used for converting the manipulator coordinate system into an object coordinate system to be measured.
Because the reference point is arranged in the object to be measured, a coordinate system of the object to be measured corresponding to the object to be measured can be established through the reference point, and then the coordinate values of the reference point under the coordinate system of the object to be measured and the coordinate system of the manipulator are as follows: and obtaining a transformation relation between the third position coordinate and the fourth position coordinate. Generally, the units of the object coordinate system and the manipulator coordinate system are consistent, and are usually millimeter, so that only translational relations such as translation, rotation, overturning and the like are involved between the two. In an actual scene, the positive directions of the manipulator coordinate system and the object coordinate system to be detected are the same, so that the coordinate translation matrix between the third position coordinate and the fourth position coordinate can be determined according to the translation relation between the third position coordinate and the fourth position coordinate.
Step S206, determining a coordinate conversion result corresponding to the object to be detected according to the coordinate conversion matrix and the coordinate translation matrix.
From the viewpoint of input and output, an image coordinate system is input, an object coordinate system is output, and a manipulator coordinate system is used as an intermediate medium. The image coordinate system obtains a manipulator coordinate system according to the coordinate transformation matrix, and the manipulator coordinate system obtains a final object coordinate system to be measured according to the coordinate translation matrix. And the coordinate value of the object to be measured under the image coordinate system is converted according to the above, and finally the coordinate conversion result of the object to be measured under the coordinate system is obtained.
In some embodiments, the step S202 of controlling the inkjet manipulator to spray a plurality of ink points into preset positions of the object to be measured according to a preset spraying scheme, and obtaining first position coordinates of the ink points under a manipulator coordinate system corresponding to the inkjet manipulator, as shown in fig. 3, includes:
step S301, a spraying scheme is obtained; wherein, at least, the spraying scheme comprises: the number of ink dots, the size data of the ink dots, the position data of the ink dots and the spraying time data of the ink dots;
step S302, using a spraying scheme to control an ink-jet manipulator to spray ink points to a preset position of an object to be detected; wherein, the ink points in the preset position are symmetrically distributed along the central axis of the object to be detected; the central axis of the object to be measured is parallel to the conveying direction of the conveying belt;
step S303, after a manipulator coordinate system corresponding to the ink-jet manipulator is established, a first position coordinate corresponding to the ink point under the manipulator coordinate system is obtained.
The ink dots in the spraying scheme are generally arranged according to a rule, are sprayed in an object to be tested in a mode of one ink dot array, and meanwhile, the ink dots are required to be uniformly distributed on two sides of the object to be tested according to the symmetry axis of the conveyor belt. After the first line scanning camera and the second line scanning camera shoot the object to be detected, the quantity and the arrangement mode of the ink points in the generated first picture and the generated second picture are symmetrical at the same time. Therefore, the number of the ink dots is set correspondingly, the size and the spraying position of the ink dots are controlled, and the spraying time of the ink dots is controlled. Specifically, the inkjet printer may set a spray point or a spray pattern. Is set to a dot, and the shorter the ink ejection time is, the smaller the dot is ejected. After the spraying scheme is determined, ink points are sprayed in the object to be detected by using the ink-jet mechanical arm, so that the ink points in the object to be detected are symmetrically distributed along the central axis of the object to be detected, and the ink points in the first picture and the second picture can be symmetrical when the image is shot later.
And after the ink points are sprayed, acquiring first position coordinates of the ink points under the manipulator coordinate system through the established manipulator coordinate system.
In some embodiments, after the conveyor belt is controlled to convey the sprayed object to be measured to the photographing area, the first line scan camera and the second line scan camera are started to photograph the object to be measured, and the step S203 of acquiring the first picture photographed by the first line scan camera and the second picture photographed by the second line scan camera respectively includes, as shown in fig. 4:
step S401, placing the sprayed object to be tested in a conveyor belt, and controlling the conveyor belt to convey the object to be tested to a photographing area;
step S402, when an object to be detected is transmitted to the shooting areas of the first line scanning camera and the second line scanning camera, the first line scanning camera and the second line scanning camera are controlled to shoot the object to be detected, and a first picture shot by the first line scanning camera and a second picture shot by the second line scanning camera are respectively obtained; the first line scanning camera and the second line scanning camera are the same in height from the conveyor belt; the first line scanning cameras and the second line scanning cameras are symmetrically distributed along the central axis of the conveyor belt, and the central axis of the conveyor belt is parallel to the conveying direction of the conveyor belt.
After the spraying of the object to be detected is finished, the object to be detected is conveyed to a photographing area by utilizing the conveying belt. Corresponding sensors can be arranged in the conveyor belt to detect whether an object to be detected enters a photographing area or not, and then the first line scanning camera and the second line scanning camera are controlled to photograph the object to be detected. The first line scanning camera and the second line scanning camera in the embodiment have the same height from the conveyor belt, the first line scanning camera and the second line scanning camera are symmetrically distributed along the central axis of the conveyor belt, and the central axis of the conveyor belt is parallel to the conveying direction of the conveyor belt, so that the ink points in the first picture and the ink points in the second picture can be ensured to be symmetrical.
In some embodiments, establishing an image coordinate system corresponding to the first picture and the second picture, determining second position coordinates corresponding to the ink points in the first picture and the second picture according to the image coordinate system, and determining a coordinate transformation matrix by using the first position coordinates and the second position coordinates, as shown in fig. 5, including:
step S501, obtaining fitting circles of a first picture and a second picture, and obtaining ink points contained in the first picture and the second picture by using the fitting circles; wherein the ink dots are round ink dots;
Step S502, respectively establishing an image coordinate system corresponding to the first picture and the second picture by using preset vertex positions in the first picture and the second picture, and determining second position coordinates corresponding to ink points in the first picture and the second picture;
step S503, calculating an affine transformation matrix of the image coordinate system converted into the manipulator coordinate system according to the first position coordinates and the second position coordinates, and determining the affine transformation matrix as the coordinate transformation matrix.
After the first picture and the second picture are obtained, any corner of the first picture and the second picture can be utilized to establish a corresponding image coordinate system, so that coordinates corresponding to ink points in the first picture and the second picture are obtained. It should be noted that, the fitted circle obtaining process may be implemented by using a related circle transformation algorithm, and because the ink dots are not perfect circles, it is necessary to fit the result of the circle transformation, so as to obtain a perfect circle fitted circle. After the fitting circle is obtained, the circle center coordinate can be obtained through a circle transformation algorithm of digital image processing, so that the circle center coordinate is determined to be the position coordinate of the ink point, and the second position coordinate is determined.
Because the first position coordinate is the coordinate value under the manipulator coordinate system, the second position coordinate is the coordinate value under the image coordinate system, and the affine transformation matrix of the first position coordinate and the affine transformation matrix of the second position coordinate can be obtained by calculation through an affine transformation correlation algorithm, so that the affine transformation relation between the image coordinate system and the manipulator coordinate system is obtained.
In some embodiments, a coordinate system of an object to be measured corresponding to the object to be measured is established, a third position coordinate of a reference point of the object to be measured corresponding to the object to be measured in the coordinate system of the object to be measured and a fourth position coordinate of the reference point of the object to be measured in the coordinate system of the manipulator are respectively obtained, and a coordinate translation matrix is determined by using the third position coordinate and the fourth position coordinate, as shown in fig. 6, including:
step S601, establishing a coordinate system of an object to be detected corresponding to the object to be detected by using a preset coordinate system unit, and translating the manipulator coordinate system according to the coordinate system unit;
step S602, obtaining a third position coordinate corresponding to a datum point in the object under test in the object coordinate system;
step S603, obtaining a fourth position coordinate corresponding to the datum point in the object under test under the coordinate system of the manipulator after scaling is completed;
in step S604, a coordinate translation matrix is determined according to the positional relationship of the reference points in the third position coordinates and the fourth position coordinates.
In an actual scene, an object coordinate system corresponding to the object to be measured is established according to a preset coordinate system unit, and the coordinate system unit can be set to be millimeter. And the manipulator coordinate system performs translation operation according to millimeters, so that the manipulator coordinate system and the object coordinate system to be measured are the same in unit.
The coordinate system of the object to be measured can be realized by using the datum point arranged at the upper left corner in the establishing process, namely the position of the upper left corner is the origin; the origin of the manipulator coordinate system is usually disposed in the central area, so that the corresponding translation amount can be determined by using the positional relationship between the reference point and the object coordinate system and the manipulator coordinate system. Because the coordinate system of the object to be measured and the coordinate system of the manipulator have been scaled, the coordinate translation matrix corresponding to the reference point can be determined by the third position coordinate corresponding to the reference point in the object to be measured under the coordinate system of the object to be measured and the fourth position coordinate corresponding to the reference point in the object to be measured under the coordinate system of the manipulator that has been scaled.
In some embodiments, the step S206 of determining the coordinate transformation result corresponding to the object to be measured according to the coordinate transformation matrix and the coordinate translation matrix, as shown in fig. 7, includes:
step S701, obtaining initial position coordinates of an object to be detected under an image coordinate system;
step S702, carrying out rotation transformation on the initial position coordinates by utilizing a coordinate transformation matrix to obtain position rotation coordinates of an object to be detected under a manipulator coordinate system;
step S703, performing translation transformation on the position rotation coordinate by using the coordinate translation matrix to obtain a position translation coordinate of the object to be measured under the object coordinate system to be measured;
In step S704, the position translation coordinate is determined as the coordinate conversion result corresponding to the initial position coordinate.
In the specific implementation process, an initial position coordinate of an object to be detected under an image coordinate system is used as an input value, and the initial position coordinate is subjected to rotary transformation by utilizing a coordinate transformation matrix to obtain a position rotary coordinate of the object to be detected under a manipulator coordinate system; and then carrying out translation transformation on the position rotation coordinate by using the coordinate translation matrix to obtain the position translation coordinate of the object to be detected under the object to be detected coordinate system, and finally determining the position translation coordinate as a coordinate conversion result corresponding to the initial position coordinate, thereby realizing the complete coordinate conversion process.
In some embodiments, the step S704 of determining the position translation coordinate as the coordinate conversion result corresponding to the initial position coordinate, as shown in fig. 8, includes:
step S801, obtaining a mechanical deviation value between a photographing area and a code spraying area;
step S802, determining a coordinate conversion result corresponding to the initial position coordinate according to the addition result of the position translation coordinate and the mechanical deviation value.
In an actual scene, the photographing area and the code spraying area are uneven, and deviation exists in the horizontal direction, so that a mechanical deviation value between the photographing area and the code spraying area is firstly obtained, and then the mechanical deviation value and the position translation coordinate are added to obtain a final coordinate conversion result. Specifically, in the mechanical deviation acquisition process, the object to be measured flows to the lower side of the manipulator from the time of the initial ink ejection, and then the ink is ejected. The position of the object to be measured is not manually interfered, so that the relative relation between the object to be measured and the manipulator needs to be determined. The position of the object to be measured stopped on the conveyor belt may be forward or backward, so that the calibrated transformation relationship generates a certain deviation in the moving direction. It is therefore necessary to add the position translation coordinates and the mechanical deviation values to compensate for this deviation. In popular terms, the position of the ink jet at the time of ink jet production is inferior by this distance if no mechanical deviation value is added. The distance is measured on the object to be measured and is added to the ink jet position which is the position where the object to be measured is actually to be ejected through a series of front conversion.
In some embodiments, when it is detected that the object is placed on the conveyor belt, the step S201 of controlling the conveyor belt to convey the object to the code spraying area by using the in-situ sensor includes:
step S901, placing an object to be measured on a conveyor belt, and sending a transmission instruction to the conveyor belt;
step S902, after detecting that an object to be detected is placed on a conveyor belt, controlling the conveyor belt to execute a conveying instruction, and acquiring working parameters of an original point sensor in real time;
in step S903, after determining that the object to be measured reaches the code spraying area by using the working parameters of the origin sensor, the conveyor belt is controlled to stop conveying.
In the implementation process, the original point sensor can be set as trigger equipment, the original point sensor can be set as a related sensor with a detection function, and after the original point sensor detects that an object to be detected reaches the code spraying area, the object to be detected can be controlled to enter a preset position of the code spraying area, and the conveyor belt is controlled to stop conveying.
The trigger device can be realized through the acquisition pulse sent by the related encoder, the encoder frame can be arranged at the tail end of the conveyor belt, the encoder roller is pressed on the conveyor belt, the conveyor belt is arranged at the tail end on the roller, and the spring is additionally arranged to increase the pressing force of the encoder roller, so that the encoder roller can not slide. And the camera trigger signal is filtered at the camera end, and only the signal of the forward motion of the encoder is collected. The reverse encoder signal due to belt stop, jitter, or inversion is recorded, and the reverse pulses are cancelled out before image acquisition begins when the belt is operating properly.
The conveyor belt can use materials with larger textures, so that friction force is increased, the area of the plate is larger, and the conveyor belt has a certain weight, so that the probability of relative sliding is reduced.
In one embodiment, the object to be tested is a vehicle interior trim panel, a board is first placed on a conveyor belt, and the conveyor belt is controlled to flow the board to a code spraying area, and then the conveyor belt is stopped. And then controlling the code spraying areas to spray 18 points in the preset areas of the board respectively. These 18 points can be imaged in the first and second pictures by the first and second line scan cameras, respectively, as shown in fig. 10.
The position of the original point sensor can be used as an original point of a mechanical coordinate system, the mechanical coordinate system is established by combining the original point with the shape of the code spraying area, and after the mechanical coordinate system is established, the corresponding coordinate value can be obtained according to the position of the ink point, so that the first position coordinate of the ink point is determined.
And (3) the plate with the ink dots is operated in the conveyor belt again, the plate reaches a photographing area under the drive of the conveyor belt, two pictures are obtained by photographing through a first line scanning camera and a second line scanning camera which are arranged on the left side and the right side, the pictures are recorded as a first picture and a second picture, after the first picture and the second picture are obtained, one corner in the pictures can be selected to establish a corresponding image coordinate system, and therefore coordinates corresponding to the ink dots in the first picture and the second picture are obtained and used as second position coordinates. And calculating the central position coordinates of each ink point in each graph through relevant image processing, wherein the total coordinates are 18.
The first picture and the second picture are processed respectively, a first position coordinate and a second position coordinate corresponding to the ink point in the first picture can be selected first, an affine transformation matrix of the first picture and the second picture is obtained by using a calculation method of the affine transformation matrix, and the corresponding coordinate transformation matrix is determined; similarly, the second picture also acquires the corresponding coordinate transformation matrix according to the above process, which is not described again.
Since the board is subjected to the following ink jet marking by using the ink jet manipulator in the movement, the ink jet manipulator is provided with the origin sensor in front, and after the upper left corner of the movement direction of the board is detected by the origin sensor, the position is set as the origin of the manipulator. The origin of the robot coordinate system is at the center of the motion range when the robot is vertically downward, and the origin of the plate is at the upper left corner of the plate, which requires translation transformation of the robot's motion coordinate system to the plate's coordinate system. The coordinate system units of the manipulator and the board are millimeter units, so that the relation between the manipulator and the board only involves translation, rotation or overturning. The coordinate system of the manipulator is in positive direction with the coordinate system of the plate, so that only the translation process is involved. And determining a coordinate translation matrix by using the third position coordinate and the fourth position coordinate corresponding to the datum point of the object to be measured under the object to be measured coordinate system and the fourth position coordinate under the manipulator coordinate system.
After the coordinate transformation matrix and the coordinate translation matrix are determined, the coordinate transformation matrix and the coordinate translation matrix are connected in series, so that the plate coordinates in the image coordinate system are converted into the coordinates in the plate coordinate system, and the method is particularly shown in fig. 11.
As can be seen from the coordinate conversion method mentioned in the above embodiment, the method can utilize the manipulator coordinate system as an intermediate medium, and obtain the conversion relationship between the image coordinate system and the manipulator coordinate system, and obtain the conversion relationship between the manipulator coordinate system and the object coordinate system, thereby completing the conversion between the image coordinate system and the object coordinate system, and finally obtaining the conversion relationship between the defect position of the object to be detected in the digital image and the defect position under the coordinate system of the object to be detected. The method is suitable for shooting a large-size linear array camera, can realize coordinate conversion of the object to be detected moving in the assembly line, and improves universality.
Corresponding to the method embodiment, the embodiment of the invention provides a coordinate conversion system, which is applied to a production line of a carrying manipulator; wherein the pipeline comprises: the device comprises a conveyor belt, a shooting module, an origin sensor and an inkjet manipulator; a photographing area and a code spraying area are arranged in the conveyor belt; the shooting module is located in the shooting area, and the shooting module at least comprises: the first line scanning camera and the second line scanning camera are symmetrically arranged on two sides of the conveyor belt; the original point sensor and the ink-jet manipulator are positioned in the code-jet area;
As shown in fig. 12, the coordinate conversion system includes:
a first control unit 1210, configured to control the conveyor belt to convey the object to be detected to the code spraying area by using the origin sensor after detecting that the object to be detected is placed on the conveyor belt; wherein, the object to be measured is provided with a datum point; the original point sensor is used for initializing a coordinate system of the object to be detected corresponding to the object to be detected;
the second control unit 1220 is configured to control the inkjet manipulator to spray the plurality of ink points into preset positions of the object to be tested according to a preset spraying scheme, and obtain a first position coordinate of the ink points under a manipulator coordinate system corresponding to the inkjet manipulator;
the third control unit 1230 is configured to control the conveyor belt to transfer the sprayed object to be tested to a photographing area, and then start the first line scanning camera and the second line scanning camera to photograph the object to be tested, so as to respectively obtain a first picture photographed by the first line scanning camera and a second picture photographed by the second line scanning camera;
a coordinate transformation matrix determining unit 1240, configured to establish an image coordinate system corresponding to the first picture and the second picture, determine second position coordinates corresponding to the ink points in the first picture and the second picture according to the image coordinate system, and determine a coordinate transformation matrix using the first position coordinates and the second position coordinates; the coordinate transformation matrix is used for converting the image coordinate system into a manipulator coordinate system;
The coordinate translation matrix determining unit 1250 is configured to establish an object coordinate system corresponding to the object to be measured, respectively obtain a third position coordinate corresponding to the reference point of the object to be measured under the object coordinate system and a fourth position coordinate corresponding to the reference point of the object to be measured under the manipulator coordinate system, and determine a coordinate translation matrix by using the third position coordinate and the fourth position coordinate; the coordinate translation matrix is used for converting the manipulator coordinate system into an object coordinate system to be measured;
the coordinate conversion execution unit 1260 is configured to determine a coordinate conversion result corresponding to the object to be measured according to the coordinate transformation matrix and the coordinate translation matrix.
In some embodiments, the second control unit 1220 is further configured to: acquiring a spraying scheme; wherein, at least, the spraying scheme comprises: the number of ink dots, the size data of the ink dots, the position data of the ink dots and the spraying time data of the ink dots; controlling an ink-jet manipulator to spray ink points to a preset position of an object to be tested by using a spraying scheme; wherein, the ink points in the preset position are symmetrically distributed along the central axis of the object to be detected; the central axis of the object to be measured is parallel to the conveying direction of the conveying belt; after a manipulator coordinate system corresponding to the ink jet manipulator is established, a first position coordinate corresponding to the ink point under the manipulator coordinate system is obtained.
In some embodiments, the third control unit 1230 is also configured to: placing the sprayed object to be tested in a conveyor belt, and controlling the conveyor belt to convey the object to be tested to a photographing area; when an object to be detected is transmitted to shooting areas of a first line scanning camera and a second line scanning camera, the first line scanning camera and the second line scanning camera are controlled to shoot the object to be detected, and a first picture shot by the first line scanning camera and a second picture shot by the second line scanning camera are respectively obtained; the first line scanning camera and the second line scanning camera are the same in height from the conveyor belt; the first line scanning cameras and the second line scanning cameras are symmetrically distributed along the central axis of the conveyor belt, and the central axis of the conveyor belt is parallel to the conveying direction of the conveyor belt.
In some embodiments, the coordinate transformation matrix determining unit 1240 is further configured to: acquiring fitting circles in the first picture and the second picture, and acquiring ink points contained in the first picture and the second picture by using the fitting circles; wherein the ink dots are round ink dots; respectively establishing an image coordinate system corresponding to the first picture and the second picture by utilizing the preset vertex positions in the first picture and the second picture, and determining second position coordinates corresponding to ink points in the first picture and the second picture; and calculating an affine transformation matrix converted into a manipulator coordinate system by the image coordinate system according to the first position coordinate and the second position coordinate, and determining the affine transformation matrix as the coordinate transformation matrix.
In some embodiments, the coordinate translation matrix determination unit 1250 is further configured to: establishing an object to be measured coordinate system corresponding to the object to be measured by using a preset coordinate system unit, and translating the manipulator coordinate system according to the coordinate system unit; acquiring a third position coordinate corresponding to a datum point in the object to be detected under the object to be detected coordinate system; acquiring a fourth position coordinate corresponding to the datum point in the object to be measured under the coordinate system of the manipulator with the zoom completed; and determining a coordinate translation matrix according to the position relation of the datum points in the third position coordinate and the fourth position coordinate.
In some embodiments, the coordinate conversion execution unit 1260 is further configured to: acquiring an initial position coordinate of an object to be detected under an image coordinate system; performing rotary transformation on the initial position coordinates by using a coordinate transformation matrix to obtain position rotary coordinates of the object to be detected under a manipulator coordinate system; performing translation transformation on the position rotation coordinates by using the coordinate translation matrix to obtain position translation coordinates of the object to be detected under the object to be detected coordinate system; and determining the position translation coordinate as a coordinate conversion result corresponding to the initial position coordinate.
In some embodiments, the coordinate conversion execution unit 1260 is further configured to, in determining the position translation coordinate as a coordinate conversion result corresponding to the initial position coordinate: acquiring a mechanical deviation value between a photographing area and a code spraying area; and determining a coordinate conversion result corresponding to the initial position coordinate according to the addition result of the position translation coordinate and the mechanical deviation value.
In some embodiments, the first control unit 1210 is further configured to: placing an object to be detected on a conveyor belt and sending a conveying instruction to the conveyor belt; when the object to be detected is detected to be placed on the conveyor belt, controlling the conveyor belt to execute a conveying instruction, and acquiring working parameters of the original point sensor in real time; and after the working parameters of the original point sensor are used for determining that the object to be measured reaches the code spraying area, the conveyor belt is controlled to stop conveying.
According to the coordinate conversion system mentioned in the above embodiment, the system can utilize the manipulator coordinate system as an intermediate medium, and the conversion relationship between the image coordinate system and the manipulator coordinate system is obtained, and the conversion relationship between the manipulator coordinate system and the object coordinate system is obtained, so that the conversion between the image coordinate system and the object coordinate system is completed, and finally the conversion relationship between the defect position of the object to be detected in the digital image and the defect position of the object to be detected under the coordinate system of the object to be detected is obtained. The system is suitable for shooting a large-size linear array camera, can realize coordinate conversion of an object to be detected moving in a production line, and improves universality.
The coordinate conversion system provided in this embodiment has the same technical features as the coordinate conversion method provided in the above embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved. For a brief description, reference may be made to the corresponding contents of the foregoing embodiments of the coordinate transformation method, where the embodiments are not mentioned.
The embodiment also provides an electronic device, the structural schematic diagram of which is shown in fig. 13, the device includes a processor 101 and a memory 102; the memory 102 is used for storing one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the steps of the coordinate transformation method described above.
The electronic device shown in fig. 13 further comprises a bus 103 and a communication interface 104, the processor 101, the communication interface 104 and the memory 102 being connected by the bus 103.
The memory 102 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Bus 103 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 13, but not only one bus or type of bus.
The communication interface 104 is configured to connect with at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 message or the IPv4 message to the user terminal through the network interface.
The processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 101 or instructions in the form of software. The processor 101 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks of the disclosure in the embodiments of the disclosure may be implemented or performed. A general purpose processor may be a microcontroller or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present disclosure may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 102, and the processor 101 reads information in the memory 102, and in combination with its hardware, performs the steps of the method of the previous embodiment.
The embodiment of the present invention also provides a readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the coordinate conversion method of the foregoing embodiment.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, indirect coupling or communication connection of devices or units, electrical, mechanical, or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. The coordinate conversion method is characterized by being applied to a production line carrying a manipulator; wherein the pipeline comprises: the device comprises a conveyor belt, a shooting module, an origin sensor and an inkjet manipulator; a photographing area and a code spraying area are arranged in the conveyor belt; the shooting module is located in the shooting area, and the shooting module at least comprises: the first line scanning camera and the second line scanning camera are symmetrically arranged on two sides of the conveyor belt; the original point sensor and the inkjet manipulator are positioned in the code spraying area;
The method comprises the following steps:
when the object to be detected is detected to be placed on the conveyor belt, the original point sensor is used for controlling the conveyor belt to convey the object to be detected to the code spraying area; wherein, the object to be measured is provided with a datum point; the origin sensor is used for initializing an object coordinate system corresponding to the object to be detected;
controlling the ink jet manipulator to spray a plurality of ink points into preset positions of the object to be tested according to a preset spraying scheme, and acquiring first position coordinates of the ink points under a manipulator coordinate system corresponding to the ink jet manipulator;
after the conveyor belt is controlled to convey the sprayed object to be detected to the photographing area, the first line scanning camera and the second line scanning camera are started to photograph the object to be detected, and a first picture photographed by the first line scanning camera and a second picture photographed by the second line scanning camera are respectively obtained;
establishing an image coordinate system corresponding to the first picture and the second picture, determining second position coordinates corresponding to the ink points in the first picture and the second picture according to the image coordinate system, and determining a coordinate transformation matrix by utilizing the first position coordinates and the second position coordinates; the coordinate transformation matrix is used for converting the image coordinate system into the manipulator coordinate system;
Establishing an object coordinate system corresponding to the object to be measured, respectively obtaining a third position coordinate corresponding to the datum point of the object to be measured under the object coordinate system and a fourth position coordinate under the manipulator coordinate system, and determining a coordinate translation matrix by utilizing the third position coordinate and the fourth position coordinate; the coordinate translation matrix is used for converting the manipulator coordinate system into the object coordinate system to be detected;
and determining a coordinate conversion result corresponding to the object to be detected according to the coordinate conversion matrix and the coordinate translation matrix.
2. The coordinate conversion method according to claim 1, wherein the step of controlling the inkjet manipulator to spray a plurality of ink points into a preset position of the object to be measured according to a preset spray scheme and acquiring a first position coordinate of the ink points under a manipulator coordinate system corresponding to the inkjet manipulator comprises:
acquiring the spraying scheme; wherein, at least, the spraying scheme comprises: the number of the ink points, the size data of the ink points, the position data of the ink points and the spraying time data of the ink points;
controlling the ink jet manipulator to spray the ink points to the preset position of the object to be tested by utilizing the spraying scheme; wherein the ink points in the preset positions are symmetrically distributed along the central axis of the object to be detected; the central axis of the object to be detected is parallel to the conveying direction of the conveying belt;
After a manipulator coordinate system corresponding to the ink jet manipulator is established, a first position coordinate corresponding to the ink point under the manipulator coordinate system is obtained.
3. The coordinate conversion method according to claim 1, wherein the step of controlling the conveyor belt to transfer the object to be measured after the spraying is completed to the photographing area, and starting the first line scan camera and the second line scan camera to photograph the object to be measured, and respectively acquiring a first picture photographed by the first line scan camera and a second picture photographed by the second line scan camera, includes:
placing the sprayed object to be tested in the conveyor belt, and controlling the conveyor belt to convey the object to be tested to the photographing area;
when the object to be detected is transmitted to the shooting areas of the first line scanning camera and the second line scanning camera, the first line scanning camera and the second line scanning camera are controlled to shoot the object to be detected, and the first picture shot by the first line scanning camera and the second picture shot by the second line scanning camera are respectively obtained; wherein the first line scan camera and the second line scan camera are the same height from the conveyor belt; the first line scanning cameras and the second line scanning cameras are symmetrically distributed along the central axis of the conveyor belt, and the central axis of the conveyor belt is parallel to the conveying direction of the conveyor belt.
4. The coordinate conversion method according to claim 1, wherein the step of establishing an image coordinate system corresponding to the first picture and the second picture, determining second position coordinates corresponding to the ink dots in the first picture and the second picture according to the image coordinate system, and determining a coordinate conversion matrix using the first position coordinates and the second position coordinates includes:
acquiring fitting circles in the first picture and the second picture, and acquiring the ink points contained in the first picture and the second picture by using the fitting circles; wherein the ink dots are round ink dots;
respectively establishing an image coordinate system corresponding to the first picture and the second picture by utilizing preset vertex positions in the first picture and the second picture, and determining second position coordinates corresponding to the ink points in the first picture and the second picture;
and calculating an affine transformation matrix converted into the manipulator coordinate system by the image coordinate system according to the first position coordinate and the second position coordinate, and determining the affine transformation matrix as the coordinate transformation matrix.
5. The coordinate conversion method according to claim 1, wherein the step of establishing an object coordinate system corresponding to the object to be measured, respectively obtaining a third position coordinate corresponding to the reference point of the object to be measured in the object coordinate system and a fourth position coordinate in the manipulator coordinate system, and determining a coordinate translation matrix using the third position coordinate and the fourth position coordinate, comprises:
establishing a coordinate system of the object to be detected corresponding to the object to be detected by using a preset coordinate system unit, and translating the manipulator coordinate system according to the coordinate system unit;
acquiring the third position coordinate corresponding to the datum point in the object to be detected under the object to be detected coordinate system;
acquiring the fourth position coordinate corresponding to the datum point in the object to be measured under the coordinate system of the manipulator after scaling is completed;
and determining the coordinate translation matrix according to the position relation of the datum points in the third position coordinate and the fourth position coordinate.
6. The coordinate transformation method according to claim 1, wherein the step of determining the coordinate transformation result corresponding to the object to be measured according to the coordinate transformation matrix and the coordinate translation matrix includes:
Acquiring initial position coordinates of the object to be detected under the image coordinate system;
performing rotary transformation on the initial position coordinates by using the coordinate transformation matrix to obtain position rotary coordinates of the object to be detected under the manipulator coordinate system;
performing translation transformation on the position rotation coordinate by using the coordinate translation matrix to obtain a position translation coordinate of the object to be detected under the object to be detected coordinate system;
and determining the position translation coordinate as a coordinate conversion result corresponding to the initial position coordinate.
7. The coordinate conversion method according to claim 6, wherein the step of determining the position translation coordinates as the coordinate conversion result corresponding to the initial position coordinates includes:
acquiring a mechanical deviation value between the photographing area and the code spraying area;
and determining a coordinate conversion result corresponding to the initial position coordinate according to the addition result of the position translation coordinate and the mechanical deviation value.
8. The coordinate conversion method according to claim 1, wherein the controlling the conveyor belt to convey the object to be measured to the code spraying area using the origin sensor after detecting that the object to be measured is placed on the conveyor belt, comprises:
Placing the object to be detected on the conveyor belt and sending a conveying instruction to the conveyor belt;
when the object to be detected is detected to be placed on the conveyor belt, controlling the conveyor belt to execute the conveying instruction, and acquiring working parameters of the original point sensor in real time;
and after the working parameters of the original point sensor are used for determining that the object to be detected reaches the code spraying area, controlling the conveyor belt to stop conveying.
9. The coordinate conversion system is characterized in that the system is applied to a production line carrying a manipulator; wherein the pipeline comprises: the device comprises a conveyor belt, a shooting module, an origin sensor and an inkjet manipulator; the conveyor belt is a unidirectional conveyor belt, and a photographing area and a code spraying area are arranged in the conveyor belt; the shooting module is located in the shooting area, and the shooting module at least comprises: the first line scanning camera and the second line scanning camera are symmetrically arranged on two sides of the conveyor belt; the original point sensor and the inkjet manipulator are positioned in the code spraying area;
the system comprises:
the first control unit is used for controlling the conveyor belt to convey the object to be detected to the code spraying area by utilizing the original point sensor after detecting that the object to be detected is placed on the conveyor belt; wherein, the object to be measured is provided with a datum point; the origin sensor is used for initializing an object coordinate system corresponding to the object to be detected;
The second control unit is used for controlling the ink jet manipulator to spray a plurality of ink points into preset positions of the object to be detected according to a preset spraying scheme, and acquiring first position coordinates of the ink points under a manipulator coordinate system corresponding to the ink jet manipulator;
the third control unit is used for controlling the conveyor belt to convey the sprayed object to be detected to the photographing area, and then starting the first line scanning camera and the second line scanning camera to photograph the object to be detected, and respectively acquiring a first picture photographed by the first line scanning camera and a second picture photographed by the second line scanning camera;
the coordinate transformation matrix determining unit is used for establishing an image coordinate system corresponding to the first picture and the second picture, determining second position coordinates corresponding to the ink points in the first picture and the second picture according to the image coordinate system, and determining a coordinate transformation matrix by utilizing the first position coordinates and the second position coordinates; the coordinate transformation matrix is used for converting the image coordinate system into the manipulator coordinate system;
the coordinate translation matrix determining unit is used for establishing an object coordinate system corresponding to the object to be detected, respectively obtaining a third position coordinate corresponding to the datum point of the object to be detected under the object coordinate system and a fourth position coordinate corresponding to the datum point of the object to be detected under the manipulator coordinate system, and determining a coordinate translation matrix by utilizing the third position coordinate and the fourth position coordinate; the coordinate translation matrix is used for converting the manipulator coordinate system into the object coordinate system to be detected;
And the coordinate conversion execution unit is used for determining a coordinate conversion result corresponding to the object to be detected according to the coordinate transformation matrix and the coordinate translation matrix.
10. An electronic device, comprising: a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, implements the steps of the coordinate conversion method of any of the preceding claims 1 to 8.
CN202311385786.9A 2023-10-25 2023-10-25 Coordinate conversion method, system and electronic equipment Active CN117140558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311385786.9A CN117140558B (en) 2023-10-25 2023-10-25 Coordinate conversion method, system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311385786.9A CN117140558B (en) 2023-10-25 2023-10-25 Coordinate conversion method, system and electronic equipment

Publications (2)

Publication Number Publication Date
CN117140558A CN117140558A (en) 2023-12-01
CN117140558B true CN117140558B (en) 2024-01-16

Family

ID=88902936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311385786.9A Active CN117140558B (en) 2023-10-25 2023-10-25 Coordinate conversion method, system and electronic equipment

Country Status (1)

Country Link
CN (1) CN117140558B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104713885A (en) * 2015-03-04 2015-06-17 中国人民解放军国防科学技术大学 Structured light-assisted binocular measuring method for on-line detection of PCB
CN110281238A (en) * 2019-06-17 2019-09-27 深圳视觉龙智能传感器有限公司 Assembly line multi-robot scaling method, device, computer equipment and storage medium
CN111968185A (en) * 2020-09-01 2020-11-20 深圳辰视智能科技有限公司 Calibration board, nine-point calibration object grabbing method and system based on code definition
WO2021190595A1 (en) * 2020-03-25 2021-09-30 杭州海康机器人技术有限公司 Parcel detection method, device, computing apparatus, logistics system, and storage medium
CN113580149A (en) * 2021-09-30 2021-11-02 湖南大学 Unordered aliasing workpiece grabbing method and system based on key point prediction network
CN114549655A (en) * 2022-01-24 2022-05-27 湖南视比特机器人有限公司 Positioning method, grasping system, storage medium, and program product for an article
CN114612447A (en) * 2022-03-17 2022-06-10 广东美卡智能信息技术有限公司 Image processing method and device based on data calibration and image processing equipment
CN114998446A (en) * 2022-05-30 2022-09-02 深圳棱镜空间智能科技有限公司 Calibration method between camera and manipulator, controller, device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104713885A (en) * 2015-03-04 2015-06-17 中国人民解放军国防科学技术大学 Structured light-assisted binocular measuring method for on-line detection of PCB
CN110281238A (en) * 2019-06-17 2019-09-27 深圳视觉龙智能传感器有限公司 Assembly line multi-robot scaling method, device, computer equipment and storage medium
WO2021190595A1 (en) * 2020-03-25 2021-09-30 杭州海康机器人技术有限公司 Parcel detection method, device, computing apparatus, logistics system, and storage medium
CN111968185A (en) * 2020-09-01 2020-11-20 深圳辰视智能科技有限公司 Calibration board, nine-point calibration object grabbing method and system based on code definition
CN113580149A (en) * 2021-09-30 2021-11-02 湖南大学 Unordered aliasing workpiece grabbing method and system based on key point prediction network
CN114549655A (en) * 2022-01-24 2022-05-27 湖南视比特机器人有限公司 Positioning method, grasping system, storage medium, and program product for an article
CN114612447A (en) * 2022-03-17 2022-06-10 广东美卡智能信息技术有限公司 Image processing method and device based on data calibration and image processing equipment
CN114998446A (en) * 2022-05-30 2022-09-02 深圳棱镜空间智能科技有限公司 Calibration method between camera and manipulator, controller, device and storage medium

Also Published As

Publication number Publication date
CN117140558A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
US10402956B2 (en) Image-stitching for dimensioning
US9747680B2 (en) Inspection apparatus, method, and computer program product for machine vision inspection
KR102577448B1 (en) Hand eye calibration method and system
CN107030699B (en) Pose error correction method and device, robot and storage medium
CN112651949B (en) 3D printing monitoring method and device, electronic equipment and storage medium
CN111178317A (en) Detection positioning method, system, device, electronic equipment and storage medium
GB2531928A (en) Image-stitching for dimensioning
CN110293553B (en) Method and device for controlling mechanical arm to operate object and method and device for model training
KR20160077684A (en) Apparatus and method for tracking object
JPWO2020144784A1 (en) Image processing equipment, work robots, substrate inspection equipment and sample inspection equipment
CN114494420B (en) Flexible circuit board assembling device and method
US10386930B2 (en) Depth determining method and depth determining device of operating body
CN117140558B (en) Coordinate conversion method, system and electronic equipment
US20190228569A1 (en) Apparatus and method for processing three dimensional image
JP6412372B2 (en) Information processing apparatus, information processing system, information processing apparatus control method, and program
CN104677911A (en) Inspection apparatus and method for machine vision inspection
JP2016206909A (en) Information processor, and information processing method
JP6455011B2 (en) Image processing apparatus, contour extraction method, and program
Duchamp et al. A rolling shutter compliant method for localisation and reconstruction
WO2020044866A1 (en) Displacement measurement device and displacement measurement method
CN111060004B (en) Method for determining position of moving object in machine vision, position determining device and position determining system
CN109642872A (en) The filming control method of check device and inspection object
CN113111677B (en) Bar code reading method, device, equipment and medium
JP2008225785A (en) Image recognition device
CN115147475B (en) Target position positioning method, device, equipment and storage medium

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