CN110889832A - Workpiece positioning method and device, electronic equipment and workpiece positioning system - Google Patents
Workpiece positioning method and device, electronic equipment and workpiece positioning system Download PDFInfo
- Publication number
- CN110889832A CN110889832A CN201911128701.2A CN201911128701A CN110889832A CN 110889832 A CN110889832 A CN 110889832A CN 201911128701 A CN201911128701 A CN 201911128701A CN 110889832 A CN110889832 A CN 110889832A
- Authority
- CN
- China
- Prior art keywords
- edge
- workpiece
- line
- reference point
- position information
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 230000001788 irregular Effects 0.000 claims abstract description 13
- 238000004590 computer program Methods 0.000 claims description 13
- 238000003754 machining Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000000926 separation method Methods 0.000 description 6
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 241001292396 Cirrhitidae Species 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The application relates to the field of equipment part machining, in particular to a workpiece positioning method, a workpiece positioning device, electronic equipment and a workpiece positioning system. The workpiece comprises a first edge, a second edge which is opposite to the first edge and is irregular, and a third edge which is adjacent to the second edge, and the workpiece positioning method comprises the following steps: determining a first edge line for representing the first edge, a second edge line for representing the second edge and a third edge line for representing the third edge from the acquired workpiece image, determining a first reference point from the second edge line according to the first edge line, determining a second reference point from the third edge line, and obtaining workpiece position information according to the first reference point and the second reference point. The workpiece positioning method, the workpiece positioning device and the electronic equipment, namely the workpiece positioning system can ensure the accuracy of the workpiece position information.
Description
Technical Field
The application relates to the field of equipment part machining, in particular to a workpiece positioning method, a workpiece positioning device, electronic equipment and a workpiece positioning system.
Background
In the field of machining of machine parts, it is generally necessary to grasp or attach a workpiece, for example, a first workpiece to a second workpiece, and in the process, it is often necessary to position the second workpiece in advance. When the second work piece edge is totally regular, can guarantee positioning accuracy, however, when the second work piece edge is incomplete irregular, often can't guarantee positioning accuracy. Therefore, how to ensure the positioning accuracy of the workpiece with an incomplete and irregular edge becomes a technical problem to be solved urgently in the field of equipment part machining.
Disclosure of Invention
An object of the present invention is to provide a method and an apparatus for positioning a workpiece, an electronic device, and a workpiece positioning system to solve the above problems.
In a first aspect, a workpiece positioning method provided in an embodiment of the present application is used for acquiring position information of a workpiece, where the workpiece includes a regular first edge, a second edge opposite to the first edge and irregular, and a third edge adjacent to the second edge and regular, and the workpiece positioning method includes:
determining a first edge line for representing the first edge, a second edge line for representing the second edge and a third edge line for representing the third edge from the acquired workpiece image;
determining a first reference point from the second edge according to the first edge;
determining a second reference point from the third edge;
and acquiring workpiece position information according to the first reference point and the second reference point.
In an embodiment of the present application, a workpiece includes a first edge, a second edge opposite to the first edge and irregular, and a third edge adjacent to the second edge, and a workpiece positioning method includes: determining a first edge line for representing the first edge, a second edge line for representing the second edge and a third edge line for representing the third edge from the acquired workpiece image, determining a first reference point from the second edge line according to the first edge line, determining a second reference point from the third edge line, and obtaining workpiece position information according to the first reference point and the second reference point. Since the first reference point determined on the second edge is obtained according to the first edge, the first edge is used for representing the first edge, the first edge is a regular edge, meanwhile, the second reference point is determined from the third edge, the third edge is used for representing the third edge, and the third edge is a regular edge, the workpiece position information obtained according to the first reference point and the second reference point has accuracy.
With reference to the first aspect, this application provides a first optional implementation manner of the first aspect, where determining, according to the first edge, the first reference point from the second edge includes:
obtaining a plurality of edge points included on the second edge line and the spacing distance between each edge point and the first edge line;
and acquiring an edge line point with the shortest spacing distance from the first edge line from the plurality of edge line points as a first reference point.
In an embodiment of the present application, determining a first reference point from a second edge according to the first edge includes: and obtaining a plurality of edge line points included on the second edge line and the spacing distance between each edge line point and the first edge line, and obtaining the edge line point with the shortest spacing distance between the edge line point and the first edge line from the plurality of edge line points to be directly used as the first reference point, so that the execution efficiency of the workpiece positioning method can be improved.
With reference to the first aspect, an embodiment of the present application further provides a second optional implementation manner of the first aspect, where determining a second reference point from a third edge includes:
and acquiring a middle point of the third line as a second reference point.
In this embodiment of the application, determining the second reference point from the third edge includes: and acquiring the middle point of the third edge line, and directly taking the middle point as a second reference point, so that the execution efficiency of the workpiece positioning method can be further improved.
With reference to the first aspect, an embodiment of the present application further provides a third optional implementation manner of the first aspect, where obtaining the workpiece position information according to the first reference point and the second reference point includes:
creating a first reference line which passes through the first reference point and is parallel to the first side line;
creating a second reference line which passes through the second reference point and is perpendicular to the first reference line;
and acquiring workpiece position information according to the first reference line and the second reference line.
In the embodiment of the present application, obtaining the workpiece position information according to the first reference point and the second reference point includes: the method comprises the steps of creating a first reference line which passes through a first reference point and is parallel to a first side line, creating a second reference line which passes through a second reference point and is perpendicular to the first reference line, and obtaining workpiece position information according to the first reference line and the second reference line.
With reference to the third optional implementation manner of the first aspect, an example of the present application further provides a fourth optional implementation manner of the first aspect, where obtaining the workpiece position information according to the first reference line and the second reference line includes:
and acquiring intersection point position information of the first reference line and the second reference line and angle information of the second reference line as workpiece position information.
In the embodiment of the present application, obtaining the workpiece position information according to the first reference line and the second reference line includes: and acquiring intersection point position information of the first reference line and the second reference line and angle information of the second reference line, and using the intersection point position information and the angle information as workpiece position information, thereby further improving the accuracy of the workpiece position information.
With reference to the first aspect, an embodiment of the present application further provides a fifth optional implementation manner of the first aspect, where after obtaining the workpiece position information according to the first reference point and the second reference point, the method for positioning a workpiece further includes:
judging whether the position of the workpiece meets a preset position standard or not according to the position information of the workpiece;
and when the position of the workpiece does not meet the preset position standard, generating a position adjusting instruction according to the workpiece position information and the preset position standard.
In an embodiment of the present application, after obtaining the workpiece position information according to the first reference point and the second reference point, the method for positioning a workpiece further includes: and judging whether the position of the workpiece meets the preset position standard or not according to the workpiece position information, so that the function comprehensiveness of the workpiece positioning method is improved.
In a second aspect, a workpiece positioning device provided in an embodiment of the present application is configured to obtain position information of a workpiece, where the workpiece includes a regular first edge, a second edge opposite to the first edge and irregular, and a third edge adjacent to the second edge and regular, and the workpiece positioning device includes:
the first acquisition module is used for determining a first edge line for representing the first edge, a second edge line for representing the second edge and a third edge line for representing the third edge from the acquired workpiece image;
the second obtaining module is used for determining a first reference point from the second edge line according to the first edge line;
the third acquisition module is used for determining a second reference point from the third edge;
and the positioning module is used for acquiring the position information of the workpiece according to the first reference point and the second reference point.
The workpiece positioning device provided by the embodiment of the application has the same beneficial effects as the workpiece positioning device method, and the details are not repeated here.
In a third aspect, an electronic device provided in an embodiment of the present application includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement the workpiece positioning method provided in the first aspect or any one of the optional implementations of the first aspect.
The electronic device provided by the embodiment of the application has the same beneficial effects as the workpiece positioning method, and details are not repeated here.
In a fourth aspect, a workpiece positioning system provided by an embodiment of the present application includes an image capturing apparatus and the electronic apparatus provided in the third aspect, where the image capturing apparatus is connected to the electronic apparatus;
the camera shooting equipment is used for acquiring a workpiece image and sending the workpiece image to the electronic equipment;
the electronic device is configured to receive an image of a workpiece and implement the workpiece positioning method according to the first aspect or any one of the optional embodiments of the first aspect.
The workpiece positioning system provided by the embodiment of the application has the same beneficial effects as the electronic equipment, and is not repeated herein.
In a fifth aspect, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed, the method for positioning a workpiece, which is provided by the foregoing first aspect or any optional implementation manner of the first aspect, may be implemented.
The computer-readable storage medium provided in the embodiment of the present application has the same beneficial effects as the above workpiece positioning method, and is not described herein again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural block diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating steps of a workpiece positioning method according to an embodiment of the present disclosure.
Fig. 3 is an auxiliary explanatory diagram of a workpiece positioning method according to an embodiment of the present application.
Fig. 4 is another auxiliary explanatory diagram of a workpiece positioning method according to an embodiment of the present application.
Fig. 5 is a schematic structural block diagram of a workpiece positioning device according to an embodiment of the present application.
Fig. 6 is a schematic structural block diagram of a workpiece positioning system according to an embodiment of the present application.
Reference numerals: 10-a workpiece positioning system; 100-an electronic device; 110-a processor; 120-a memory; 200-a workpiece positioning device; 210-a first obtaining module; 220-a second acquisition module; 230-a third acquisition module; 240-a positioning module; 300-image pickup apparatus.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Referring to fig. 1, a schematic block diagram of an electronic device 100 applying a workpiece positioning method and apparatus according to an embodiment of the present application is shown. In the embodiment of the present application, the electronic device 100 may be, but is not limited to, an industrial device with data processing capability, such as a computer, an industrial personal computer, and the like, and structurally, the electronic device 100 may include a processor 110 and a memory 120.
The processor 110 and the memory 120 are electrically connected directly or indirectly to enable data transmission or interaction, for example, the components may be electrically connected to each other via one or more communication buses or signal lines. The workpiece positioning device 200 includes at least one software module that may be stored in the memory 120 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic apparatus 100. The processor 110 is configured to execute executable modules stored in the memory 120, such as software functional modules and computer programs included in the workpiece positioning apparatus 200, to implement the workpiece positioning method. The processor 110 may execute the computer program upon receiving the execution instruction.
The processor 110 may be an integrated circuit chip having signal processing capabilities. The Processor 110 may also be a general-purpose Processor, for example, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
The Memory 120 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), and an electrically Erasable Programmable Read-Only Memory (EEPROM). The memory 120 is used for storing a program, and the processor 110 executes the program after receiving the execution instruction.
It should be understood that the structure shown in fig. 1 is merely an illustration, and the electronic device 100 provided in the embodiment of the present application may have fewer or more components than those shown in fig. 1, or may have a different configuration than that shown in fig. 1. Further, the components shown in fig. 1 may be implemented by software, hardware, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart illustrating a workpiece positioning method according to an embodiment of the present disclosure, where the method is applied to the electronic apparatus 100 shown in fig. 1. It should be noted that, the workpiece positioning method provided in the embodiment of the present application is not limited by the sequence shown in fig. 2 and the following, and the specific flow and steps of the workpiece positioning method are described below with reference to fig. 2.
Step S100, determining a first edge for representing the first edge, a second edge for representing the second edge, and a third edge for representing the third edge from the acquired workpiece image.
In the embodiment of the present application, the workpiece may be, but is not limited to, a battery pole piece, a semiconductor patch, a resistor patch, and an optical display component. In addition, the workpiece may be configured as a rectangular (square or rectangular) sheet-like structure, and the workpiece includes at least two regular edge lines. For example, the workpiece includes a regular first edge, a second edge opposite the first edge and irregular, and a third edge adjacent the second edge and regular. In the embodiment of the present application, it is to be noted that, for an edge of a certain edge, it is irregular, and it is understood that there is a burr on the edge, or there is a protrusion on the edge, or the edge is blocked by a foreign object, and therefore, an edge line used for characterizing the edge is a non-smooth straight line.
In the embodiment of the application, after the workpiece image used for representing the appearance of the workpiece is acquired, the first edge line can be determined through the line finding tool. The line finding tool is realized in the principle that after the workpiece image is obtained, a Region Of Interest (ROI) is obtained from a first edge part Of the workpiece image, a target number Of edge points are obtained from the ROI, and then the target number Of edge points are fitted to obtain a first edge line.
The ROI refers to a region to be processed which is delineated by a frame in the shape of a square frame, a circle, an ellipse, an irregular polygon and the like in a processed image in the process of machine vision and image processing. In practical implementation, the region of interest may be obtained through various operators (operators) and functions commonly used in machine vision software such as Halcon, OpenCV, Matlab, and the like. In addition, in this embodiment of the application, the target number may be, but is not limited to, 3, 5, or 10, and after the target number of edge points is obtained, the target number of edge points is fitted by using a least square method to obtain the first edge.
It can be understood that, in the embodiment of the present application, determining the second edge from the workpiece image and determining the third edge from the workpiece image may also be implemented by a line finding tool, and therefore, details of the embodiment of the present application are not described herein.
In addition, it can be further understood that, in the embodiment of the present application, since the first edge and the third edge are regular edge lines, and the second edge is an irregular edge line, the determined first edge line and the third edge line are accurate, and the accuracy of the determined second edge line is difficult to guarantee, so that the workpiece position information cannot be directly obtained through the second edge. Therefore, for the workpiece needing to be positioned by the second edge, the positioning accuracy of the workpiece cannot be ensured in the prior art.
And step S200, determining a first reference point from the second edge according to the first edge.
In this embodiment of the application, the first reference point may be a certain edge point obtained from the target number of edge points included in the ROI in the process of determining the second edge line from the workpiece image by the line finding tool, for example, an edge point with a shortest separation distance from the first edge line among the target number of edge points. Based on this, in the embodiment of the present application, the step S200 may include a step S210 and a step S220.
Step S210, a plurality of edge points included on the second edge and a distance between each edge point and the first edge are obtained.
In the embodiment of the application, the image pickup device for acquiring the workpiece image and the camera coordinate system corresponding to the image pickup device can be determined, the pixel coordinate system or the physical coordinate system of the workpiece image is acquired according to the camera coordinate system and is used as the reference coordinate system, and finally, the spacing distance between each edge line and the first edge line is acquired based on the reference coordinate system. Step S210 will be further described below by taking as an example a physical coordinate system in which the workpiece image is obtained from the camera coordinates as a reference coordinate system, and the reference coordinate system is denoted as XOY.
For convenience of description, please refer to fig. 3, in the embodiment of the present application, the first edge is denoted as a, and the second edge is denoted as b. Illustratively, the ROI obtained from the second edge portion of the workpiece image includes an edge point b1, an edge point b2, and an edge point b3, and in the process of obtaining the separation distance between the edge point b1 and the first edge a, an edge point that is the same as the Y-axis coordinate value of the edge point b1 may be determined on the first edge a as a target edge point a1, and thereafter, an X-axis coordinate difference between the edge point b1 and the target edge point a1 may be obtained as the separation distance between the edge point b1 and the first edge a, and similarly, an X-axis coordinate difference between the edge point b2 and the target edge point a2 may be obtained as the separation distance between the edge point b2 and the first edge a, and an X-axis coordinate difference between the edge point b3 and the target edge point a3 may be obtained as the separation distance between the edge point b3 and the first edge a.
In step S220, an edge point with the shortest distance to the first edge is obtained from the edge points, and the obtained edge point is used as a first reference point.
In step S300, a second reference point is determined from the third edge.
In the embodiment of the present application, the second reference point may be a middle point of the third side line. Based on this, with respect to step S300, it may include step S310, acquiring a middle point of the third edge as the second reference point.
Step S400, acquiring workpiece position information according to the first reference point and the second reference point.
Since the first reference point determined on the second edge is obtained according to the first edge, the first edge is used for representing the first edge, the first edge is a regular edge, meanwhile, the second reference point is determined from the third edge, the third edge is used for representing the third edge, and the third edge is a regular edge, the workpiece position information obtained according to the first reference point and the second reference point has accuracy.
Further, in the embodiment of the present application, the step S400 may include a step S410, a step S420, and a step S430.
In step S410, a first reference line passing through the first reference point and parallel to the first edge line is created.
In step S420, a second reference line passing through the second reference point and perpendicular to the first reference line is created.
Step S430, obtaining workpiece position information according to the first reference line and the second reference line.
Similarly, referring to fig. 3, for convenience of description, in the embodiment of the present application, the third line may be denoted as c, the second reference point may be denoted as c1, and assuming that the first reference point is b1, a first reference line passing through the first reference point b1 and parallel to the first line a is denoted as d, and a second reference line passing through the second reference point c1 and perpendicular to the first reference line d is denoted as e. Thereafter, based on the first reference line d and the second reference line e, the workpiece position information is obtained to realize the workpiece positioning.
Further, as an optional implementation manner, in this embodiment, regarding step S430, it may include step S431, acquiring intersection position information of the first reference line and the second reference line, and angle information of the second reference line, as the workpiece position information together. It should be noted that, in the embodiment of the present application, the intersection position information of the first reference line and the second reference line may be an intersection coordinate value of the first reference line and the second reference line, and the angle information of the second reference line may be an angle value between the second reference line and the X axis. Similarly, referring to fig. 3, the intersection position information of the first reference line d and the second reference line e may be the coordinate value of the intersection de1, and the angle information of the second reference line e may be the angle value between the second reference line e and the X-axis.
In order to improve the comprehensiveness of the functions of the workpiece positioning method, the workpiece positioning method provided in the embodiment of the present application may further include step S500 and step S600.
And S500, judging whether the position of the workpiece meets a preset position standard or not according to the workpiece position information.
In combination with the description of the foregoing step S400, in this embodiment, the preset position criterion may be that the coordinate value of the intersection point of the first reference line and the second reference line is a target coordinate value, and the angle value between the second reference line and the X axis is a target angle value, and the target coordinate value and the target angle value may be set according to actual requirements, which is not limited in this embodiment.
Step S600, when the position of the workpiece does not meet the preset position standard, generating a position adjusting instruction according to the workpiece position information and the preset position standard.
In the embodiment of the application, the position adjusting instruction comprises a coordinate adjusting instruction and an angle adjusting instruction. The coordinate adjustment instruction can be generated according to the intersection position coordinate value of the first reference line and the second reference line and the target coordinate value, and the angle adjustment instruction can be generated according to the angle value between the second reference line and the X axis and the target angle value.
For convenience of description, in the embodiment of the present application, an intersection of the first reference line and the second reference line may be denoted as de1(X1, Y1), and the target coordinate value may be denoted as de2(X2, Y2), and thereafter, a coordinate adjustment command may be generated according to an X coordinate difference between the intersection de1 and the intersection de2, that is, a difference between X1 and X2, and a Y coordinate difference between the intersection de1 and the intersection de2, that is, a difference between Y1 and Y2. Referring to FIG. 4, coordinate adjustment commands may be generated that characterize the movement of the workpiece in the X-axis direction (X2-X1) and the movement of the workpiece in the Y-axis direction (Y2-Y1). If the angle value between the second reference line and the X axis is 1 ° when the target angle value is 0, an angle adjustment command for indicating that the workpiece is rotated clockwise by 1 ° with the intersection point of the first reference line and the second reference line as a rotation point is generated.
Based on the same inventive concept as the workpiece positioning method, the workpiece positioning apparatus 200 according to the embodiment of the present application is provided. Referring to fig. 5, a workpiece positioning apparatus 200 according to an embodiment of the present disclosure includes a first obtaining module 210, a second obtaining module 220, a third obtaining module 230, and a positioning module 240.
The first obtaining module 210 is configured to determine a first edge representing the first edge, a second edge representing the second edge, and a third edge representing the third edge from the obtained workpiece image.
The description of the first obtaining module 210 may refer to the detailed description of the step S100 shown in fig. 2, that is, the step S100 may be performed by the first obtaining module 210.
The second obtaining module 220 is configured to determine the first reference point from the second edge according to the first edge.
The description of the second obtaining module 220 may refer to the detailed description of step S200 shown in fig. 2, that is, step S200 may be performed by the second obtaining module 220.
A third obtaining module 230, configured to determine a second reference point from the third edge.
The description of the third obtaining module 230 may refer to the detailed description of step S300 shown in fig. 2, that is, step S300 may be performed by the third obtaining module 230.
And the positioning module 240 is configured to obtain the workpiece position information according to the first reference point and the second reference point.
The description of the positioning module 240 may refer to the detailed description of step S400 shown in fig. 2, that is, step S400 may be performed by the positioning module 240.
In this embodiment, the second obtaining module 220 may include a first obtaining unit and a second obtaining unit.
A first obtaining unit, configured to obtain a plurality of edge points included on the second edge, and a separation distance between each edge point and the first edge;
the description of the first obtaining unit may refer to the detailed description of step S210 in the above related embodiment of the workpiece positioning method, that is, step S210 may be executed by the first obtaining unit.
And the second acquisition unit is used for acquiring the edge line point with the shortest spacing distance with the first edge line from the plurality of edge line points as the first reference point.
The description of the second obtaining unit may refer to the detailed description of step S220 in the above-mentioned related embodiment of the workpiece positioning method, that is, step S220 may be executed by the second obtaining unit.
In this embodiment, the third obtaining module 230 may include a third obtaining unit.
And the third acquisition unit is used for acquiring the middle point of the third edge as a second reference point.
The description of the third acquiring unit may refer to the detailed description of step S310 in the above-mentioned related embodiment of the workpiece positioning method, that is, step S310 may be executed by the third acquiring unit.
In the embodiment of the present application, the positioning module 240 may include a first creating unit, a second creating unit, and a positioning unit.
And the first creating unit is used for creating a first reference line which passes through the first reference point and is parallel to the first side line.
The description of the first creating unit may refer to the detailed description of step S410 in the above-mentioned related embodiment of the workpiece positioning method, that is, step S410 may be executed by the first creating unit.
And the second creating unit is used for creating a second reference line which passes through the second reference point and is vertical to the first reference line.
The description of the second creating unit may refer to the detailed description of step S420 in the above-mentioned related embodiment of the workpiece positioning method, that is, step S420 may be executed by the second creating unit.
And the positioning unit is used for acquiring the position information of the workpiece according to the first reference line and the second reference line.
The description of the positioning unit may refer to the detailed description of step S430 in the embodiment related to the workpiece positioning method, that is, step S430 may be executed by the positioning unit.
In the embodiment of the present application, the positioning unit may include a positioning subunit.
And the positioning subunit is used for acquiring intersection point position information of the first reference line and the second reference line and angle information of the second reference line, and the intersection point position information and the angle information are jointly used as workpiece position information.
The description of the positioning subunit may refer to the detailed description of step S431 in the embodiment related to the workpiece positioning method, that is, step S431 may be executed by the positioning subunit.
In the embodiment of the present application, the workpiece positioning apparatus 200 may further include a determining module and a command generating module.
And the judging module is used for judging whether the position of the workpiece meets a preset position standard or not according to the position information of the workpiece.
The description of the determination module may refer to the detailed description of step S500 in the embodiment related to the workpiece positioning method, that is, step S500 may be executed by the determination module.
And the instruction generating module is used for generating a position adjusting instruction according to the workpiece position information and the preset position standard when the position of the workpiece does not meet the preset position standard.
The description of the instruction generation module may refer to the detailed description of step S600 in the embodiment related to the workpiece positioning method, that is, step S600 may be executed by the instruction generation module.
Referring to fig. 6, an embodiment of the present application further provides a workpiece positioning system 10, where the workpiece positioning system 10 includes an image capturing apparatus 300 and an electronic apparatus 100, and the image capturing apparatus 300 is connected to the electronic apparatus 100.
The image capturing apparatus 300 is configured to acquire a workpiece image and send the workpiece image to the electronic apparatus 100.
The electronic device 100 is used for receiving the workpiece image and implementing the workpiece positioning method.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed, the method for positioning a workpiece provided in the foregoing method embodiment may be implemented.
In summary, in the embodiment of the present application, the workpiece includes a first edge, a second edge opposite to the first edge and irregular, and a third edge adjacent to the second edge, and the workpiece positioning method, the apparatus, the electronic device, and the workpiece positioning system are capable of determining a first edge line for representing the first edge, a second edge line for representing the second edge, and a third edge line for representing the third edge from the acquired workpiece image, determining a first reference point from the second edge line according to the first edge line, determining a second reference point from the third edge line, and then obtaining the workpiece position information according to the first reference point and the second reference point. Since the first reference point determined on the second edge is obtained according to the first edge, the first edge is used for representing the first edge, the first edge is a regular edge, meanwhile, the second reference point is determined from the third edge, the third edge is used for representing the third edge, and the third edge is a regular edge, the workpiece position information obtained according to the first reference point and the second reference point has accuracy.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in each embodiment of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a RAM, a ROM, a magnetic disk, or an optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Moreover, it is noted that, in this document, relational terms such as "first," "second," and "third," and the like, are 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.
Claims (10)
1. A method of positioning a workpiece, the workpiece including a first edge that is regular, a second edge that is opposite the first edge and is irregular, and a third edge that is adjacent the second edge and is regular, the method comprising:
determining a first edge line for characterizing the first edge, a second edge line for characterizing the second edge, and a third edge line for characterizing the third edge from the acquired workpiece image;
determining a first reference point from the second edge according to the first edge;
determining a second reference point from the third edge;
and acquiring workpiece position information according to the first reference point and the second reference point.
2. The method of claim 1, wherein said determining a first reference point from said second edge based on said first edge comprises:
obtaining a plurality of edge points included on the second edge line and the spacing distance between each edge point and the first edge line;
and acquiring an edge line point with the shortest spacing distance with the first edge line from the plurality of edge line points as the first reference point.
3. The method of claim 1, wherein determining a second reference point from the third edge comprises:
and acquiring a middle point of the third edge line as the second reference point.
4. The workpiece positioning method of claim 1, wherein obtaining workpiece position information from the first reference point and the second reference point comprises:
creating a first reference line which passes through the first reference point and is parallel to the first side line;
creating a second reference line which passes through the second reference point and is perpendicular to the first reference line;
and acquiring workpiece position information according to the first reference line and the second reference line.
5. The method of claim 4, wherein said obtaining workpiece position information from said first reference line and said second reference line comprises:
and acquiring intersection point position information of the first reference line and the second reference line and angle information of the second reference line, and using the intersection point position information and the angle information as workpiece position information.
6. The workpiece positioning method according to claim 1, wherein after obtaining the workpiece position information based on the first reference point and the second reference point, the workpiece positioning method further comprises:
judging whether the position of the workpiece meets a preset position standard or not according to the workpiece position information;
and when the position of the workpiece does not meet the preset position standard, generating a position adjusting instruction according to the workpiece position information and the preset position standard.
7. A workpiece positioning device, wherein the workpiece includes a regular first edge, an irregular second edge opposite the first edge, and a regular third edge adjacent the second edge, the workpiece positioning device comprising:
the first acquisition module is used for determining a first edge line for representing the first edge, a second edge line for representing the second edge and a third edge line for representing the third edge from the acquired workpiece image;
the second obtaining module is used for determining a first reference point from the second edge according to the first edge;
a third obtaining module, configured to determine a second reference point from the third edge;
and the positioning module is used for acquiring the position information of the workpiece according to the first reference point and the second reference point.
8. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program thereon, and the processor is configured to execute the computer program to implement the workpiece positioning method according to any one of claims 1 to 7.
9. A workpiece positioning system comprising an image pickup apparatus, and the electronic apparatus of claim 8, the image pickup apparatus being connected to the electronic apparatus;
the camera shooting equipment is used for acquiring a workpiece image and sending the workpiece image to the electronic equipment;
the electronic equipment is used for receiving the workpiece image and realizing the workpiece positioning method of any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911128701.2A CN110889832B (en) | 2019-11-18 | 2019-11-18 | Workpiece positioning method and device, electronic equipment and workpiece positioning system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911128701.2A CN110889832B (en) | 2019-11-18 | 2019-11-18 | Workpiece positioning method and device, electronic equipment and workpiece positioning system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110889832A true CN110889832A (en) | 2020-03-17 |
CN110889832B CN110889832B (en) | 2021-03-23 |
Family
ID=69747865
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911128701.2A Active CN110889832B (en) | 2019-11-18 | 2019-11-18 | Workpiece positioning method and device, electronic equipment and workpiece positioning system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110889832B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111366078A (en) * | 2020-03-30 | 2020-07-03 | 深圳创维-Rgb电子有限公司 | Robot dispensing positioning method, system, server and storage medium |
CN111639644A (en) * | 2020-05-29 | 2020-09-08 | 广东利元亨智能装备股份有限公司 | Workpiece positioning method and device and electronic equipment |
CN115098957A (en) * | 2022-08-25 | 2022-09-23 | 玛斯特轻量化科技(天津)有限公司 | Method and device for generating connection point of vehicle body part and electronic equipment |
CN115229804A (en) * | 2022-09-21 | 2022-10-25 | 荣耀终端有限公司 | Method and device for attaching component |
CN116485893A (en) * | 2023-04-23 | 2023-07-25 | 创新奇智(上海)科技有限公司 | Method, system, equipment and medium for measuring article placement position |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107571048A (en) * | 2017-09-06 | 2018-01-12 | 深圳市贵峰精密有限公司 | The positioner and localization method of a kind of workpiece |
CN109282772A (en) * | 2018-11-23 | 2019-01-29 | 安徽华菱汽车有限公司 | A kind of measurement of cylinder head blank and workpiece coordinate system determine method |
US20190080446A1 (en) * | 2017-09-11 | 2019-03-14 | All Axis Robotics, LLC | System and method for automated defect detection |
CN109636849A (en) * | 2018-12-29 | 2019-04-16 | 广东嘉铭智能科技有限公司 | A kind of workpiece localization method, device, computer and computer readable storage medium |
CN110136190A (en) * | 2019-03-26 | 2019-08-16 | 华为技术有限公司 | A kind of distance measuring method and electronic equipment |
-
2019
- 2019-11-18 CN CN201911128701.2A patent/CN110889832B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107571048A (en) * | 2017-09-06 | 2018-01-12 | 深圳市贵峰精密有限公司 | The positioner and localization method of a kind of workpiece |
US20190080446A1 (en) * | 2017-09-11 | 2019-03-14 | All Axis Robotics, LLC | System and method for automated defect detection |
CN109282772A (en) * | 2018-11-23 | 2019-01-29 | 安徽华菱汽车有限公司 | A kind of measurement of cylinder head blank and workpiece coordinate system determine method |
CN109636849A (en) * | 2018-12-29 | 2019-04-16 | 广东嘉铭智能科技有限公司 | A kind of workpiece localization method, device, computer and computer readable storage medium |
CN110136190A (en) * | 2019-03-26 | 2019-08-16 | 华为技术有限公司 | A kind of distance measuring method and electronic equipment |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111366078A (en) * | 2020-03-30 | 2020-07-03 | 深圳创维-Rgb电子有限公司 | Robot dispensing positioning method, system, server and storage medium |
CN111366078B (en) * | 2020-03-30 | 2021-12-31 | 深圳创维-Rgb电子有限公司 | Robot dispensing positioning method, system, server and storage medium |
CN111639644A (en) * | 2020-05-29 | 2020-09-08 | 广东利元亨智能装备股份有限公司 | Workpiece positioning method and device and electronic equipment |
CN115098957A (en) * | 2022-08-25 | 2022-09-23 | 玛斯特轻量化科技(天津)有限公司 | Method and device for generating connection point of vehicle body part and electronic equipment |
CN115098957B (en) * | 2022-08-25 | 2022-11-18 | 玛斯特轻量化科技(天津)有限公司 | Method and device for generating connection point of vehicle body part and electronic equipment |
CN115229804A (en) * | 2022-09-21 | 2022-10-25 | 荣耀终端有限公司 | Method and device for attaching component |
CN116485893A (en) * | 2023-04-23 | 2023-07-25 | 创新奇智(上海)科技有限公司 | Method, system, equipment and medium for measuring article placement position |
CN116485893B (en) * | 2023-04-23 | 2024-02-23 | 创新奇智(上海)科技有限公司 | Method, system, equipment and medium for measuring article placement position |
Also Published As
Publication number | Publication date |
---|---|
CN110889832B (en) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110889832B (en) | Workpiece positioning method and device, electronic equipment and workpiece positioning system | |
CN107424160B (en) | System and method for finding image central line by visual system | |
CN108921890B (en) | Screw locking method and device and computer readable storage medium | |
CN109807885B (en) | Visual calibration method and device for manipulator and intelligent terminal | |
CN110539306B (en) | Workpiece bonding method and device | |
CN109784250B (en) | Positioning method and device of automatic guide trolley | |
CN110928235B (en) | Workpiece bonding method and device, electronic equipment and workpiece bonding system | |
US11625842B2 (en) | Image processing apparatus and image processing method | |
CN108111828B (en) | Projection equipment correction method and device and projection equipment | |
CN112381889B (en) | Camera inspection method, device, equipment and storage medium | |
CN112276936B (en) | Three-dimensional data generating device and robot control system | |
CN107705304B (en) | Positioning method and device | |
CN115631305A (en) | Driving method of skeleton model of virtual character, plug-in and terminal equipment | |
CN111761581B (en) | Path planning method and device, and narrow space traveling method and device | |
JP2019060742A (en) | Position detector and program | |
CN112556994B (en) | Optical information detection method, device and equipment | |
US20230351635A1 (en) | Optical axis calibration method and apparatus of optical axis detection system, terminal, system, and medium | |
US20190325593A1 (en) | Image processing apparatus, system, method of manufacturing article, image processing method, and non-transitory computer-readable storage medium | |
CN115829929A (en) | Method, device and equipment for detecting defects of product surface image and storage medium | |
CN111639644B (en) | Workpiece positioning method and device and electronic equipment | |
CN114119767A (en) | Workpiece grabbing method and device based on camera calibration and control system | |
CN115482186A (en) | Defect detection method, electronic device, and storage medium | |
CN109218707B (en) | Oral scanning system and oral scanning method | |
US11691237B2 (en) | Machine control device | |
US20200249309A1 (en) | Machine control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |