CN112907673A - Positioning method, positioning device, terminal equipment and storage medium - Google Patents

Positioning method, positioning device, terminal equipment and storage medium Download PDF

Info

Publication number
CN112907673A
CN112907673A CN202110299489.7A CN202110299489A CN112907673A CN 112907673 A CN112907673 A CN 112907673A CN 202110299489 A CN202110299489 A CN 202110299489A CN 112907673 A CN112907673 A CN 112907673A
Authority
CN
China
Prior art keywords
preset
coordinate system
parameter
camera
coordinate
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.)
Granted
Application number
CN202110299489.7A
Other languages
Chinese (zh)
Other versions
CN112907673B (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.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics 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 Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202110299489.7A priority Critical patent/CN112907673B/en
Publication of CN112907673A publication Critical patent/CN112907673A/en
Application granted granted Critical
Publication of CN112907673B publication Critical patent/CN112907673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/77Determining position or orientation of objects or cameras using statistical methods
    • 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/30121CRT, LCD or plasma display

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a positioning method, which comprises the following steps: when a target image of a flange mechanism is acquired, determining a target pixel coordinate of a dispensing head in the flange mechanism from the target image, wherein the target image is shot by a preset camera; acquiring preset camera position parameters of the preset camera and first relative position parameters of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head; and obtaining the position information of the dispensing head based on the first relative position parameter, the preset camera position parameter and the target pixel coordinate. The invention also discloses a positioning device, terminal equipment and a computer readable storage medium. By the positioning method, the position information of the dispensing head can be accurately determined, so that the positioning difficulty of the dispensing head is reduced.

Description

Positioning method, positioning device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of display device manufacturing, and in particular, to a positioning method, a positioning device, a terminal device, and a computer-readable storage medium.
Background
With the gradual development of high-end liquid crystal products (such as liquid crystal televisions or spliced screens and other display products) to extremely narrow frames (the frame size is within 1 mm), the laminating and bonding process is also converted from a one-step adhesive tape forming mode to precise dispensing.
Because the once-formed adhesive tape is difficult to ensure high-strength fastening force after the product is narrowed, the gluing and bonding process of the product with the extremely narrow frame is realized by using high-adhesion UV adhesive (vacuum sealant) and matching with precise dispensing equipment in the industry at present. When utilizing UV to glue and carrying out production, because the characteristic of glue, need to wash the system of supplying to glue after production every time to prevent the glue solidification, most importantly, supply the head of gluing of system and need change.
However, the production of extremely narrow frame products has high precision requirements, and after the dispensing head is replaced each time, the position of the dispensing head relative to the flange mechanism changes, and the position of the dispensing head needs to be determined, so that the dispensing effect is good, and the yield of the narrow frame products is improved.
There is an urgent need for a method to determine the position of the dispensing head relative to the flange mechanism.
Disclosure of Invention
The invention mainly aims to provide a positioning method, a positioning device, terminal equipment and a computer readable storage medium, and aims to solve the technical problem that a dispensing head is difficult to position due to the fact that a dispensing head positioning technology is lacked in the prior art.
In order to achieve the above object, the present invention provides a positioning method, which comprises the following steps:
when a target image of a flange mechanism is acquired, determining a target pixel coordinate of a dispensing head in the flange mechanism from the target image, wherein the target image is shot by a preset camera;
acquiring preset camera position parameters of the preset camera and first relative position parameters of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head;
and obtaining the position information of the dispensing head based on the first relative position parameter, the preset camera position parameter and the target pixel coordinate.
Optionally, the preset camera position parameter includes a preset rotation parameter, a preset rotation angle, and a preset proportion parameter.
Optionally, before the step of acquiring the preset camera position parameter of the preset camera and the first relative position parameter of the flange mechanism, the method further includes:
shooting a first reference image of a reference area by using the preset camera, wherein the reference area comprises at least two line segments which are intersected and not collinear;
determining first vertex coordinates of the at least two line segments under a camera coordinate system corresponding to the preset camera based on the first reference image;
determining second vertex coordinates and line segment lengths of the at least two line segments in the preset coordinate system;
and obtaining the preset proportion parameter based on the first vertex coordinate, the preset second vertex coordinate and the line segment length.
Optionally, before the step of acquiring the preset camera position parameter of the preset camera and the first relative position parameter of the flange mechanism, the method includes:
shooting a second reference image by using the preset camera, wherein the second reference image comprises images respectively corresponding to the dispensing heads at least four different positions;
determining a first coordinate of the dispensing head in the camera coordinate system in the second reference image;
acquiring a second relative position parameter of a second tool coordinate system corresponding to the dispensing head and the preset coordinate system, wherein the second tool coordinate system corresponds to the at least four different positions respectively;
and obtaining the preset rotation angle and the preset rotation parameter based on the preset proportion parameter, the first coordinate and the second relative position parameter.
Optionally, the second relative position parameter includes a first rotation angle of the second tool coordinate system and the preset coordinate system, and a second coordinate of an origin of the second tool coordinate system in the preset coordinate system.
Optionally, the step of obtaining the preset rotation angle and the preset rotation parameter based on the preset proportion parameter, the first coordinate, and the second relative position parameter includes:
constructing an equation set by using the preset proportion parameter, the first coordinate, the second relative position parameter, the preset rotation angle and the preset rotation parameter;
and solving the equation set to obtain the preset rotation angle and the preset rotation parameter.
Optionally, the step of solving the equation set to obtain the preset rotation angle and the preset rotation parameter includes:
solving the equation set by using a Househal's method to obtain the preset rotation angle and the preset rotation parameter.
In addition, to achieve the above object, the present invention further provides a positioning apparatus, including:
the determining module is used for determining a target pixel coordinate of a point rubber head in the flange mechanism from a target image when the target image of the flange mechanism is acquired, and the target image is shot by a preset camera;
the acquisition module is used for acquiring preset camera position parameters of the preset camera and first relative position parameters of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head;
an obtaining module, configured to obtain position information of the dispensing head based on the first relative position parameter, the preset camera position parameter, and the target pixel coordinate.
In addition, to achieve the above object, the present invention further provides a terminal device, including: memory, a processor and a positioning program stored on the memory and running on the processor, the positioning program when executed by the processor implementing the steps of the positioning method according to any one of the above.
Furthermore, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a positioning program is stored, which, when being executed by a processor, implements the steps of the positioning method according to any one of the above.
The technical scheme of the invention provides a positioning method, which comprises the steps of determining a target pixel coordinate of a point rubber head in a flange mechanism from a target image when the target image of the flange mechanism is obtained, wherein the target image is shot by a preset camera; acquiring preset camera position parameters of the preset camera and first relative position parameters of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head; and obtaining the position information of the dispensing head based on the first relative position parameter, the preset camera position parameter and the target pixel coordinate.
According to the positioning method, the position information of the dispensing head can be accurately determined through the acquired preset camera position parameter of the preset camera/the first relative position parameter of the first tool coordinate system corresponding to the flange mechanism and the preset coordinate system and the target pixel coordinate of the dispensing head, so that the positioning difficulty of the dispensing head is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a terminal device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a positioning method according to a first embodiment of the present invention;
FIG. 3 is a block diagram of a positioning device according to a first embodiment of the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a terminal device in a hardware operating environment according to an embodiment of the present invention.
The terminal device may be a User Equipment (UE) such as a Mobile phone, a smart phone, a laptop, a digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, a Mobile Station (MS), etc. The terminal device may be referred to as a user terminal, a portable terminal, a desktop terminal, etc.
In general, a terminal device includes: at least one processor 301, a memory 302 and a positioning program stored on said memory and executable on said processor, said positioning program being configured to implement the steps of the positioning method as described before.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. Processor 301 may also include an AI (Artificial Intelligence) processor for processing relevant positioning method operations such that the positioning method model may be trained autonomously, improving efficiency and accuracy.
Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 302 is used to store at least one instruction for execution by processor 301 to implement the positioning method provided by the method embodiments herein.
In some embodiments, the terminal may further include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected by a bus or signal lines. Various peripheral devices may be connected to communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, a display screen 305, and a power source 306.
The communication interface 303 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the communication interface 303 may be implemented on a single chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, the front panel of the electronic device; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display screen 305 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 306 is used to power various components in the electronic device. The power source 306 may be alternating current, direct current, disposable or rechargeable. When the power source 306 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology. Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a positioning program is stored, and the positioning program, when executed by a processor, implements the steps of the positioning method described above. Therefore, a detailed description thereof will be omitted. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application. It is determined that the program instructions may be deployed to be executed on one terminal device, or on multiple terminal devices located at one site, or distributed across multiple sites and interconnected by a communication network, as examples.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The computer-readable storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Based on the above hardware structure, an embodiment of the positioning method of the present invention is provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a positioning method according to the present invention, where the method is used for a terminal device, and the method includes the following steps:
step S11: when a target image of the flange mechanism is acquired, determining a target pixel coordinate of a dispensing head in the flange mechanism from the target image, and shooting the target image through a preset camera.
It should be noted that the execution main body of the present invention is a terminal device, the terminal device is installed with a positioning program, and when the terminal device executes the positioning program, the positioning method of the present invention is implemented. Generally, the actuating mechanism is provided with a flange mechanism, the flange mechanism is provided with a dispensing head, the actuating mechanism drives the flange mechanism to move to adjust the position of the flange mechanism, so as to drive the position of the dispensing head to change, and the actuating mechanism can be a four-axis mechanical arm or a similar structure.
Generally, an industrial camera (the preset camera) needs to be arranged, and the industrial camera is fixed in a certain area so as to shoot the operation area of the flange mechanism, and simultaneously, an image of a glue dispensing head in the flange mechanism can be shot. Generally, after the dispensing head is replaced, the position information of the dispensing head changes, and the replaced dispensing head needs to be positioned to obtain new position information, and the replaced dispensing head is the dispensing head described in step S11. Usually, after the dispensing head is replaced, when the dispensing head needs to be positioned, an image acquired by a preset camera is the target image. The target pixel coordinate is the pixel coordinate of the dispensing head in the target image, and the target pixel coordinate is the coordinate based on a camera coordinate system corresponding to a preset camera.
Step S12: and acquiring a preset camera position parameter of the preset camera and a first relative position parameter of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head.
It should be noted that the preset camera position parameters include a preset rotation parameter, a preset rotation angle (a rotation angle between a camera coordinate system corresponding to the preset camera and the preset coordinate system) and a preset proportion parameter (a proportion parameter between the camera coordinate system corresponding to the preset camera and the preset coordinate system), the first relative position parameter includes a first tool coordinate system corresponding to the position of the flange mechanism (in the present invention, the coordinate system to which the flange mechanism belongs is a tool coordinate system, the dispensing head is fixedly connected to the flange mechanism, the relationship between the dispensing head and the tool coordinate system is also fixed, so the dispensing head also corresponds to the tool coordinate system) and a second rotation angle and a third coordinate of the preset coordinate system at the time when the flange mechanism is photographed by using the preset camera to obtain the target image, wherein the preset coordinate system is a user coordinate system set by a user, the second rotation angle between the first tool coordinate system and the preset coordinate system is an included angle (clockwise is a positive value, and counterclockwise is a negative value) between an x-axis of the first tool coordinate system and an x-axis of the preset coordinate system, and the third coordinate is a coordinate of an origin of the first tool coordinate system under the preset coordinate system. In addition, the proportional parameters in the present application include a horizontal proportional parameter and a vertical proportional parameter.
The first relative position parameter can be directly acquired by a user through the acquisition equipment and input into the terminal equipment, or acquired by the acquisition equipment, and the terminal equipment directly acquires the first relative position parameter from other equipment.
Generally, the actual unit length of the coordinate axis of the preset coordinate system corresponds to the real object, that is, the actual length of the O object is 1m, and the corresponding length is 1m in the preset coordinate system.
It should be noted that, before performing step S12 of the present invention, the preset camera needs to be calibrated, that is, the preset camera position parameters of the preset camera are obtained, where the preset rotation parameters in the preset camera position parameters are denoted as Tx(horizontal rotation parameter) and Ty(vertical direction rotation parameter), recording a preset rotation angle in the preset camera position parameter as theta, and recording a preset proportion parameter in the preset camera position parameter as Sx(horizontal direction ratio parameter) and Sy(vertical direction scale parameter). Target pixel coordinate (x ') based on the five parameters and the dot rubber head'a,y′a) The position information of the dispensing head phase in the user coordinate system (preset coordinate system) can be determined by using formula 1, wherein the position of the dispensing head is marked as a at the moment of shooting the target image, and the coordinate of the dispensing head in the preset coordinate system is (x)A,yA) Equation 1 is as follows:
Figure BDA0002984968280000091
however, in specific applications, each quantity in the preset camera position parameters is unknown, and a calculation formula needs to be established to obtain the preset camera position parameters. At this time, a tool coordinate system (a coordinate system corresponding to the flange mechanism) is introduced, and an arbitrary point P (in the following description, a point P is paired) where the dispensing head is located is setEquivalent replacement of the corresponding quantity with the A point in the above formula 1) is taken as an example, and the coordinate of the P point in the tool coordinate system is (x)p,yp) Using the rotation angle theta between the tool coordinate system and the preset coordinate system0And the coordinates (x) of the origin of the tool coordinate system in the preset coordinate system0,y0) The proportional parameters of the tool coordinate system and the preset coordinate system are respectively S0xAnd S0yThen at this point equation 2 is used, based on (x)0,y0) The coordinate (x) of the point P in the preset coordinate system can be determinedP,yP) Namely:
Figure BDA0002984968280000092
wherein the tool coordinate system and the preset coordinate system have no proportional change, namely S0xAnd S0yAll of them are 1, then equation 2 can be simplified to equation 3, equation 3 is:
Figure BDA0002984968280000101
at this time, equation 1 and equation 3 are combined to obtain equation 4, where equation 4 is:
Figure BDA0002984968280000102
wherein, x'pAnd y'pThe pixel coordinates corresponding to the P points (which can be obtained as described above),
namely, x 'in formula 4'p、y′p、θ0、x0、y0Are known quantities, theta (present as two quantities in the unknown quantities cos theta and sin theta), T in equation 4x、Ty、Sx、Sy、xpAnd ypAre all unknown quantities. To find xpAnd ypAnd further using formula 3 to obtain xPAnd yP(position of P point in the predetermined coordinate systemInformation, i.e. the position information of the dispensing head obtained by the method of the present invention, the position information obtained in step S13), it is necessary to first find cos θ, sin θ, Tx、Ty、SxAnd SyAnd obtaining the preset camera position parameter.
Further, before step S12, the method further includes: shooting a first reference image of a reference area by using the preset camera, wherein the reference area comprises at least two line segments which are intersected and not collinear; determining first vertex coordinates of the at least two line segments under a camera coordinate system corresponding to the preset camera based on the first reference image; determining second vertex coordinates and line segment lengths of the at least two line segments in the preset coordinate system; and obtaining the preset proportion parameter based on the first vertex coordinate, the preset second vertex coordinate and the line segment length.
In a specific application, taking an intersection line of two common points as an example, the intersection line is BC and CD respectively, wherein three points B, C and D are not collinear, and coordinates B, C and D under a preset coordinate system are (x) respectivelyb,yb)、(xc,yc) And (x)d,yd) That is, the first vertex coordinates include coordinates of three points, and coordinates of B, C and D in the camera coordinate system are (x'b,y′b)、(x′c,y′c) And (x'd,y′d) That is, the second vertex coordinates also include coordinates of three points, in this case, the line segment includes two line segments, and the line segment lengths are line segment lengths l corresponding to BC and CD, respectivelybcAnd lcdAt this time, S can be obtained by using the formula 5xAnd SyEquation 5 is:
Figure BDA0002984968280000103
further, before step S12, the method further includes: shooting a second reference image by using the preset camera, wherein the second reference image comprises images respectively corresponding to the dispensing heads at least four different positions; determining a first coordinate of the dispensing head in the camera coordinate system in the second reference image; acquiring a second relative position parameter of a second tool coordinate system corresponding to the dispensing head and the preset coordinate system, wherein the second tool coordinate system corresponds to the at least four different positions respectively; and obtaining the preset rotation angle and the preset rotation parameter based on the preset proportion parameter, the first coordinate and the second relative position parameter. The second relative position parameter comprises a first rotation angle of the second tool coordinate system and the preset coordinate system and a second coordinate of an origin of the second tool coordinate system under the preset coordinate system. The first rotation angle between the second tool coordinate system and the preset coordinate system is an included angle (clockwise is a positive value, and counterclockwise is a negative value) between the x-axis of the second tool coordinate system and the x-axis of the preset coordinate system.
In addition, the step of obtaining the preset rotation angle and the preset rotation parameter based on the preset proportion parameter, the first coordinate and the second relative position parameter includes: constructing an equation set by using the preset proportion parameter, the first coordinate, the second relative position parameter, the preset rotation angle and the preset rotation parameter; and solving the equation set to obtain the preset rotation angle and the preset rotation parameter.
In addition, S in formula 4 is obtained by referring to the above methodxAnd SyThe other unknowns in the formula 4 are also 6 (cos θ and sin θ corresponding to θ are defined as two different unknowns), 4 different points (i.e., points corresponding to the at least four different positions) are needed, 4 equation sets are constructed, that is, 8 mutual rank equation equations constructed by the formula 4 are used to solve the 6 unknowns, and the process is the solution of the over-determined linear equation set.
Meanwhile, taking 4 different positions as an example, the second reference images corresponding to the 4 different positions also include four images, and the pixel coordinate of the dispensing head in the camera coordinate system in each second reference image is a first coordinate, which corresponds to the 4 first coordinates, and the point at each position corresponds to a second relative position parameter, which corresponds to the 4 second relative position parameters, wherein each second relative position parameter includes a first rotation angle and a second coordinate. In a specific application, in order to ensure accuracy, the first rotation angle and the second coordinate corresponding to each position are usually different, and the first rotation angles of the plurality of points may be unchanged for convenience of calculation.
With reference to the description in the previous paragraph, when an equation system is constructed using equation 4 based on the preset ratio parameter, the first coordinates of 4 points, the second coordinates of 4 points, and the first rotation angles of 4 points, the first rotation angle of any one of the 4 points is used to replace θ0X 'is replaced by the first coordinate of the point'pAnd y'pSecond coordinate of the point replacing x0And y0To obtain an equation set corresponding to the point; this operation is performed for all of the 4 points, and 4 equation sets, i.e., 8 equations, are obtained. Then, the least square method of the linear equation system is adopted for solving so as to weaken the error. Among them, the least square method may be a hausen hurdle method.
Step S13: and obtaining the position information of the dispensing head based on the first relative position parameter, the preset camera position parameter and the target pixel coordinate.
It is understood that, with reference to the above description, the first relative position parameter includes that, at the time of shooting the flange mechanism, the first relative position parameter includes a second rotation angle of the first tool coordinate system and the preset coordinate system corresponding to the position of the flange mechanism and a third coordinate of the origin of the first tool coordinate system under the preset coordinate system, and the second rotation angle of the first tool coordinate system and the preset coordinate system is an included angle (clockwise is a positive value, and counterclockwise is a negative value) between the x-axis of the first tool coordinate system and the x-axis of the preset coordinate system.
Referring to the above, the preset camera position parameters in equation 4 have all been known quantities, while the second rotation angle and the third coordinate in the first relative position parameter are also known (θ in equation 4)0,x0And y0) When the target pixel coordinate (point A above) is obtained, x 'in equation 4 is obtained'pAnd y'pReplacement to target Pixel coordinates (x'a,y′a) Obtaining a system of equations and solving the system of equations to obtain xaAnd yaAt this time xaAnd yaThat is, the position information of the dispensing head in the first tool coordinate system, and then the coordinate of the dispensing head in the preset coordinate system, that is, x in formula 3, can be obtained by using the relationship between the first tool coordinate system and the preset coordinate system at this timepAnd ypIs replaced by xaAnd yaTo obtain x on the right side of the equationAAnd yAAt this time, x is obtainedAAnd yANamely the position information of the dispensing head.
The technical scheme of the invention provides a positioning method, which comprises the steps of determining a target pixel coordinate of a point rubber head in a flange mechanism from a target image when the target image of the flange mechanism is obtained, wherein the target image is shot by a preset camera; acquiring preset camera position parameters of the preset camera and first relative position parameters of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head; and obtaining the position information of the dispensing head based on the first relative position parameter, the preset camera position parameter and the target pixel coordinate.
According to the positioning method, the position information of the dispensing head can be accurately determined through the acquired preset camera position parameter of the preset camera/the first relative position parameter of the first tool coordinate system corresponding to the flange mechanism and the preset coordinate system and the target pixel coordinate of the dispensing head, so that the positioning difficulty of the dispensing head is reduced.
Referring to fig. 3, fig. 3 is a block diagram of a first embodiment of a positioning apparatus according to the present invention, the apparatus is used for a terminal device, and the apparatus includes:
the determining module 10 is configured to determine a target pixel coordinate of a dispensing head in a flange mechanism from a target image when the target image of the flange mechanism is acquired, where the target image is captured by a preset camera;
an obtaining module 20, configured to obtain a preset camera position parameter of the preset camera and a first relative position parameter of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head;
an obtaining module, configured to obtain position information of the dispensing head based on the first relative position parameter, the preset camera position parameter, and the target pixel coordinate 30.
The above description is only an alternative embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method of positioning, the method comprising the steps of:
when a target image of a flange mechanism is acquired, determining a target pixel coordinate of a dispensing head in the flange mechanism from the target image, wherein the target image is shot by a preset camera;
acquiring preset camera position parameters of the preset camera and first relative position parameters of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head;
and obtaining the position information of the dispensing head based on the first relative position parameter, the preset camera position parameter and the target pixel coordinate.
2. The method of claim 1, wherein the preset camera position parameters include a preset rotation parameter, a preset rotation angle, and a preset scale parameter.
3. The method of claim 2, wherein the step of obtaining the preset camera position parameter of the preset camera and the first relative position parameter of the flange mechanism is preceded by the method further comprising:
shooting a first reference image of a reference area by using the preset camera, wherein the reference area comprises at least two line segments which are intersected and not collinear;
determining first vertex coordinates of the at least two line segments under a camera coordinate system corresponding to the preset camera based on the first reference image;
determining second vertex coordinates and line segment lengths of the at least two line segments in the preset coordinate system;
and obtaining the preset proportion parameter based on the first vertex coordinate, the preset second vertex coordinate and the line segment length.
4. The method of claim 3, wherein the step of obtaining the preset camera position parameter of the preset camera and the first relative position parameter of the flange mechanism is preceded by the method comprising:
shooting a second reference image by using the preset camera, wherein the second reference image comprises images respectively corresponding to the dispensing heads at least four different positions;
determining a first coordinate of the dispensing head in the camera coordinate system in the second reference image;
acquiring a second relative position parameter of a second tool coordinate system corresponding to the dispensing head and the preset coordinate system, wherein the second tool coordinate system corresponds to the at least four different positions respectively;
and obtaining the preset rotation angle and the preset rotation parameter based on the preset proportion parameter, the first coordinate and the second relative position parameter.
5. The method of claim 4, wherein the second relative position parameters include a first angle of rotation of the second tool coordinate system with the preset coordinate system and a second coordinate of the origin of the second tool coordinate system in the preset coordinate system.
6. The method of claim 5, wherein the step of obtaining the preset rotation angle and the preset rotation parameter based on the preset scale parameter, the first coordinate, and the second relative position parameter comprises:
constructing an equation set by using the preset proportion parameter, the first coordinate, the second relative position parameter, the preset rotation angle and the preset rotation parameter;
and solving the equation set to obtain the preset rotation angle and the preset rotation parameter.
7. The method of claim 5, wherein the step of solving the system of equations to obtain the preset rotation angle and the preset rotation parameters comprises:
solving the equation set by using a Househal's method to obtain the preset rotation angle and the preset rotation parameter.
8. A positioning device, the device comprising:
the determining module is used for determining a target pixel coordinate of a point rubber head in the flange mechanism from a target image when the target image of the flange mechanism is acquired, and the target image is shot by a preset camera;
the acquisition module is used for acquiring preset camera position parameters of the preset camera and first relative position parameters of a first tool coordinate system and a preset coordinate system corresponding to the dispensing head;
an obtaining module, configured to obtain position information of the dispensing head based on the first relative position parameter, the preset camera position parameter, and the target pixel coordinate.
9. A terminal device, characterized in that the terminal device comprises: memory, a processor and a positioning program stored on the memory and running on the processor, the positioning program when executed by the processor implementing the steps of the positioning method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a positioning program which, when executed by a processor, implements the steps of the positioning method according to any one of claims 1 to 7.
CN202110299489.7A 2021-03-19 2021-03-19 Positioning method, positioning device, terminal equipment and storage medium Active CN112907673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110299489.7A CN112907673B (en) 2021-03-19 2021-03-19 Positioning method, positioning device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110299489.7A CN112907673B (en) 2021-03-19 2021-03-19 Positioning method, positioning device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112907673A true CN112907673A (en) 2021-06-04
CN112907673B CN112907673B (en) 2021-10-22

Family

ID=76105767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110299489.7A Active CN112907673B (en) 2021-03-19 2021-03-19 Positioning method, positioning device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112907673B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114187349A (en) * 2021-11-03 2022-03-15 深圳市正运动技术有限公司 Product processing method and device, terminal device and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102698929A (en) * 2012-06-20 2012-10-03 铜陵富仕三佳机器有限公司 Automatic dispensing detection adjusting device
CN103115615A (en) * 2013-01-28 2013-05-22 山东科技大学 Fully-automatic calibration method for hand-eye robot based on exponential product model
CN103846192A (en) * 2014-03-21 2014-06-11 武汉大学 Autonomous-positioning type intelligent dispensing system
CN107920684A (en) * 2015-09-04 2018-04-17 雀巢产品技术援助有限公司 Beverage machine with ergonomics outlet
CN108122257A (en) * 2016-11-28 2018-06-05 沈阳新松机器人自动化股份有限公司 A kind of Robotic Hand-Eye Calibration method and device
CN111178317A (en) * 2020-01-06 2020-05-19 广东博智林机器人有限公司 Detection positioning method, system, device, electronic equipment and storage medium
CN111195897A (en) * 2018-11-20 2020-05-26 财团法人工业技术研究院 Calibration method and device for mechanical arm system
CN111314619A (en) * 2020-03-25 2020-06-19 深圳创维-Rgb电子有限公司 Shooting angle control method, terminal and storage medium
US20200230938A1 (en) * 2014-07-13 2020-07-23 Stratasys Ltd. Method and system for rotational 3d printing
CN111445521A (en) * 2020-02-24 2020-07-24 季华实验室 Target workpiece position determining method, device, terminal and readable storage medium
CN112348895A (en) * 2020-11-18 2021-02-09 深圳创维-Rgb电子有限公司 Control method, control equipment and medium for attaching liquid crystal flat plate

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102698929A (en) * 2012-06-20 2012-10-03 铜陵富仕三佳机器有限公司 Automatic dispensing detection adjusting device
CN103115615A (en) * 2013-01-28 2013-05-22 山东科技大学 Fully-automatic calibration method for hand-eye robot based on exponential product model
CN103846192A (en) * 2014-03-21 2014-06-11 武汉大学 Autonomous-positioning type intelligent dispensing system
US20200230938A1 (en) * 2014-07-13 2020-07-23 Stratasys Ltd. Method and system for rotational 3d printing
CN107920684A (en) * 2015-09-04 2018-04-17 雀巢产品技术援助有限公司 Beverage machine with ergonomics outlet
CN108122257A (en) * 2016-11-28 2018-06-05 沈阳新松机器人自动化股份有限公司 A kind of Robotic Hand-Eye Calibration method and device
CN111195897A (en) * 2018-11-20 2020-05-26 财团法人工业技术研究院 Calibration method and device for mechanical arm system
CN111178317A (en) * 2020-01-06 2020-05-19 广东博智林机器人有限公司 Detection positioning method, system, device, electronic equipment and storage medium
CN111445521A (en) * 2020-02-24 2020-07-24 季华实验室 Target workpiece position determining method, device, terminal and readable storage medium
CN111314619A (en) * 2020-03-25 2020-06-19 深圳创维-Rgb电子有限公司 Shooting angle control method, terminal and storage medium
CN112348895A (en) * 2020-11-18 2021-02-09 深圳创维-Rgb电子有限公司 Control method, control equipment and medium for attaching liquid crystal flat plate

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
任玮: "G代码在点胶机器人示教器中的应用", 《机电信息》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114187349A (en) * 2021-11-03 2022-03-15 深圳市正运动技术有限公司 Product processing method and device, terminal device and storage medium
CN114187349B (en) * 2021-11-03 2022-11-08 深圳市正运动技术有限公司 Product processing method and device, terminal device and storage medium

