CN114897851A - Coordinate compensation method, device, equipment and medium based on central projection - Google Patents

Coordinate compensation method, device, equipment and medium based on central projection Download PDF

Info

Publication number
CN114897851A
CN114897851A CN202210559743.7A CN202210559743A CN114897851A CN 114897851 A CN114897851 A CN 114897851A CN 202210559743 A CN202210559743 A CN 202210559743A CN 114897851 A CN114897851 A CN 114897851A
Authority
CN
China
Prior art keywords
coordinate
compensation
coordinate system
target
target part
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210559743.7A
Other languages
Chinese (zh)
Inventor
李晓飞
刘旭
蔡明�
叶春瑶
王悦舜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Aircraft Industrial Group Co Ltd
Original Assignee
Chengdu Aircraft Industrial Group 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 Chengdu Aircraft Industrial Group Co Ltd filed Critical Chengdu Aircraft Industrial Group Co Ltd
Priority to CN202210559743.7A priority Critical patent/CN114897851A/en
Publication of CN114897851A publication Critical patent/CN114897851A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • 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/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • 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
    • G06T2207/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention relates to the field of machine vision, provides a coordinate compensation method, a coordinate compensation device, coordinate compensation equipment and a coordinate compensation medium based on central projection, and solves the technical problems that in the prior art, errors exist between the position of a part obtained by a camera and the actual position of the part, and the guiding precision is influenced. The method comprises the following steps: acquiring a first coordinate of a characteristic point of a target part in a first coordinate system according to a target image; establishing a compensation coordinate system according to the first coordinate system and the characteristic points; acquiring a second coordinate of the feature point in the compensation coordinate system according to the first coordinate; and carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance to obtain a compensation coordinate. The invention can compensate the error between the position of the part obtained by the two-dimensional camera and the actual position of the part through simple steps without increasing equipment, thereby improving the precision of visual guidance.

Description

Coordinate compensation method, device, equipment and medium based on central projection
Technical Field
The invention relates to the field of machine vision, in particular to a coordinate compensation method, a coordinate compensation device, coordinate compensation equipment and a storage medium based on central projection.
Background
In industrial automation, visual guidance is an indispensable link, so that repetitive operation of people can be effectively reduced, the efficiency is improved, and the cost is reduced.
The vision guiding system generally comprises a positioning element, an executing mechanism and a processing unit, wherein the positioning element and the processing unit determine the spatial position of a part to be detected during working, the position and the direction of the part to be detected in a 2D or 3D space are transmitted to the executing mechanism, and the executing mechanism performs operations such as grabbing and processing according to the position of the part. When the two-dimensional camera is used for two-dimensional guidance or three-dimensional guidance of the part, the camera images as a central projection model, so that errors exist between the position of the part acquired by the camera and the actual position of the part, and the final guidance precision is affected.
Disclosure of Invention
In view of this, embodiments of the present invention provide a coordinate compensation method, apparatus, device and medium based on central projection, so as to solve the technical problem in the prior art that an error exists between a position of a part obtained by a camera and an actual position of the part, which affects guidance accuracy.
In order to solve the above technical problem, the present application proposes a coordinate compensation method based on central projection, the method including:
acquiring a first coordinate of a feature point of a target part in a first coordinate system according to a target image, wherein the target image comprises a part tray and the target part placed on the part tray, and the target image is obtained by shooting the part tray through a two-dimensional camera with a target working distance from the part tray; the first coordinate system is established based on the part pallet;
establishing a compensation coordinate system according to the first coordinate system and the characteristic points;
acquiring a second coordinate of the feature point in the compensation coordinate system according to the first coordinate;
and carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance to obtain a compensation coordinate.
As some optional embodiments of the present application, the step of obtaining, according to the target image, first coordinates of the feature point of the target part in the first coordinate system includes:
carrying out graphic processing on the target image to obtain pixel coordinates of the characteristic points;
converting the pixel coordinates according to distortion parameters and calibration parameters of the two-dimensional camera to obtain camera coordinates of the feature points in a camera coordinate system;
determining a first coordinate transformation relation between a camera coordinate system and a first coordinate system;
and obtaining the first coordinate according to the camera coordinate and the first coordinate conversion relation.
As some optional embodiments of the present application, an included angle between the optical axis of the two-dimensional camera and the part tray is within a preset angle range.
As some optional embodiments of the present application, the target part is a cylindrical part, and the characteristic point is a center of a circle of a surface of the cylindrical part.
As some optional embodiments of the present application, the step of establishing a compensation coordinate system according to the first coordinate system and the feature point includes:
and establishing a corresponding compensation coordinate system for each target part on the part tray, wherein the origin of the compensation coordinate system is superposed with the origin of the first coordinate system, the connecting line of the origin and the bottom circle center of the target part is taken as an X axis, and the optical axis of the two-dimensional camera is taken as a Z axis.
As some optional embodiments of the present application, the step of obtaining, according to the first coordinate, a second coordinate of the feature point in the compensated coordinate system includes:
calculating a second coordinate transformation relation between each compensation coordinate system and the first coordinate system;
and acquiring a second coordinate of the characteristic point of each target part under the corresponding compensation coordinate system according to each second coordinate conversion relation.
As some optional embodiments of the present application, the performing error compensation on the second coordinate according to the actual size parameter of the target part and the distance between the two-dimensional camera and the part tray to obtain a compensated coordinate step includes:
noting that the second coordinate is (X) 1 ,Y 1 ,Z 1 ) The compensation coordinate is (X) 2 ,Y 2 ,Z 2 ) The X value of the compensation coordinate is calculated by the following formula:
Figure BDA0003656062960000031
wherein h is the height of the target part, r is the radius of the target part, l is the target working distance,
wherein the Y value of the compensated coordinate is equal to the Y value of the second coordinate is equal to 0, and the Z value of the compensated coordinate is equal to the Z value of the second coordinate.
As some optional embodiments of the present application, after the error compensating the second coordinate according to the actual size parameter of the target part and the distance between the two-dimensional camera and the part tray to obtain a compensated coordinate, the method further includes:
establishing an actuating mechanism coordinate system;
acquiring a third coordinate conversion relation between the coordinate system of the executing mechanism and the coordinate system of the camera;
converting the compensation coordinate according to the first coordinate conversion relation, the second coordinate conversion relation and the third coordinate conversion relation to obtain a third coordinate of the feature point of the target part under the execution mechanism coordinate system after error compensation;
and grabbing the target part according to the third coordinate.
In order to solve the above technical problem, the present application further provides a coordinate compensation apparatus based on central projection, the apparatus including:
the system comprises a first coordinate acquisition module, a second coordinate acquisition module and a third coordinate acquisition module, wherein the first coordinate acquisition module is used for acquiring a first coordinate of a characteristic point of a target part in a first coordinate system according to a target image, the target image comprises a part tray and the target part placed on the part tray, and the target image is obtained by shooting the part tray through a two-dimensional camera with a target working distance away from the part tray; the first coordinate system is established based on the part pallet;
the compensation coordinate system establishing module is used for establishing a compensation coordinate system according to the first coordinate system and the characteristic points;
the second coordinate acquisition module is used for acquiring a second coordinate of the characteristic point in the compensation coordinate system according to the first coordinate;
and the coordinate compensation module is used for carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance so as to obtain a compensation coordinate.
In order to solve the above technical problem, the present application further provides a coordinate compensation apparatus based on central projection, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method of the first aspect of the embodiments described above.
To solve the above technical problem, the present application also proposes a storage medium having stored thereon computer program instructions, which when executed by a processor implement the method of the first aspect in the above embodiments.
In conclusion, the beneficial effects of the invention are as follows:
according to the coordinate compensation method based on the central projection, a first coordinate of a feature point of a target part in a first coordinate system established based on a part tray is obtained according to a target part image which is obtained by a two-dimensional camera and comprises the feature point placed on the part tray; establishing a compensation coordinate system, and acquiring a second coordinate of the feature point in the compensation coordinate system; and carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance between the two-dimensional camera and the part tray to obtain a compensation coordinate. It can be seen that this application fixes a position the target part through two-dimensional camera, acquires the coordinate of target part to this application is after acquiring the coordinate of target part, can realize the compensation of the error that is brought by two-dimensional camera central projection through the actual dimension of target part and the distance between two-dimensional camera and the part tray, has promoted the precision of vision guide, and to the part of different models, only need select the kind of part can accomplish the compensation, and the suitability is strong.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, without any creative effort, other drawings may be obtained according to the drawings, and these drawings are all within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a coordinate compensation method based on central projection according to an embodiment of the present invention.
Fig. 2 is a schematic flowchart of acquiring a first coordinate according to an embodiment of the present invention.
Fig. 3 is a schematic flowchart of acquiring the second coordinate according to the embodiment of the present invention.
FIG. 4 is a schematic diagram of a two-dimensional camera center projection model according to an embodiment of the invention.
Fig. 5 is a schematic structural diagram of a coordinate compensation device based on central projection according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a coordinate compensation device based on central projection according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, an embodiment of the present invention provides a coordinate compensation method based on a central projection, where the method includes:
s1: acquiring a first coordinate of a feature point of a target part in a first coordinate system according to a target image, wherein the target image comprises a part tray and the target part placed on the part tray, and the target image is obtained by shooting the part tray through a two-dimensional camera with a target working distance from the part tray; the first coordinate system is established based on the part pallet;
firstly, a target part is placed on a part tray, for example and without limitation, the target part can be a cylindrical cam, a hollow cylinder, a rectangular component and the like used by an aircraft nose landing gear, when the target part is a cylindrical part, the characteristic point is the circle center of the surface of the cylindrical part, when the target part is a rectangular component, the characteristic point is the vertex of the surface of the rectangular component or the geometric center of the upper surface of the rectangular component, the target part and the part tray are shot by a two-dimensional camera to obtain a target image comprising the part tray and all the target parts, and when the target part is shot, the part tray has a target working distance; the first coordinate system is a three-dimensional coordinate system, the intersection point of the optical axis of the two-dimensional camera and the part tray is used as an original point, the optical axis of the two-dimensional camera is used as a Z axis, and the X axis and the Y axis are both in the plane where the part tray is located.
In an embodiment, an included angle between an optical axis of the two-dimensional camera and the part tray is within a preset angle range, in a specific embodiment, the preset angle range is 87 ° to 92 °, since the two-dimensional camera is imaged as a central projection model, when the included angle between the optical axis of the two-dimensional camera and the part tray is 87 ° to 92 °, that is, the optical axis of the two-dimensional camera is approximately perpendicular to the part tray, when distances between each target part on the part tray and the optical axis are the same, errors between an actual position of the target part and a part position obtained by the two-dimensional camera are almost the same, when the included angle between the optical axis of the two-dimensional camera and the part tray is exactly 90 °, when distances between each target part on the part tray and the optical axis are the same, errors between an actual position of the target part and a part position obtained by the two-dimensional camera are completely the same, the calculation amount can be reduced, and the visual guidance compensation efficiency is further improved.
As shown in fig. 2, as some optional embodiments of the present application, the step of acquiring a first coordinate of the feature point of the target part in the first coordinate system according to the image includes:
s11: carrying out graphic processing on the target image to obtain pixel coordinates of the characteristic points;
optionally, when the target part is a cylindrical part, the feature point is the center of a circle on the surface of the cylindrical part, the target image is processed to obtain the edge of the image, and the pixel coordinate of the center of the part is obtained by fitting
S12: converting the pixel coordinates according to distortion parameters and calibration parameters of the two-dimensional camera to obtain camera coordinates of the feature points in a camera coordinate system;
calibrating the two-dimensional camera, determining calibration parameters and distortion parameters of the two-dimensional camera, and then obtaining coordinates of the feature points in a camera coordinate system according to the calibration parameters and the distortion parameters and pixel coordinates of the feature points; specifically, the two-dimensional camera can be calibrated through a square checkerboard which is composed of a plurality of checks with the same size, the two-dimensional camera is used for shooting the square checkerboard for a plurality of times at different angles to complete calibration so as to obtain distortion parameters and calibration parameters, the two-dimensional camera is used for calibrating, so that internal and external parameters of the two-dimensional camera can be accurately obtained, the pixel coordinates of feature points can be accurately obtained, and the position accuracy of the obtained feature points is improved;
s13: determining a first coordinate transformation relation between a camera coordinate system and a first coordinate system;
the coordinate transformation is the position description of a space entity, is the process of transforming from one coordinate system to another coordinate system, realizes the transformation relation between a camera coordinate system and the first coordinate system by establishing the one-to-one corresponding relation between the two coordinate systems, and records as a first transformation relation;
s14: obtaining the first coordinate according to the camera coordinate and the first coordinate conversion relation;
converting the camera coordinates according to the first conversion relation to obtain coordinates of the feature points on the target part in a first coordinate system, and recording the coordinates as first coordinates;
in a specific embodiment, the target part is a cylindrical part, the feature point is the center of a circle on the surface of the cylindrical part, and the pixel coordinates of the center of the circle on the surface of the cylindrical part in the image can be determined by performing edge extraction on a target image acquired by a two-dimensional camera and fitting the extracted image edge;
s2: establishing a compensation coordinate system according to the first coordinate system and the characteristic points;
as some optional embodiments of the present application, the step of establishing a compensation coordinate system according to the first coordinate system and the feature point includes:
s21: establishing a corresponding compensation coordinate system for each target part on the part tray, wherein the origin of the compensation coordinate system is superposed with the origin of the first coordinate system, the connecting line of the origin and the bottom circle center of the target part is taken as an X axis, and the optical axis of the two-dimensional camera is taken as a Z axis;
as mentioned above, there may be one or more target parts on the part pallet, and a compensation coordinate system is established for each target part according to the following rule, where the origin of the compensation coordinate system coincides with the first coordinate system, the X-axis is the connecting line between the origin and the center of the bottom circle of the target part, the optical axis of the two-dimensional camera is taken as the Z axis, the Y axis is determined according to the right-hand rule, and by establishing a corresponding compensation coordinate system for each target part, since the origin of the compensation coordinate system coincides with the origin of the first coordinate system and the X-axis is the connecting line between the origin and the center of the circle at the bottom of the target part, the Y value of the coordinate values of the feature points is 0 and the Z value is the same as the coordinate values in the first coordinate system, and then, during subsequent compensation, only the X value of the coordinate under the compensation coordinate system needs to be compensated, so that the data processing amount is reduced, and the compensation efficiency is improved.
S3: acquiring a second coordinate of the feature point in the compensation coordinate system according to the first coordinate;
as some optional embodiments of the present application, as shown in fig. 3, the step of obtaining, according to the first coordinate, a second coordinate of the feature point in the compensated coordinate system includes:
s31: calculating a second coordinate transformation relation between each compensation coordinate system and the first coordinate system;
s32: and acquiring a second coordinate of the characteristic point of each target part under the corresponding compensation coordinate system according to each second coordinate conversion relation.
As described above, after the compensation coordinate systems are established, the transformation relationship between each compensation coordinate system and the first coordinate system is calculated and recorded as the second coordinate transformation relationship, and the second coordinate of the feature point of each target part in the corresponding compensation coordinate system is obtained according to each second coordinate transformation relationship.
S4: and carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance to obtain a compensation coordinate.
As some optional embodiments of the present application, the step of performing error compensation on the second coordinate according to the dimension parameter of the target part and the working distance of the two-dimensional camera to obtain a compensated coordinate includes:
s41: noting that the second coordinate is (X) 1 ,Y 1 ,Z 1 ) The compensation coordinate is (X) 2 ,Y 2 ,Z 2 ) The X value of the compensation coordinate is calculated by the following formula:
Figure BDA0003656062960000101
wherein h is the height (mm) of the target part, r is the radius (mm) of the target part, and l is the target working distance (mm);
the Y value of the compensation coordinate is equal to the Y value of the second coordinate is equal to 0, and the Z value of the compensation coordinate is equal to the Z value of the second coordinate;
as shown in fig. 4, since the camera is used as the central projection, the measured circle center of the target part obtained by the two-dimensional camera does not coincide with the actual circle center of the target part, and the error is corrected according to the central projection model, so as to obtain the coordinate (X) of the center of the corrected part in the compensation coordinate system 2 ,Y 2 ,Z 2 ) Because the compensation coordinate system is established, only the X value of the compensation coordinate needs to be compensated, the algorithm is simple, the calculated amount is small, the operation efficiency is high, and the method has an explicit mathematical expression, can be compensated only by knowing the position and the size of the part, and has strong applicability;
as shown in table 1, it can be seen from the data that, in the case of no coordinate compensation, the farther the part is from the projection center, the larger the part positioning error is, and the coordinate compensation algorithm is introduced, so that the part positioning accuracy can be greatly improved, and the error from the theoretical position is within 0.006 mm.
TABLE 1 center projection error Compensation results
Figure BDA0003656062960000102
As some optional embodiments of the present application, after the step of performing error compensation on the second coordinate according to the actual size parameter of the target part and the distance between the two-dimensional camera and the part tray to obtain a compensated coordinate, the method further includes:
s5: establishing an actuating mechanism coordinate system;
s6: acquiring a third coordinate conversion relation between the coordinate system of the executing mechanism and the coordinate system of the camera;
s7: converting the compensation coordinate according to the first coordinate conversion relation, the second coordinate conversion relation and the third coordinate conversion relation to obtain a third coordinate of the circle center of the target part under the execution mechanism coordinate system after error compensation;
s8: and grabbing the target part according to the third coordinate.
Specifically, the third coordinate transformation relationship may be obtained by fixing the two-dimensional camera at the end or at a fixed position of the actuator, performing hand-eye calibration to obtain a transformation relationship between a camera coordinate system and an actuator coordinate system, obtaining coordinates of the feature point of the target part in the first coordinate system after compensation according to the transformation relationship between the second coordinate system and the first coordinate system, obtaining coordinates of the feature point of the target part in the actuator coordinate system according to the transformation relationship between the first coordinate system and the actuator coordinate system, sending the coordinates of the feature point of the target part in the actuator coordinate system to the actuator, and finishing grabbing or processing of the target part by the actuator.
In summary, according to the coordinate compensation method based on central projection, an image of a target part on a part tray is obtained through a two-dimensional camera, a first coordinate system is established on the part tray, the coordinate of a feature point on the target part under the first coordinate system is calculated, a compensation coordinate system is established according to the first coordinate system and the feature point, the coordinate of the feature point under the compensation coordinate system is obtained, and error compensation is performed on the second coordinate through the size parameter of the target part and the working distance of the two-dimensional camera to obtain a compensation coordinate; aiming at parts of different models, compensation can be completed only by selecting the types of the parts, so that the method is high in applicability and good in maintainability, the error between the position of the part obtained by the two-dimensional camera and the actual position of the part can be reduced, and the guiding precision is improved; moreover, the existing equipment can be used without increasing equipment, so that the precision is improved, no extra cost is brought, and the cost performance is high.
Referring to fig. 5, an embodiment of the present invention provides a coordinate compensation apparatus based on central projection, which is characterized in that the apparatus includes:
the system comprises a first coordinate acquisition module, a second coordinate acquisition module and a third coordinate acquisition module, wherein the first coordinate acquisition module is used for acquiring a first coordinate of a characteristic point of a target part in a first coordinate system according to a target image, the target image comprises a part tray and the target part placed on the part tray, and the target image is obtained by shooting the part tray through a two-dimensional camera with a target working distance away from the part tray; the first coordinate system is established based on the part pallet;
the compensation coordinate system establishing module is used for establishing a compensation coordinate system according to the first coordinate system and the characteristic points;
the second coordinate acquisition module is used for acquiring a second coordinate of the characteristic point in the compensation coordinate system according to the first coordinate;
and the coordinate compensation module is used for carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance so as to obtain a compensation coordinate.
In addition, the center projection-based coordinate compensation method of the embodiment of the present invention described in conjunction with fig. 1 may be implemented by a center projection-based coordinate compensation apparatus. Fig. 6 is a schematic diagram illustrating a hardware structure of a coordinate compensation device based on a central projection according to an embodiment of the present invention.
The center projection based coordinate compensation device may comprise at least one processor 301, at least one memory 302 and computer program instructions stored in the shown memory area 302, which when executed by the processor 301 implement the method of the above described embodiments.
In particular, the processor 301 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.
Memory 302 may include mass storage for data or instructions. By way of example, and not limitation, memory 302 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 302 may include removable or non-removable (or fixed) media, where appropriate. The memory 302 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 302 is a non-volatile solid-state memory. In a particular embodiment, the memory 302 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement any one of the above-described embodiments of the center projection based coordinate compensation method.
In one example, the center projection based coordinate compensation device may further include a communication interface and a bus. As shown in fig. 6, the processor, the memory, and the communication interface are connected via a bus to complete communication therebetween. The communication interface is mainly used for realizing communication among modules, devices, units and/or equipment in the embodiment of the invention.
The bus comprises hardware, software, or both, coupling the components of the center projection based coordinate compensation device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. A bus may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
In addition, in combination with the coordinate compensation method based on central projection in the above embodiments, embodiments of the present invention may be implemented by providing a computer-readable storage medium. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the above-described embodiments of the center projection based coordinate compensation method.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (11)

