Nothing Special   »   [go: up one dir, main page]

CN118397105A - Positioning calibration teaching method and system based on machine vision traversal - Google Patents

Positioning calibration teaching method and system based on machine vision traversal Download PDF

Info

Publication number
CN118397105A
CN118397105A CN202410410034.1A CN202410410034A CN118397105A CN 118397105 A CN118397105 A CN 118397105A CN 202410410034 A CN202410410034 A CN 202410410034A CN 118397105 A CN118397105 A CN 118397105A
Authority
CN
China
Prior art keywords
workpiece
scanned
target position
motion control
control system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410410034.1A
Other languages
Chinese (zh)
Inventor
车一骋
张斐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yanmade Technology Co ltd
Original Assignee
Shenzhen Yanmade Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yanmade Technology Co ltd filed Critical Shenzhen Yanmade Technology Co ltd
Priority to CN202410410034.1A priority Critical patent/CN118397105A/en
Publication of CN118397105A publication Critical patent/CN118397105A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • 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/73Determining position or orientation of objects or cameras using feature-based methods

Landscapes

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

Abstract

The invention discloses a positioning calibration teaching method and a system based on machine vision traversal, wherein the method comprises the following steps: adjusting the field of view of the camera to cover the target position to be positioned; determining a scanning interval, and driving a workpiece to perform the scanning interval by a motion control system; obtaining offset data between the workpiece and the target position to be positioned according to the characteristic information of the workpiece and the target position to be positioned; according to the offset data, the gesture of the workpiece is adjusted and the workpiece is moved to an initial position; shooting the interval to be scanned by using a camera, judging whether the positioning requirement is met according to the obtained shooting image, if the positioning requirement is not met, controlling the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position by using a motion control system, otherwise, recording offset data at the current moment, and finishing positioning calibration. The invention can improve the efficiency and accuracy of positioning calibration and the teaching efficiency and quality.

Description