Also Published As

Publication number Publication date
CN112907673B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN108540965B (en) Internet of things communication method and device based on LoRa technology and storage medium
CN112907673B (en) Positioning method, positioning device, terminal equipment and storage medium
CN114900199A (en) Scattering parameter determination method and device, signal processing circuit and electronic equipment
WO2022088989A1 (en) Augmented reality image display method and related apparatus
EP3687183A1 (en) Video picture display method in large screen system, apparatus, and storage medium
CN111949187B (en) Electronic whiteboard content editing and sharing method, system, equipment and server
CN114187349B (en) Product processing method and device, terminal device and storage medium
CN114178720B (en) Correcting method of galvanometer type laser marking machine and terminal equipment
CN114252100B (en) Online calibration method, device, equipment and storage medium for sensor
CN112397453B (en) Display panel and electronic equipment
CN113888669A (en) Winding layout drawing method, device, equipment and storage medium
CN113393809A (en) Display terminal control method, display terminal control device, display terminal and storage medium
CN114706135A (en) Magnetic field intensity compensation method and device, storage medium and mobile terminal
CN112532971A (en) Image processing method, image processing device, display terminal and computer readable storage medium
CN112929832A (en) Position tracking method and device, electronic equipment and readable storage medium
CN113223048B (en) Method and device for determining hand-eye calibration precision, terminal equipment and storage medium
CN114115013B (en) Control method of robot motor, terminal device and storage medium
WO2024059991A1 (en) Oscillation frequency control method and system, and display apparatus
CN117784833B (en) System, method, equipment and medium for controlling speed of plane-symmetric aircraft
CN103558751B (en) A kind of wrist-watch
CN113895646B (en) Automatic measurement method and device for attitude adjustment butt joint of airplane components
CN114061448A (en) Method and device for obtaining assembling position deviation of assembling hole of composite material wallboard
CN115861139A (en) Corona discharge image visualization method, device and equipment and storage medium
CN113449948B (en) Service processing method, device, electronic equipment and medium
CN118279916A (en) Text positioning model training method and electronic equipment

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Tang Yiyao

Inventor after: Jia Renjun

Inventor after: Wang Yong

Inventor after: Peng Qingxiong

Inventor before: Jia Renjun

Inventor before: Tang Yiyao

Inventor before: Wang Yong

Inventor before: Peng Qingxiong

GR01 Patent grant
GR01 Patent grant