1. A method for coordinate compensation based on a central projection, the method comprising:
acquiring a first coordinate of a feature point of a target part in a first coordinate system according to a target image, wherein the target image comprises a part tray and the target part placed on the part tray, and the target image is obtained by shooting the part tray through a two-dimensional camera with a target working distance from the part tray; the first coordinate system is established based on the part pallet;
establishing a compensation coordinate system according to the first coordinate system and the characteristic points;
acquiring a second coordinate of the feature point in the compensation coordinate system according to the first coordinate;
and carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance to obtain a compensation coordinate.
2. The coordinate compensation method based on central projection according to claim 1, wherein the step of obtaining the first coordinates of the feature point of the target part in the first coordinate system according to the target image comprises:
carrying out graphic processing on the target image to obtain pixel coordinates of the characteristic points;
converting the pixel coordinates according to distortion parameters and calibration parameters of the two-dimensional camera to obtain camera coordinates of the feature points in a camera coordinate system;
determining a first coordinate transformation relation between a camera coordinate system and a first coordinate system;
and obtaining the first coordinate according to the camera coordinate and the first coordinate conversion relation.
3. The coordinate compensation method based on central projection according to claim 1, wherein the included angle between the optical axis of the two-dimensional camera and the part tray is within a preset angle range.
4. A method for coordinate compensation based on central projection according to any of claims 1-3 wherein the target part is a cylindrical part and the feature point is the center of the surface of the cylindrical part.
5. The method of claim 4, wherein the step of establishing a compensated coordinate system based on the first coordinate system and the feature points comprises:
and establishing a corresponding compensation coordinate system for each target part on the part tray, wherein the origin of the compensation coordinate system is superposed with the origin of the first coordinate system, the connecting line of the origin and the bottom circle center of the target part is taken as an X axis, and the optical axis of the two-dimensional camera is taken as a Z axis.
6. The method of claim 1, wherein the step of obtaining second coordinates of the feature point in the compensated coordinate system according to the first coordinates comprises:
calculating a second coordinate transformation relation between each compensation coordinate system and the first coordinate system;
and acquiring a second coordinate of the characteristic point of each target part under the corresponding compensation coordinate system according to each second coordinate conversion relation.
7. The center projection-based coordinate compensation method according to claim 6, wherein the step of performing error compensation on the second coordinates according to the actual size parameter of the target part and the distance between the two-dimensional camera and the part tray to obtain compensated coordinates comprises:
noting that the second coordinate is (X) 1 ,Y 1 ,Z 1 ) The compensation coordinate is (X) 2 ,Y 2 ,Z 2 ) The X value of the compensation coordinate is calculated by the following formula:
Figure FDA0003656062950000021
wherein h is the height of the target part, r is the radius of the target part, l is the target working distance,
wherein the Y value of the compensated coordinate is equal to the Y value of the second coordinate is equal to 0, and the Z value of the compensated coordinate is equal to the Z value of the second coordinate.
8. The center-projection-based coordinate compensation method of claim 7, wherein after the step of error-compensating the second coordinates according to the actual size parameter of the target part and the distance between the two-dimensional camera and the part tray to obtain compensated coordinates, the method further comprises:
establishing an actuating mechanism coordinate system;
acquiring a third coordinate conversion relation between the coordinate system of the executing mechanism and the coordinate system of the camera;
converting the compensation coordinate according to the first coordinate conversion relation, the second coordinate conversion relation and the third coordinate conversion relation to obtain a third coordinate of the feature point of the target part under the execution mechanism coordinate system after error compensation;
and grabbing the target part according to the third coordinate.
9. An apparatus for center projection based coordinate compensation, the apparatus comprising:
the system comprises a first coordinate acquisition module, a second coordinate acquisition module and a third coordinate acquisition module, wherein the first coordinate acquisition module is used for acquiring a first coordinate of a characteristic point of a target part in a first coordinate system according to a target image, the target image comprises a part tray and the target part placed on the part tray, and the target image is obtained by shooting the part tray through a two-dimensional camera with a target working distance away from the part tray; the first coordinate system is established based on the part pallet;
the compensation coordinate system establishing module is used for establishing a compensation coordinate system according to the first coordinate system and the characteristic points;
the second coordinate acquisition module is used for acquiring a second coordinate of the characteristic point in the compensation coordinate system according to the first coordinate;
and the coordinate compensation module is used for carrying out error compensation on the second coordinate according to the actual size parameter of the target part and the target working distance so as to obtain a compensation coordinate.
10. A center projection-based coordinate compensation apparatus, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any of claims 1-8.
11. A storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1-8.
CN202210559743.7A 2022-05-23 2022-05-23 Coordinate compensation method, device, equipment and medium based on central projection Pending CN114897851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210559743.7A CN114897851A (en) 2022-05-23 2022-05-23 Coordinate compensation method, device, equipment and medium based on central projection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210559743.7A CN114897851A (en) 2022-05-23 2022-05-23 Coordinate compensation method, device, equipment and medium based on central projection

Publications (1)

Publication Number Publication Date
CN114897851A true CN114897851A (en) 2022-08-12

Family

ID=82724046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210559743.7A Pending CN114897851A (en) 2022-05-23 2022-05-23 Coordinate compensation method, device, equipment and medium based on central projection

Country Status (1)

Country Link
CN (1) CN114897851A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115932555A (en) * 2023-02-23 2023-04-07 长春光华微电子设备工程中心有限公司 Probe position obtaining method and probe station

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115932555A (en) * 2023-02-23 2023-04-07 长春光华微电子设备工程中心有限公司 Probe position obtaining method and probe station

Similar Documents

Publication Publication Date Title
US10664998B2 (en) Camera calibration method, recording medium, and camera calibration apparatus
US10607371B2 (en) Camera calibration method, recording medium, and camera calibration apparatus
CN111750804B (en) Object measuring method and device
US11367204B1 (en) Multi-sensor spatial data auto-synchronization system and method
KR102289688B1 (en) Method for Estimating 3D Marker Cordinetes of Optical Position Tracking System
CN109660697B (en) Method, device and equipment for automatically correcting positioning error of PCB (printed Circuit Board) and storage medium
CN111538029A (en) Vision and radar fusion measuring method and terminal
CN114897851A (en) Coordinate compensation method, device, equipment and medium based on central projection
CN112686950A (en) Pose estimation method and device, terminal equipment and computer readable storage medium
CN114029946A (en) Method, device and equipment for guiding robot to position and grab based on 3D grating
CN111340042B (en) Object contour recognition method, device, equipment and storage medium
CN110906902A (en) Two-step correction method for slope deformation monitoring data
CN113240746B (en) Speckle structure light marking method and device based on ideal imaging plane
CN111383264A (en) Positioning method, positioning device, terminal and computer storage medium
CN111336938A (en) Robot and object distance detection method and device thereof
CN115018922A (en) Distortion parameter calibration method, electronic device and computer readable storage medium
CN111311690B (en) Calibration method and device of depth camera, terminal and computer storage medium
CN112053401B (en) Chip splicing method, device, equipment and storage medium
CN110310312B (en) Image registration method, image registration device and terminal
CN110736911B (en) Flying probe testing method, flying probe testing device, flying probe testing apparatus, and storage medium
CN107741220B (en) Image processing method and device and electronic equipment
CN109829950B (en) Method and device for detecting calibration parameters of binocular camera and automatic driving system
CN111915638A (en) Tracking device, information processing method, readable storage medium, and electronic apparatus
CN110310313B (en) Image registration method, image registration device and terminal
CN116109632B (en) Method, device, equipment and medium for detecting geometric accuracy of aircraft surface

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