Positioning calibration teaching method and system based on machine vision traversal
Technical Field
The invention relates to the technical field of vision guiding and positioning, in particular to a positioning calibration teaching method and system based on machine vision traversal.
Background
With the continuous development of science and technology, the automatic equipment used in the manufacturing and production of various consumer electronic product parts is mostly integrated with machine vision to perform vision guiding and positioning, and the purpose of the vision guiding and positioning is to visually identify, correct deviation and place an object with an uncertain position at a target position.
In the existing visual guidance positioning technology, because of the deviation of geometric accuracy of a mechanical system, the resolution of a motion control system, the deviation of various links such as visual calibration mapping and the like, a fixed deviation exists between a target position and an actual position of an initial point in the visual guidance positioning, and in order to acquire the fixed deviation, the traditional mode is to acquire the fixed deviation by a manual teaching mode, but the manual teaching is seriously dependent on human eyes to judge, cannot be accurately quantified, and often needs repeated teaching, so that the whole teaching process is low in efficiency and uncontrollable in quality, and the running time of equipment is very wasted.
Therefore, how to improve the teaching process of visual guidance positioning and improve the efficiency and accuracy of positioning calibration is a technical problem to be solved urgently at present.
Disclosure of Invention
The embodiment of the invention provides a positioning calibration teaching method and a positioning calibration teaching system based on machine vision traversal, which are used for improving the efficiency and accuracy of positioning calibration and improving the teaching efficiency and quality by reasonably utilizing a motion control system and the resolution of machine vision.
In order to solve the technical problems, the embodiment of the application provides a positioning calibration teaching method based on machine vision traversal, which comprises the following steps:
adjusting a camera field of view so that the camera field of view fully covers a work surface, the work surface including a target location to be positioned;
Determining a section to be scanned according to the characteristic information of the target position to be positioned, wherein the center of the section to be scanned is the center of the target position to be positioned;
Driving a workpiece to enter the workbench surface through a motion control system, wherein the center of the workpiece is positioned in the interval to be scanned, and obtaining offset data between the workpiece and the target position to be positioned according to the characteristic information of the workpiece and the characteristic information of the target position to be positioned, wherein the offset data comprises displacement offset and angle offset;
According to the offset data, adjusting the gesture of the workpiece and moving the workpiece to an initial position through the motion control system;
Shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether positioning requirements are met or not according to the shooting image;
If the positioning requirement is not met, controlling the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position by utilizing the motion control system;
when the positioning requirement is met, the offset data of the current moment is recorded, and positioning calibration is completed.
In a possible implementation manner, if the positioning requirement is not met, controlling, by using the motion control system, the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position, including:
Controlling the workpiece to move by one scanning step length by utilizing the motion control system, wherein the scanning step length comprises the displacement offset of each movement of the workpiece;
shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to a first threshold value according to the shooting image;
If yes, recording the displacement offset of the workpiece movement, otherwise, controlling the workpiece to continue to move by one scanning step length by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging the relation between the distance between the center of the workpiece and the center of the target position to be positioned and the first threshold value according to the shooting image until the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to the first threshold value, and recording the displacement offset of the workpiece movement at the current moment;
Controlling the workpiece to deflect by a scanning angle by using the motion control system, wherein the scanning angle comprises the angular offset of each rotation of the workpiece;
Shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the angle difference value between the workpiece and the position of the target to be positioned is smaller than or equal to a second threshold value according to the shooting image;
If so, recording the angle offset of the workpiece rotation, otherwise, controlling the workpiece to continue to rotate by a scanning angle by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging whether the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value according to the shooting image until the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value, and recording the angle offset of the workpiece rotation at the current moment.
In another possible implementation manner, if the positioning requirement is not met, controlling, by using the motion control system, the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position, including:
Controlling the workpiece to deflect by a scanning angle by using the motion control system, wherein the scanning angle comprises the angular offset of each rotation of the workpiece;
Shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the angle difference value between the workpiece and the position of the target to be positioned is smaller than or equal to a second threshold value according to the shooting image;
If so, recording the angle offset of the workpiece rotation, otherwise, controlling the workpiece to continue to rotate by a scanning angle by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging whether the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value according to the shooting image until the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value, and recording the angle offset of the workpiece rotation at the current moment;
Controlling the workpiece to move by one scanning step length by utilizing the motion control system, wherein the scanning step length comprises the displacement offset of each movement of the workpiece;
shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to a first threshold value according to the shooting image;
if yes, recording the displacement offset of the workpiece movement, otherwise, controlling the workpiece to continue to move by one scanning step length by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging the relation between the distance between the center of the workpiece and the center of the target position to be positioned and the first threshold value according to the shooting image until the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to the first threshold value, and recording the displacement offset of the workpiece movement at the current moment.
In another possible implementation, the scan step is greater than a minimum step of the motion control system and greater than a minimum resolution of the camera; the scan angle is greater than a minimum yaw angle of the motion control system and greater than a minimum resolution angle of the camera.
In another possible implementation manner, the determining the interval to be scanned according to the feature information of the target position to be positioned includes:
determining the center of the target position to be positioned;
and taking the center of the target position to be positioned as the center of a region to be scanned, establishing a rectangular region enveloping the characteristics of the target position to be positioned, and determining the rectangular region as the region to be scanned.
In another possible implementation, the method further includes:
And calibrating a mapping relation between a shooting image shot by the camera and the motion control system according to the position relation between the camera and the motion control system, wherein the mapping relation comprises a conversion matrix from pixel coordinates to geographic coordinates, and the calibration method comprises a nine-point calibration method.
In order to solve the above technical problem, an embodiment of the present application further provides a positioning calibration teaching system based on machine vision traversal, including:
the camera module is used for shooting a section to be scanned, and the section to be scanned comprises a target position to be positioned;
the interval dividing module is used for determining the interval to be scanned according to the characteristic information of the target position to be positioned;
the motion control module is used for driving a workpiece to carry out the workbench surface, wherein the center of the workpiece is positioned in the interval to be scanned;
The calculation module is used for calculating offset data between the workpiece and the target position with positioning according to the characteristic information of the workpiece and the characteristic information of the target position to be positioned, wherein the offset data comprises a displacement offset and an angle offset;
The adjusting module is used for adjusting the gesture of the workpiece according to the offset data;
The motion control module is also used for moving the workpiece subjected to gesture adjustment to an initial position;
the image analysis module is used for analyzing and processing the image through an image processing algorithm and judging whether the positioning requirement is met or not;
The motion control module is further used for controlling the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position when the positioning requirement is not met;
And the positioning calibration module is used for recording the offset data of the current moment when the positioning requirement is met, and completing positioning calibration.
According to the positioning calibration teaching method based on machine vision traversal, quick teaching is performed in a mode of combining machine vision with a motion control system, the externally hung machine vision is used as a 'high-precision eye', the motion control system is responsible for performing inching traversal in a scanning interval, the machine vision continuously collects the position and angle relation between a workpiece and a calibration object (to-be-positioned target position) in a visual field and further feeds the position and angle relation back to the motion control system until the position and angle errors of the workpiece and the calibration object reach a preset range, final relevant parameters are recorded, and guiding positioning is completed. According to the method, in the whole guiding and positioning process, human eyes are not relied on for judgment, the teaching efficiency and quality are improved, the resolution of a motion control system and the resolution of machine vision are reasonably utilized for high-precision positioning calibration, the efficiency and the accuracy of positioning calibration are greatly improved, and therefore the utilization rate of equipment can be improved to the maximum extent, and the output is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an exemplary scenario in which the present application may be applied.
FIG. 2 is a general flow chart of a machine vision traversal-based positioning calibration teaching method of the present application.
FIG. 3 is a flow chart of the high precision subdivision-traversing position calibration of the present application.
FIG. 4 is a schematic diagram of a machine vision traversal-based positioning calibration teaching system according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, as shown in fig. 1, in the scenario, when the camera 110 is used to capture an image, the camera is ensured to be higher than the table surface 1210 of the motion control system (mechanical system) 120 when the camera 100 is installed, and the field of view of the camera 110 needs to completely cover the table surface 1210, the center of the target position (calibration object) 1220 to be positioned is found on the table surface 1210, the center is taken as the center of the interval to be scanned, a rectangular interval enveloping all the features of the target position 1220 to be positioned is established, the interval is determined as the interval 1230 to be scanned, and the workpiece 1240 is moved into the interval 1230 to be scanned. The interval 1230 to be scanned is shot by the camera 110 to obtain a shot image, the displacement deviation and the angle deviation of the workpiece 1240 and the target position 1220 to be positioned in the image are analyzed, if the displacement deviation and the angle deviation of the workpiece 1240 and the target position 1220 to be positioned exceed a set threshold value, the motion control system 120 traverses the workpiece 1240 to be moved in the interval 1230 to be scanned, one scanning step is moved each time, the image is shot by the camera 110 after each movement and is judged again until the displacement deviation of the workpiece 1240 and the target position 1220 to be positioned is smaller than the set threshold value, then the motion control system 120 traverses the workpiece 1240 to rotate by one scanning angle each time, and after each rotation, the image is shot by the camera 110 and is judged until the angle deviation of the workpiece 1240 and the target position 1220 to be positioned is smaller than the set threshold value, the offset data (including the displacement offset and the angle offset) of the workpiece 1240 are recorded, and the positioning calibration teaching process is completed.
Referring to fig. 2, fig. 2 is a general flowchart of a positioning calibration teaching method based on machine vision traversal according to an embodiment of the present invention, which is described in detail below.
S201, adjusting the camera view so that the camera view completely covers the workbench surface.
Specifically, in order to ensure that the camera can clearly shoot the workpiece and the position of the target to be positioned, the image shot by the camera can be conveniently analyzed, so that whether the positioning calibration teaching is finished or not can be accurately judged, the installation position of the camera needs to be set in advance, the visual field of the camera is adjusted, for example, the height of the camera from a working table can be adjusted, and the adjustment of the visual field can be completed by matching with a lens, so that the working table can be completely covered, and the working table contains the position of the target to be positioned.
Alternatively, the camera may be referred to as a detachable vision device, for obtaining an image with clear features and strong contrast, such as an area array industrial camera, and the application is not limited to what type and specification of camera is specifically selected.
S202, determining a section to be scanned according to the characteristic information of the target position to be positioned.
Specifically, in order to further improve the accuracy and efficiency of positioning calibration teaching, the field of view of the camera needs to be further subdivided, so that the camera can focus on the target position to be positioned more, and an image with clear characteristics and strong contrast can be obtained when the relevant area of the position to be positioned is shot.
In one possible implementation manner, a center of a target position to be positioned is determined, the center of the target position to be positioned is taken as a center of a region to be scanned, a rectangular region enveloping the characteristic of the target position to be positioned is established, and the rectangular region is determined as the region to be scanned.
Specifically, in order to complete the subsequent positioning calibration teaching process faster and better, the traversal range is reduced, the traversal calculation time is shortened, a reasonable scanning range needs to be determined, the range needs to ensure that all the features including the target position to be positioned cannot be omitted, and meanwhile, the range cannot be too large.
Optionally, when dividing the scan interval, taking the center of the target position to be positioned as the center of the scan interval, establishing a rectangular interval enveloping the characteristic of the target position to be positioned, where the characteristic of the target position to be positioned includes a positioned line or surface, and the like. It should be understood that, in order to reduce the complexity of interval division and facilitate subsequent traversal and calculation, a rectangular interval is selected as the scan interval, and of course, an interval of other shapes, such as a circle, enveloping the positioning target position feature may be established and used as the scan interval.
It can be seen that by subdividing the camera field of view, a reasonable scanning interval can be determined, so that the traversing area of the motion control system can be greatly reduced, the traversing time and calculation are reduced, and the accuracy and efficiency of positioning calibration teaching are effectively improved.
S203, driving the workpiece to carry out the workbench surface through the motion control system, and obtaining offset data between the workpiece and the target position to be positioned according to the characteristic information of the workpiece and the characteristic information of the target position to be positioned.
Specifically, the motion control system can use the manipulator to drive the workpiece to quickly enter the interval to be scanned, so that the center of the workpiece is positioned in the interval to be scanned, and then the workpiece and the characteristic information such as the shape and the gesture of the target position to be positioned are compared, for example, the center of the workpiece and the center of the target position to be positioned can be compared, and the displacement offset and the angle offset between the workpiece and the target position to be positioned can be obtained.
It should be understood that the displacement offset may represent a degree of matching of a distance between the workpiece and the target position to be positioned, and the angle offset may represent a degree of matching of an angle between the workpiece and the target position to be positioned, and by using the two parameters, whether the workpiece is accurately placed in the target position to be positioned can be accurately described on the whole, so that whether the positioning calibration requirement is met or not can be judged according to a magnitude relation between the two parameters and a preset threshold value, and the positioning calibration is completed.
S204, according to the offset data, adjusting the gesture of the workpiece and moving the workpiece to an initial position through the motion control system.
Specifically, after obtaining the displacement offset and the angular offset, the motion control system may use the manipulator to adjust the angular relationship between the workpiece and the target position to be positioned, and then move the workpiece to the placement position corresponding to the displacement offset according to the displacement offset.
In the process of carrying out posture adjustment and mobile placement on the workpiece according to the displacement offset and the angle offset, the motion control system is still not perfectly matched with the target position to be positioned due to the deviation of the geometric accuracy of the mechanical system, the deviation of the visual calibration and calibration mapping and the like after the workpiece is placed at the initial position, the product requirement is not met, and further adjustment on the displacement and the angle of the workpiece is needed to ensure that the displacement and the angle between the workpiece and the target position to be positioned are smaller than a preset threshold value, so that the product requirement is met.
In one possible implementation, the mapping relationship between the image shot by the camera and the motion control system is calibrated according to the position relationship between the camera and the motion control system.
Specifically, in order to find the corresponding coordinate point in the motion control system through the pixel point in the image shot by the camera, or find the corresponding pixel point in the image shot by the camera through the coordinate point in the motion control system, after the adjustment of the camera field of view is completed, the mapping relationship between the image shot by the camera and the motion control system needs to be calibrated according to the position relationship between the camera and the motion control system, and a conversion matrix from the pixel coordinate system to the mechanical coordinate system is found.
By way of example, the application can calibrate the mapping relation between the image shot by the camera and the motion control system in a nine-point calibration mode to obtain a conversion matrix from a pixel coordinate system to a mechanical coordinate system. Specifically, a calibration sheet is adopted, the offset of a mechanical system is given, the offset refers to the distance coordinate of a camera and a motion control system, the relative position is fixed, a plurality of coordinate points under the mechanical coordinate system, such as A1, A2, and An, can be obtained at the moment according to the camera mounting position, n pixel points under the pixel coordinate system corresponding to the n coordinate points, such as B1, B2, and Bn, can be obtained through mapping of the camera, two matrixes are respectively formed by the coordinate points and the pixel points, and then a conversion matrix from An to Bn can be calculated by using a least square method and the like.
It should be understood that, in addition to the above calibration of the mapping relationship between the image captured by the camera and the motion control system by the nine-point calibration method, to obtain the transformation matrix between the pixel coordinate system and the mechanical coordinate system, other modes may be used for calibration, which mode is specifically selected by the present application is not limited.
S205, shooting a section to be scanned by using a camera to obtain a shooting image, and judging whether the positioning requirement is met or not according to the shooting image.
Specifically, after the motion control system moves the workpiece to the initial position, a camera is used for shooting a section to be scanned to obtain a shooting image, then the displacement deviation and the angle deviation between the workpiece and the target position to be positioned are analyzed and calculated through the shooting image, for example, the workpiece and the target position to be positioned in the image can be found by utilizing a target detection algorithm, and then the size relation between the two deviations and a preset threshold value is compared, so that whether the positioning requirement is met can be judged, if the displacement deviation is smaller than the preset threshold value and the angle deviation is also smaller than the preset threshold value, the positioning requirement is considered to be met, otherwise, the positioning requirement is considered not to be met.
And S206, if the positioning requirement is not met, controlling the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position by using the motion control system.
Specifically, when the positioning requirement is not met and the displacement and angle of the workpiece are required to be further adjusted, the motion control system controls the workpiece to start to move gradually in the interval to be scanned, images are shot through the camera after each movement is completed, and whether the movement is required to be continued or not is analyzed through the images until the workpiece moves to a position meeting the positioning requirement.
Referring to fig. 3, fig. 3 is a flowchart of a high-precision subdivision traversal positioning calibration method according to the present application, which is described in detail below.
S301, controlling a workpiece to move by one scanning step by using a motion control system.
Specifically, the scanning step length represents the displacement distance moved by the workpiece during traversal, the value of the displacement distance is closely related to the positioning calibration teaching precision and the teaching efficiency, if the displacement distance is too large, the teaching precision is reduced, but the traversal time can be reduced by a larger value, and the scanning process of the section to be scanned can be completed in a shorter time; conversely, if the setting is too small, the teaching accuracy can be necessarily improved, but the traversing time can be increased, and the scanning process of the section to be scanned cannot be completed rapidly. Therefore, in order to balance the teaching precision and the teaching efficiency, a reasonable scanning step length needs to be set, so that the teaching efficiency can be improved while the teaching precision is ensured.
It should be noted that the scanning step cannot be set too small, and it must be ensured that the set scanning step is greater than the resolution of the motion control system (i.e., the minimum step of the motion control system), otherwise, the motion control system cannot complete the moving process of the workpiece, and at the same time, the scanning step is also required to be greater than the minimum resolution of the vision system, otherwise, the displacement distance of the workpiece moved cannot be identified through the image captured by the camera.
S302, shooting a section to be scanned by using a camera to obtain a shooting image, judging whether the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to a first threshold value according to the shooting image, if so, executing step S303, otherwise, executing step S301.
Specifically, after a shot image is obtained, the displacement offset between the center pixel coordinate of the workpiece and the center pixel coordinate of the target position to be positioned can be obtained directly according to the pixel coordinate of the center of the workpiece in the image, and compared with a first threshold value, when the displacement offset is smaller than or equal to the first threshold value, the workpiece and the target position to be positioned are basically matched, the positioning requirement is met, if the displacement offset is larger than the first threshold value, the workpiece and the target position to be positioned are also obviously different, the workpiece needs to be continuously moved to be closer to the target position to be positioned, and it is understood that the first threshold value can be set according to actual needs.
S303, recording the displacement offset of the workpiece movement at the current moment.
Specifically, when the workpiece is close enough to the target position to be positioned, and the positioning requirement is met, the displacement offset at this time needs to be recorded, where the displacement offset represents the displacement distance between the final position and the initial position of the workpiece, and is related to the number of traversals, for example, if the traversals are performed N times in total, the scanning step is L, and then the displacement offset is n×l.
S304, controlling the workpiece to deflect a scanning angle by utilizing the motion control system.
Specifically, after the displacement traversal is completed to find the displacement offset meeting the positioning requirement, angle traversal is needed to find the angle offset meeting the positioning requirement, and the traversal process and logic are similar to those of the displacement traversal, and can refer to the related description in the displacement traversal, which is not repeated here.
S305, shooting a section to be scanned by using a camera to obtain a shooting image, judging whether the angle difference value between the workpiece and the position of the target to be positioned is smaller than or equal to a second threshold value according to the shooting image, if so, executing a step S306, otherwise, executing a step S304.
Specifically, after a shot image is obtained, an angle difference value between the workpiece and the target position to be positioned can be obtained according to the image, then the angle difference value is compared with a second threshold value, when the angle difference value is smaller than or equal to the second threshold value, the fact that the angle difference value exists between the workpiece and the target position to be positioned basically does not exist, positioning requirements are met, when the angle difference value is larger than the second threshold value, the fact that the angle difference value exists between the workpiece and the target position to be positioned is obvious is indicated, the workpiece needs to be continuously rotated, the second threshold value can be set according to actual requirements, and the fact that the specific setting value is not limited is not particularly provided by the application.
S306, recording the angle offset of the workpiece rotation at the current moment.
Specifically, when there is no angular deviation or only a very small angular deviation between the workpiece and the target position to be positioned, and the positioning requirement is met, the angular deviation amount at this time needs to be recorded, and the angular deviation amount represents an angular deviation value between the final gesture of the workpiece and the initial position, which is related to the number of times of traversal, and the magnitude of the value is equal to the scanning angle multiplied by the number of times of traversal.
It should be noted that, in the high-precision subdivision traversal positioning calibration process described in fig. 3, displacement traversal is performed first, then angle traversal is performed, so as to find the final displacement offset and angle offset, and the positioning calibration teaching process is completed, or the traversal sequence may be adjusted, that is, angle traversal is performed first, then displacement traversal is performed, and the specific traversal process may refer to the related description in fig. 3, so that the description is omitted here for the sake of indirection.
S207, when the positioning requirement is met, recording offset data of the current moment, and finishing positioning calibration.
Specifically, when the displacement offset and the angle offset both meet the positioning requirement, the offset data at the current moment, namely the displacement offset and the angle offset, are recorded, and finally the whole positioning calibration teaching process is completed.
In this embodiment, the positioning calibration fast teaching is performed by adopting a mode of combining machine vision with a motion control system, the motion control system is responsible for performing inching traversal in a scanning interval by using the externally hung machine vision as a 'high-precision eye', the machine vision judges whether the workpiece meets the positioning requirement by continuously collecting the position and angle relation between the workpiece and the target position to be positioned in the scanning interval, and the machine vision is further fed back to the motion control system until the position and angle errors of the workpiece and the target position to be positioned reach a preset range, and the displacement offset and the angle offset are recorded to complete the whole positioning calibration teaching process. In the whole teaching process, the teaching efficiency and quality are improved without relying on human eyes for judgment, in addition, the high-precision positioning calibration is performed by reasonably utilizing the resolution of a motion control system and machine vision, and the efficiency and accuracy of the positioning calibration are greatly improved, so that the utilization rate of equipment can be maximized, and the output is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Fig. 4 shows a functional block diagram of a machine vision traversal-based positioning calibration teaching system 400 corresponding to the above-described embodiment. As shown in fig. 4, the system 400 includes a camera module 410, a section dividing module 420, a motion control module 430, a calculation module 440, an adjustment module 450, an image analysis module 460, and a positioning calibration module 470. The functional modules are described in detail below.
The camera module 410 is configured to capture a region to be scanned, where the region to be scanned includes a target position to be located.
The interval dividing module 420 is configured to determine the interval to be scanned according to the feature information of the target position to be positioned.
And the motion control module 430 is configured to drive a workpiece to perform the working table, where a center of the workpiece is located in the interval to be scanned.
And the calculating module 440 is configured to calculate, according to the feature information of the workpiece and the feature information of the target position to be positioned, offset data between the workpiece and the target position to be positioned, where the offset data includes a displacement offset and an angle offset.
And the adjusting module 450 is used for adjusting the gesture of the workpiece according to the offset data.
The motion control module 430 is further configured to move the workpiece after the posture adjustment to an initial position.
The image analysis module 460 is configured to analyze and process the image through an image processing algorithm, and determine whether the positioning requirement is met.
The motion control module 430 is further configured to control the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position when the positioning requirement is not satisfied.
And the positioning calibration module 470 is configured to record offset data at the current moment when the positioning requirement is met, and complete positioning calibration.
For specific limitations on the machine vision traversal-based positioning calibration teaching system, reference may be made to the above description of the machine vision traversal-based positioning calibration teaching method, which is not repeated here. The above-described positioning calibration teaching system based on machine vision traversal may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
The present application also provides another embodiment, namely, a computer-readable storage medium storing an interface display program executable by at least one processor to cause the at least one processor to perform the steps of the method as described above.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (9)

1. A positioning calibration teaching method based on machine vision traversal, the method comprising:
adjusting a camera field of view so that the camera field of view fully covers a work surface, the work surface including a target location to be positioned;
Determining a section to be scanned according to the characteristic information of the target position to be positioned, wherein the center of the section to be scanned is the center of the target position to be positioned;
Driving a workpiece to enter the workbench surface through a motion control system, wherein the center of the workpiece is positioned in the interval to be scanned, and obtaining offset data between the workpiece and the target position to be positioned according to the characteristic information of the workpiece and the characteristic information of the target position to be positioned, wherein the offset data comprises displacement offset and angle offset;
According to the offset data, adjusting the gesture of the workpiece and moving the workpiece to an initial position through the motion control system;
Shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether positioning requirements are met or not according to the shooting image;
If the positioning requirement is not met, controlling the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position by utilizing the motion control system;
when the positioning requirement is met, the offset data of the current moment is recorded, and positioning calibration is completed.
2. The method of claim 1, wherein if the positioning requirement is not met, controlling, with the motion control system, the workpiece to perform a displacement traversal and an angular traversal within the interval to be scanned, starting from the initial position, comprises:
Controlling the workpiece to move by one scanning step length by utilizing the motion control system, wherein the scanning step length comprises the displacement offset of each movement of the workpiece;
shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to a first threshold value according to the shooting image;
If yes, recording the displacement offset of the workpiece movement, otherwise, controlling the workpiece to continue to move by one scanning step length by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging the relation between the distance between the center of the workpiece and the center of the target position to be positioned and the first threshold value according to the shooting image until the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to the first threshold value, and recording the displacement offset of the workpiece movement at the current moment;
Controlling the workpiece to deflect by a scanning angle by using the motion control system, wherein the scanning angle comprises the angular offset of each rotation of the workpiece;
Shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the angle difference value between the workpiece and the position of the target to be positioned is smaller than or equal to a second threshold value according to the shooting image;
If so, recording the angle offset of the workpiece rotation, otherwise, controlling the workpiece to continue to rotate by a scanning angle by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging whether the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value according to the shooting image until the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value, and recording the angle offset of the workpiece rotation at the current moment.
3. The method of claim 1, wherein if the positioning requirement is not met, controlling, with the motion control system, the workpiece to perform a displacement traversal and an angular traversal within the interval to be scanned, starting from the initial position, comprises:
Controlling the workpiece to deflect by a scanning angle by using the motion control system, wherein the scanning angle comprises the angular offset of each rotation of the workpiece;
Shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the angle difference value between the workpiece and the position of the target to be positioned is smaller than or equal to a second threshold value according to the shooting image;
If so, recording the angle offset of the workpiece rotation, otherwise, controlling the workpiece to continue to rotate by a scanning angle by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging whether the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value according to the shooting image until the angle difference between the workpiece and the target position to be positioned is smaller than or equal to the second threshold value, and recording the angle offset of the workpiece rotation at the current moment;
Controlling the workpiece to move by one scanning step length by utilizing the motion control system, wherein the scanning step length comprises the displacement offset of each movement of the workpiece;
shooting the interval to be scanned by using the camera to obtain a shooting image, and judging whether the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to a first threshold value according to the shooting image;
if yes, recording the displacement offset of the workpiece movement, otherwise, controlling the workpiece to continue to move by one scanning step length by using the motion control system, shooting the section to be scanned by using the camera to obtain a shooting image, judging the relation between the distance between the center of the workpiece and the center of the target position to be positioned and the first threshold value according to the shooting image until the distance between the center of the workpiece and the center of the target position to be positioned is smaller than or equal to the first threshold value, and recording the displacement offset of the workpiece movement at the current moment.
4. A method as claimed in claim 2 or 3, wherein the scanning step is greater than a minimum step of the motion control system and greater than a minimum resolution of the camera; the scan angle is greater than a minimum yaw angle of the motion control system and greater than a minimum resolution angle of the camera.
5. The method according to any one of claims 1-4, wherein determining the interval to be scanned based on the characteristic information of the target location to be located comprises:
determining the center of the target position to be positioned;
and taking the center of the target position to be positioned as the center of a region to be scanned, establishing a rectangular region enveloping the characteristics of the target position to be positioned, and determining the rectangular region as the region to be scanned.
6. The method of any one of claims 1-5, wherein the method further comprises:
And calibrating a mapping relation between an image shot by the camera and the motion control system according to the position relation between the camera and the motion control system, wherein the mapping relation comprises a conversion matrix from pixel coordinates to geographic coordinates, and the calibration method comprises a nine-point calibration method.
7. A machine vision traversal-based positioning calibration teaching system, the system comprising:
the camera module is used for shooting a section to be scanned, and the section to be scanned comprises a target position to be positioned;
the interval dividing module is used for determining the interval to be scanned according to the characteristic information of the target position to be positioned;
the motion control module is used for driving a workpiece to carry out the workbench surface, wherein the center of the workpiece is positioned in the interval to be scanned;
The calculation module is used for calculating offset data between the workpiece and the target position with positioning according to the characteristic information of the workpiece and the characteristic information of the target position to be positioned, wherein the offset data comprises a displacement offset and an angle offset;
The adjusting module is used for adjusting the gesture of the workpiece according to the offset data;
The motion control module is also used for moving the workpiece subjected to gesture adjustment to an initial position;
the image analysis module is used for analyzing and processing the image through an image processing algorithm and judging whether the positioning requirement is met or not;
The motion control module is further used for controlling the workpiece to perform displacement traversal and angle traversal in the interval to be scanned from the initial position when the positioning requirement is not met;
And the positioning calibration module is used for recording the offset data of the current moment when the positioning requirement is met, and completing positioning calibration.
8. The system of claim 7, wherein the interval dividing module is specifically configured to:
determining the center of the target position to be positioned;
and taking the center of the target position to be positioned as the center of a region to be scanned, establishing a rectangular region enveloping the characteristics of the target position to be positioned, and determining the rectangular region as the region to be scanned.
9. The system of claim 7 or 8, further comprising a calibration module,
The calibration module is used for calibrating the mapping relation between the image shot by the shooting module and the motion control system according to the position relation between the camera and the motion control system, wherein the mapping relation comprises a conversion matrix from pixel coordinates to geographic coordinates, and the calibration method comprises a nine-point calibration method.
CN202410410034.1A 2024-04-07 2024-04-07 Positioning calibration teaching method and system based on machine vision traversal Pending CN118397105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410410034.1A CN118397105A (en) 2024-04-07 2024-04-07 Positioning calibration teaching method and system based on machine vision traversal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410410034.1A CN118397105A (en) 2024-04-07 2024-04-07 Positioning calibration teaching method and system based on machine vision traversal

Publications (1)

Publication Number Publication Date
CN118397105A true CN118397105A (en) 2024-07-26

Family

ID=91988196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410410034.1A Pending CN118397105A (en) 2024-04-07 2024-04-07 Positioning calibration teaching method and system based on machine vision traversal

Country Status (1)

Country Link
CN (1) CN118397105A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118655867A (en) * 2024-08-15 2024-09-17 成川科技(苏州)有限公司 Automatic crown block teaching system and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104729406A (en) * 2015-03-23 2015-06-24 上海瑞伯德智能系统科技有限公司 Machine vision positioning method for element surface mounting
US20190096054A1 (en) * 2017-05-15 2019-03-28 HKC Corporation Limited Image acquiring device and method of correcting coordinates thereof
EP3834997A1 (en) * 2019-12-11 2021-06-16 Carl Zeiss Industrielle Messtechnik GmbH Method and device for calibrating a machine vision device for position determination
CN115494652A (en) * 2022-09-22 2022-12-20 广纳四维(广东)光电科技有限公司 Method, device and equipment for assembling head display equipment and storage medium
CN116634134A (en) * 2023-05-19 2023-08-22 中科慧远视觉技术(洛阳)有限公司 Imaging system calibration method and device, storage medium and electronic equipment
CN117437393A (en) * 2023-09-26 2024-01-23 苏州威达智科技股份有限公司 Active alignment algorithm for micro LED chip

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104729406A (en) * 2015-03-23 2015-06-24 上海瑞伯德智能系统科技有限公司 Machine vision positioning method for element surface mounting
US20190096054A1 (en) * 2017-05-15 2019-03-28 HKC Corporation Limited Image acquiring device and method of correcting coordinates thereof
EP3834997A1 (en) * 2019-12-11 2021-06-16 Carl Zeiss Industrielle Messtechnik GmbH Method and device for calibrating a machine vision device for position determination
CN115494652A (en) * 2022-09-22 2022-12-20 广纳四维(广东)光电科技有限公司 Method, device and equipment for assembling head display equipment and storage medium
CN116634134A (en) * 2023-05-19 2023-08-22 中科慧远视觉技术(洛阳)有限公司 Imaging system calibration method and device, storage medium and electronic equipment
CN117437393A (en) * 2023-09-26 2024-01-23 苏州威达智科技股份有限公司 Active alignment algorithm for micro LED chip

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118655867A (en) * 2024-08-15 2024-09-17 成川科技(苏州)有限公司 Automatic crown block teaching system and method

Similar Documents

Publication Publication Date Title
US7161321B2 (en) Measuring system
CN118397105A (en) Positioning calibration teaching method and system based on machine vision traversal
US20080004750A1 (en) Measuring system and calibration method
CN108581869B (en) Camera module alignment method
CN110083157B (en) Obstacle avoidance method and device
EP3988254A1 (en) Robot hand-eye calibration method and apparatus, computing device, medium and product
CN110722558B (en) Origin correction method and device for robot, controller and storage medium
WO2020063058A1 (en) Calibration method for multi-degree-of-freedom movable vision system
CN111263142A (en) Method, device, equipment and medium for testing optical anti-shake of camera module
CN113643384B (en) Coordinate system calibration method, automatic assembly method and device
US10569418B2 (en) Robot controller for executing calibration, measurement system and calibration method
CN113334380A (en) Robot vision calibration method, control system and device based on binocular vision
CN108627178B (en) Robot eye calibration method and system
CN115187612A (en) Plane area measuring method, device and system based on machine vision
CN114998446A (en) Calibration method between camera and manipulator, controller, device and storage medium
CN110961778B (en) Method for automatically identifying welding area of welding workpiece, computer device and computer-readable storage medium
CN215701709U (en) Configurable hand-eye calibration device
CN115401688A (en) Control method and device of mechanical arm, mechanical arm system and storage medium
CN113763400A (en) Robot vision guiding method, device, equipment and storage medium
CN110060330B (en) Three-dimensional modeling method and device based on point cloud image and robot
CN113808212A (en) Line scanning image synchronization calibration method and system
CN112184819A (en) Robot guiding method and device, computer equipment and storage medium
CN111716340A (en) Correcting device and method for coordinate system of 3D camera and mechanical arm
CN110363127A (en) Robot identifies the method with positioning to workpiece key point
CN117953083B (en) Robot vision guiding method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination