WO2023061110A1 - 坐标系标定方法、自动组装方法及装置 - Google Patents

坐标系标定方法、自动组装方法及装置 Download PDF

Info

Publication number
WO2023061110A1
WO2023061110A1 PCT/CN2022/117560 CN2022117560W WO2023061110A1 WO 2023061110 A1 WO2023061110 A1 WO 2023061110A1 CN 2022117560 W CN2022117560 W CN 2022117560W WO 2023061110 A1 WO2023061110 A1 WO 2023061110A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile phone
value
calibration
target
height
Prior art date
Application number
PCT/CN2022/117560
Other languages
English (en)
French (fr)
Inventor
任超
余江闯
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to EP22879654.6A priority Critical patent/EP4220558A4/en
Priority to US18/036,820 priority patent/US20240017416A1/en
Publication of WO2023061110A1 publication Critical patent/WO2023061110A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • 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
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • B25J9/1692Calibration of manipulator
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23PMETAL-WORKING NOT OTHERWISE PROVIDED FOR; COMBINED OPERATIONS; UNIVERSAL MACHINE TOOLS
    • B23P19/00Machines for simply fitting together or separating metal parts or objects, or metal and non-metal parts, whether or not involving some deformation; Tools or devices therefor so far as not provided for in other classes
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23PMETAL-WORKING NOT OTHERWISE PROVIDED FOR; COMBINED OPERATIONS; UNIVERSAL MACHINE TOOLS
    • B23P19/00Machines for simply fitting together or separating metal parts or objects, or metal and non-metal parts, whether or not involving some deformation; Tools or devices therefor so far as not provided for in other classes
    • B23P19/001Article feeders for assembling machines
    • B23P19/007Picking-up and placing mechanisms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J19/00Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
    • B25J19/02Sensing devices
    • B25J19/021Optical sensing devices
    • B25J19/023Optical sensing devices including video camera means
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • B25J9/1687Assembly, peg and hole, palletising, straight line, weaving pattern movement
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1694Programme controls characterised by use of sensors other than normal servo-feedback from position, speed or acceleration sensors, perception control, multi-sensor controlled systems, sensor fusion
    • B25J9/1697Vision controlled systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Definitions

  • the present application relates to the technical field of machine vision systems, in particular to a coordinate system calibration method, an automatic assembly method and a device.
  • the machine vision system uses machines instead of human eyes to make measurements and judgments, converts the captured target into an image signal through an image capture device (such as a camera), and further processes the image signal to obtain certain characteristics of the target, and then controls the scene based on the characteristics. Device action.
  • an image capture device such as a camera
  • a typical application scenario of a machine vision system is to automatically assemble one component to another through automatic assembly equipment.
  • the machine vision system is equivalent to the eyes of the automatic assembly equipment.
  • the position coordinates of the target object are obtained through the machine vision system, and the position of the operating mechanism is controlled based on the position coordinates.
  • the position coordinates obtained by the machine vision system are obtained based on the visual coordinate system (or called the image coordinate system), while the operating mechanism moves and grabs objects based on the mechanical motion coordinate system. Therefore, it is necessary to convert the visual coordinate system into a mechanical motion coordinate system .
  • the coordinate system conversion process needs to calibrate the positional relationship between the visual coordinate system and the mechanical motion coordinate system. This calibration process is also called robot hand-eye calibration.
  • this application provides a coordinate system calibration method, an automatic assembly method and a device to at least solve some of the above problems.
  • the disclosed technical solutions are as follows:
  • the present application provides a method for calibrating a coordinate system, which is applied to automatic assembly equipment.
  • the method includes: obtaining the first measured value corresponding to the measured parameter of the target object at the first calibration height, The second measurement value corresponding to the measured parameter of the target object at the height; the actual value corresponding to the measured parameter of the target object is obtained, based on the first measurement value, the second measurement value, the first calibration height and the second measurement value corresponding to the measured parameter Calibrate the height, obtain the target calibration height that matches the actual value of the measured parameter; obtain the mapping relationship between the visual coordinate system corresponding to the target calibration height and the mechanical motion coordinate system.
  • This implementation method obtains the measured values of the measured parameters corresponding to the target object at two different calibration heights, and obtains the target calibration height that makes the measured value of the measured parameter equal to the actual value. Further, it only needs to obtain the target calibration height corresponding to From the mapping relationship between the visual coordinate system and the mechanical motion coordinate system, it can be seen that this scheme is suitable for both plane objects and curved surface objects, expanding the scope of application.
  • a value matching the actual value of the measured parameter is obtained.
  • the target calibration height includes: calculating the first measurement difference between the first measured value and the second measurement value of the measured parameter, and calculating the first height difference between the first calibration height and the second calibration height; calculating the first measurement difference The ratio of the value to the first height difference; based on the algebraic formula that the ratios corresponding to the two calibration heights are equal, the target calibration height matching the actual value of the measured parameter is calculated.
  • This implementation is based on two different calibration heights and the measured values of the measured parameters measured at these two calibration heights, and calculates the target height that matches the actual value of the measured parameter. This solution does not require multiple adjustments
  • the calibration height seeks the target calibration height that makes the measured value equal to the actual value, thus reducing the complexity of the calibration process and improving the calibration efficiency.
  • Target calibration altitude including:
  • z3 is the target calibration height
  • z2 is the second calibration height
  • z1 is the first calibration height
  • L3 is the actual value of the measured parameter
  • L2 is the second measured value of the measured parameter
  • L1 is the first value of the measured parameter Measurements.
  • obtaining the mapping relationship between the visual coordinate system corresponding to the target calibration height and the mechanical motion coordinate system includes: obtaining the visual coordinates where the marking point in the calibration plate is at the target calibration height Position; Obtain the mechanical coordinate position corresponding to the marked point; determine the mapping relationship between the visual coordinate system corresponding to the target calibration height and the mechanical motion coordinate system based on the visual coordinate position and the mechanical coordinate position corresponding to the marked point.
  • acquiring the first measured value corresponding to the measured parameter of the target object at the first calibration height includes: acquiring the measured parameter corresponding to the target object at the first calibration height in the visual The visual measurement value in the coordinate system; based on the first mapping relationship between the visual coordinate system corresponding to the first calibration height and the mechanical motion coordinate system, the visual measurement value is converted into the measurement value corresponding to the mechanical motion coordinate system to obtain the first measurement value.
  • the target object is a curved screen of a mobile phone
  • the measured parameters include the length of a short side of the curved screen of the mobile phone.
  • the measured parameter also includes the length of the long side of the curved screen of the mobile phone.
  • the target object is the middle frame of the mobile phone
  • the measured parameters include the relative distances of the marking points on the middle frame of the mobile phone.
  • the present application also provides an automatic assembly method for assembling the screen of the mobile phone and the middle frame of the mobile phone.
  • the method includes: placing the screen of the mobile phone at the target calibration height of the short side, and based on the coordinate system corresponding to the target calibration height of the short side
  • the mapping relationship obtains the length value of the short side of the mobile phone screen; place the mobile phone screen at the target calibration height of the long side, and obtain the long side length value of the mobile phone screen based on the coordinate system mapping relationship corresponding to the target calibration height of the long side; place the middle frame of the mobile phone at At the target calibration height of the middle frame, the long side length value and short side length value of the middle frame of the mobile phone are obtained based on the coordinate system mapping relationship corresponding to the target calibration height of the middle frame; based on the long side length value and short side length value of the mobile phone screen, and the mobile phone
  • the length value of the long side and the short side of the middle frame determine the target assembly gap value; adjust the relative position of the mobile phone screen and the middle frame
  • the automatic assembly method provided by this implementation method uses the calibration results of the mobile phone screen and the mobile phone middle frame to measure the length of the long side and the short side of the mobile phone screen and the mobile phone middle frame, and further calculates the target assembly gap between the mobile phone screen and the mobile phone middle frame Finally, the four gaps between the mobile phone screen and the middle frame of the mobile phone are evenly distributed, and the error of the assembly gap is reduced.
  • the target assembly gap value is determined based on the length of the long side and the length of the short side of the screen of the mobile phone, and the length of the long side and the length of the short side of the middle frame of the mobile phone, including: Calculate the difference between the length of the long side of the mobile phone screen and the length of the long side of the middle frame of the mobile phone to obtain the long side difference; calculate the difference between the length of the short side of the mobile phone screen and the length of the short side of the middle frame of the mobile phone to obtain the short Side difference: calculate the four-average value of the long side difference and the short side difference to obtain the target assembly gap value.
  • This implementation method can obtain the length of the long side and the short side of the mobile phone screen, and the accurate values of the lengths of the long side and the short side of the middle frame of the mobile phone.
  • the uniform gap between them that is, the target assembly gap value, improves the accuracy of the target assembly gap value.
  • the present application also provides an automatic assembly device, which includes: a clamping mechanism, one or more cameras, one or more processors, and a memory, wherein the memory is used to store program codes; the clamping The mechanism is used to clamp the target object, and the target object is placed at the preset calibration height in response to the first motion control command, and the first motion control command is generated by the processor; the camera responds to the first shooting command, and obtains the target object at the preset calibration height Corresponding to the image, the first shooting instruction is generated by the processor; the processor is used to run the program code to perform the following steps:
  • the processor performs an operation based on the first measured value, the second measured value, the first calibration height, and the second calibration height corresponding to the measured parameter to obtain a value corresponding to the actual value of the measured parameter.
  • the matching target calibration height is specifically used to: calculate the first measurement difference between the first measurement value and the second measurement value of the measured parameter, and calculate the first height difference between the first calibration height and the second calibration height; The ratio of the first measurement difference to the first height difference; based on the algebraic formula that the ratios corresponding to the two sets of calibration heights are equal, the target calibration height matching the actual value of the measured parameter is calculated.
  • the processor performs an operation based on the first measured value, the second measured value, the first calibration height, and the second calibration height corresponding to the measured parameter to obtain the actual value of the measured parameter Matching target calibration altitude, specifically for:
  • z3 is the target calibration height
  • z2 is the second calibration height
  • z1 is the first calibration height
  • L3 is the actual value of the measured parameter
  • L2 is the second measured value of the measured parameter
  • L1 is the first value of the measured parameter Measurements.
  • obtaining the mapping relationship between the visual coordinate system corresponding to the target calibration height and the mechanical motion coordinate system includes: obtaining the visual coordinates where the marking point in the calibration plate is at the target calibration height Position; Obtain the mechanical coordinate position corresponding to the marked point; determine the mapping relationship between the visual coordinate system corresponding to the target calibration height and the mechanical motion coordinate system based on the visual coordinate position and the mechanical coordinate position corresponding to the marked point.
  • acquiring the first measured value corresponding to the measured parameter of the target object at the first calibration height includes: acquiring the measured parameter corresponding to the target object at the first calibration height in the visual The visual measurement value in the coordinate system; based on the first mapping relationship between the visual coordinate system corresponding to the first calibration height and the mechanical motion coordinate system, the visual measurement value is converted into the measurement value corresponding to the mechanical motion coordinate system to obtain the first measurement value.
  • the target object is the curved screen of the mobile phone, and the measured parameters include the length of the short side and the long side of the curved screen of the mobile phone; or, the target object is the middle frame of the mobile phone, and the measured parameters include The relative distance between the marked points on the middle frame.
  • the clamping mechanism includes an operating mechanism and a supporting platform; the operating mechanism responds to the second motion control command and places the screen of the mobile phone at the target calibration height of the short side corresponding to the length of the short side, and the length of the long side.
  • the camera is placed at the target calibration height of the middle frame; the camera responds to the third shooting instruction, and obtains the image corresponding to the middle frame of the mobile phone at the target calibration height of the middle frame;
  • the processor runs the program code stored in the memory, and also performs the following steps:
  • the short side length value of the mobile phone screen is obtained; based on the image corresponding to the target calibration height on the long side of the mobile phone screen, and the long Based on the coordinate system mapping relationship corresponding to the calibration height of the side target, the long side length value of the mobile phone screen is obtained; based on the image corresponding to the target calibration height of the middle frame of the mobile phone, and the coordinate system mapping relationship corresponding to the target calibration height of the middle frame, the center of the mobile phone is obtained.
  • the long side length value and short side length value of the frame based on the long side length value and short side length value of the mobile phone screen, and the long side length value and short side length value of the frame in the mobile phone, determine the target assembly gap value; control the operating mechanism Adjust the position of the mobile phone screen so that the actual gap value between the mobile phone screen and the middle frame of the mobile phone matches the target assembly gap value.
  • the target assembly gap value is determined based on the length of the long side and the length of the short side of the screen of the mobile phone, and the length of the long side and the length of the short side of the middle frame of the mobile phone, including: Calculate the difference between the length of the long side of the mobile phone screen and the length of the long side of the middle frame of the mobile phone to obtain the long side difference; calculate the difference between the length of the short side of the mobile phone screen and the length of the short side of the middle frame of the mobile phone to obtain the short Side difference: calculate the four-average value of the long side difference and the short side difference to obtain the target assembly gap value.
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, and when the above-mentioned instructions are run on the automatic assembly equipment, the equipment performs the first aspect or the first aspect.
  • the present application also provides another computer-readable storage medium, the computer-readable storage medium includes instructions, and when the above-mentioned instructions are run on the automatic assembly equipment, the equipment will perform the second aspect or the second The automatic assembly method described in any possible implementation manner of the aspect.
  • the present application provides a computer program product containing instructions.
  • the computer program product is run on an automatic assembly device, the device is made to perform the steps described in the first aspect or any possible implementation of the first aspect.
  • the present application provides a computer program product containing instructions.
  • the computer program product is run on an automatic assembly device, the device is made to perform the tasks described in the second aspect or any possible implementation manner of the second aspect.
  • Fig. 1 is a schematic diagram of images obtained by an object provided in an embodiment of the present application at different z-direction heights;
  • Fig. 2 is a schematic diagram of the structure and principle of an automatic assembly device provided in the embodiment of the present application;
  • Fig. 3 is a schematic diagram of the relative positions of the mobile phone screen and the middle frame of the mobile phone provided by the embodiment of the present application before assembly;
  • Fig. 4 is a schematic diagram of a matching edge of a mobile phone screen provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of the relative positions of the screen of a mobile phone and the matching sides of the middle frame of the mobile phone provided by the embodiment of the present application;
  • Fig. 6 is a schematic diagram of an assembled mobile phone screen and a mobile phone middle frame provided by an embodiment of the present application
  • Fig. 7 is a flow chart of a coordinate system calibration method provided by the embodiment of the present application.
  • Fig. 8 is a schematic diagram of a calibration plate provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the size measurement of the mobile phone screen in the visual coordinate system provided by the embodiment of the present application.
  • Fig. 10 is a schematic diagram of the dimension measurements obtained at different z-direction heights for the same object provided by the embodiment of the present application;
  • Fig. 11 is a schematic diagram of mark points on the calibration surface of the middle frame of the mobile phone provided by the embodiment of the present application.
  • Fig. 12 is a flowchart of a process of determining the target assembly gap provided by the embodiment of the present application.
  • Fig. 13 is a schematic diagram of the distance from the mark point on the calibration surface of the middle frame of the mobile phone to the frame provided by the embodiment of the present application;
  • Fig. 14 is a schematic diagram of the gap between the mobile phone screen and the middle frame of the mobile phone provided by the embodiment of the present application;
  • Fig. 15 is a possible schematic diagram of the coordinate system calibration device provided by the embodiment of the present application.
  • Fig. 16 is a possible schematic diagram of the automatic assembly device provided by the embodiment of the present application.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • Coordinate system calibration is the calibration of the conversion relationship between the visual coordinate system and the mechanical motion coordinate system. Through coordinate system calibration, the robot can convert the obtained visual information to complete subsequent control work, such as visual grasping.
  • the calibration height refers to the height in the z-axis direction in the visual coordinate system.
  • the calibration board is used to replace the actual object, such as the mobile phone screen, the middle frame of the mobile phone, and the position coordinates of the marking point in the calibration board image and the position of the marking point in the mechanical motion coordinate system are determined
  • the mapping relationship between coordinates that is, the mapping relationship between the visual coordinate system and the mechanical motion coordinate system.
  • the calibration surface selects the plane where the micro-slit is located, that is, the plane with the largest area of the mobile phone screen, because the position where the mobile phone screen and the earpiece cooperate uses a micro-slit design, that is, the size of the earpiece needs to be carefully controlled.
  • the curved screen has a certain radian in its width direction, that is, the calibration surface and the long frame of the mobile phone screen are not on the same plane, that is, the calibration surface of the mobile phone screen and the long frame of the mobile phone screen are located at different heights in the z direction.
  • the z-direction height is the height in the z-axis direction in the visual coordinate system, and usually refers to the vertical distance between the camera and the calibration surface of the target object, that is, the farther the calibration surface of the target object is from the camera, the greater the z-direction height, and vice versa , the closer the calibration surface of the target object is to the camera, the smaller the z-direction height.
  • the distance between the camera and the calibration surface is different, and the image size of the calibration surface obtained by shooting is different.
  • the image A2 is obtained, and z1 ⁇ z2.
  • the size of the shooting range corresponding to the height of z1 is smaller than the size of the shooting range corresponding to the height of z2.
  • the size here refers to the length measurement unit, such as mm, cm, etc., but the total number of pixels of images A1 and A2 is the same, therefore, z1
  • the number of pixels per unit area in the shooting range corresponding to the height is greater than the number of pixels per unit area in the shooting range corresponding to the z2 height, that is, the smaller the z-direction height of the same object, the more pixels are corresponding.
  • the z-height position z1 of the flat part is smaller than the z-height position z2 of the curved part, that is, the curved part is farther away from the camera, but the actual z-height of the curved part is greater than the z of the flat part Therefore, the number of pixels contained in the surface part obtained at the z2 height is smaller than the number of pixels obtained when the surface part is actually located at the z1 height, that is, the number of pixels contained in the curved surface part is too small.
  • the measured value of the width of the curved screen is calculated by taking the image of the entire curved screen when the plane part (ie, the calibration surface) is at the calibration height, and the corresponding visual-mechanical transformation relationship of the calibration height, but in this case, the image The number of pixels in the curved portion is underestimated, so the measured width of a curved screen is smaller than the actual width.
  • it is necessary to repeat the calibration many times to find the corresponding calibration height when the measured width value and the actual width value are consistent that is, to adjust the calibration height of the curved screen multiple times, and Obtain the width measurement value corresponding to each calibration height until the width measurement value is consistent with the actual width value, and stop repeating the calibration process. This method requires multiple repeated calibrations, and the calibration process is cumbersome and inefficient.
  • the present application provides a coordinate system calibration method, on the premise that the actual value L3 of the measured parameter of the target object can be obtained, the measurement of the measured parameter when the target object is at two different calibration heights is obtained For example, when the target object is at the first calibrated height z1, its length measurement value is obtained, denoted as L1, and when the target object is at the second calibrated height z2, its length measurement value is obtained, denoted as L2.
  • L1 its length measurement value
  • L2 and L3 calculate the target calibration height z3 corresponding to the actual value of the length based on the relationship of trigonometric functions.
  • the calibration board is placed at the position of the target calibration height z3 for calibration, and the mapping relationship between the visual coordinate system corresponding to the target calibration height and the mechanical motion coordinate system is obtained.
  • the scheme is based on the measured values of the measured parameters of the target object measured at two different calibration heights, and then based on the measured values of the two different calibration heights and the corresponding measured parameters, the calculated value matches the actual value of the measured parameters target calibration height. Only one calibration at the target calibration height is required to obtain an accurate mapping relationship between the visual coordinate system and the mechanical motion coordinate system, and the measured values corresponding to the measured parameters of the target object obtained at the target calibration height are consistent with their actual values , which improves the accuracy of the coordinate system calibration results. Regardless of whether the target object is a plane object or a curved surface object, the coordinate system calibration result consistent with the actual value of the measured parameter of the target object can be obtained by using the scheme, which expands the scope of application of the scheme.
  • FIG. 2 shows a schematic diagram of the structure and principle of an automatic assembly device provided by the embodiment of the present application.
  • the automatic assembly device includes an operating mechanism 11, one or more cameras 12, and a visual processor 13 , motion mechanism controller 14, support platform 15.
  • the structure of the automatic assembly equipment shown in this embodiment does not constitute a specific limitation on the equipment.
  • the automated assembly equipment may include more or fewer components than shown, or combine certain components, or separate certain components, or a different arrangement of components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the operating mechanism 11 (or called a manipulator) is used to grab and move the parts to be assembled, such as the mobile phone screen, the middle frame of the mobile phone, and the like.
  • the support platform 15 is used to support another part to be assembled.
  • the support platform 15 is provided with a positioning base for fixing parts to be assembled, and the support platform 15 can translate and move up and down, so that the positioning base can move horizontally and vertically. Further, it is fixed on The parts on the positioning base move with the positioning base.
  • part B can be fixed on the support platform 15, and part A can be clamped by operating mechanism 11, and part A can be assembled to part A by moving operating mechanism 11 and/or support platform 15 on part B.
  • the camera 12 (or called a camera) is used to take images of the parts to be assembled and obtain the position of the assembly to be assembled.
  • the image sensor is an important part of the camera. According to the different types of components that make up the image sensor, the image sensor can be divided into two categories: Charge Coupled Device (CCD) and Metal Oxide Semiconductor (Complementary Metal Oxide Semiconductor, CMOS). .
  • CCD Charge Coupled Device
  • CMOS Complementary Metal Oxide Semiconductor
  • a camera composed of CCD elements is called a CCD camera
  • a camera composed of CMOS elements is called a CMOS camera.
  • the camera 12 may be any one of a CCD camera and a CMOS camera.
  • Both the camera 12 and the motion mechanism controller 14 are connected to the vision processor 13 through a communication bus.
  • the camera 12 can receive the shooting instruction sent by the visual processor 13 (ie, the first shooting instruction); at the same time, the camera 12 can send the captured image to the visual processor 13, so that the visual processor 13 can perform further operations based on the image.
  • the shooting instruction sent by the visual processor 13 ie, the first shooting instruction
  • the camera 12 can send the captured image to the visual processor 13, so that the visual processor 13 can perform further operations based on the image.
  • the visual processor 13 can obtain the position coordinates of the target object according to the image captured by the camera 12, and further generate a motion control command (that is, the first motion control command) for controlling the operating mechanism 11 or the support platform 15 according to the position coordinates and send it to the motion mechanism
  • the motion mechanism controller 14 controls the actions of the operating mechanism 11 or the supporting platform 15 based on the motion control instructions, for example, controlling the operating mechanism 11 to grasp and move objects, or controlling the supporting platform 15 to translate or lift.
  • the position coordinates obtained by the camera 12 are based on the visual coordinate system, that is, the xyz coordinate system in FIG. 2 .
  • the kinematic mechanism (operating mechanism and support platform) is based on the mechanical motion coordinate system, that is, the XYZ coordinate system in FIG. 2 .
  • the origin, positive direction and unit length of the two coordinate systems are different, therefore, it is necessary to calibrate the positional relationship between the visual coordinate system and the mechanical motion coordinate system.
  • the calibration process can be implemented by the vision processor 13 executing a corresponding calibration program.
  • the vision processor 13 may include one or more processing units, for example, the vision processor 13 may include a calibration processor, a motion control processor, and the like.
  • the calibration processor is mainly used to run the calibration program to realize the mapping from the visual coordinate system to the mechanical motion coordinates.
  • the motion control processor is mainly used to control the operation of various motion mechanisms, such as the operating mechanism 11, the supporting platform 15, and the like.
  • the functions of the vision processor 13 and the motion mechanism controller 14 may be integrated into the same processor, which is not limited in the present application.
  • the middle frame 21 of the mobile phone is fixed on the positioning base 151 , the screen 22 of the mobile phone is grasped by the operating mechanism, and moved to the top of the middle frame 21 of the mobile phone.
  • the four-side alignment here means that the error between the matching side of the screen of the mobile phone and the matching side of the corresponding position of the middle frame of the mobile phone is within a preset range.
  • the matching sides of the middle frame 21 of the mobile phone and the screen 22 of the mobile phone adopt the sides of the relative positions in the four corners.
  • the mobile phone screen 22 includes four corners A, B, C and D, and two The sides are A1, A2; B1, B2; C1, C2; D1, D2. Then the four sets of matching sides of the mobile phone screen 22 are respectively: A1, B2; B1, A2; C1, D2; D1, C2.
  • the positions of the four matching sides of the middle frame 21 of the mobile phone correspond to the positions of the matching sides of the mobile phone screen 21 .
  • the automatic assembly process it is necessary to align a group of mating sides of the mobile phone screen 22 with matching sides of the same position of the mobile phone middle frame 21, for example, as shown in Figure 3, the A1 side of the mobile phone screen and the a1 side of the mobile phone middle frame Alignment, at the same time, the B2 side of the mobile phone screen is aligned with the same position in the mobile phone middle frame, the A2 side is aligned with the A2 side, and the B1 side of the mobile phone screen is aligned with the same position in the mobile phone middle frame; similarly, it can also be the C1 side Align with side c1, side D2 with side d2; side D1 with side d1, side C2 with side c2.
  • At least one set of matching sides can be selected for alignment, so as to realize alignment and matching between the screen of the mobile phone and the middle frame of the mobile phone.
  • the machine vision system takes pictures of the matching edges of the screen 22 of the mobile phone and the middle frame 21 of the mobile phone to confirm whether the matching edges of the screen 22 of the mobile phone and the middle frame 21 of the mobile phone are aligned and matched.
  • the mobile phone screen 22 After confirming that the mating edges of the mobile phone screen 22 and the mobile phone middle frame 21 are aligned, as shown in FIG. 6 , the mobile phone screen 22 is moved down to the assembly position and assembled with the mobile phone middle frame.
  • the machine vision system takes pictures of the mobile phone screen and the mobile phone middle frame, the two are at different heights. Therefore, it is necessary to perform plane vision calibration on the mobile phone screen and the mobile phone middle frame, that is, to calibrate the visual coordinates of the plane where the mobile phone screen is located.
  • plane vision calibration on the mobile phone screen and the mobile phone middle frame, that is, to calibrate the visual coordinates of the plane where the mobile phone screen is located.
  • this embodiment uses the short side of the mobile phone screen as an example to illustrate the coordinate system calibration method provided by this application.
  • the method may include the following steps:
  • the measurement tool can be a measurement device independent of the automatic assembly equipment.
  • the measurement device can capture the short side of the mobile phone screen and take an image when capturing the short side of the mobile phone screen. Further, calculate the short The edge distance gets the actual value of the short edge of the phone screen.
  • the first calibration height is the height in the z-axis direction in the visual coordinate system (ie, the xyz coordinate system).
  • the first calibration height may be a randomly selected height, which is not limited in the present application.
  • the calibration board When obtaining the mapping relationship between the visual coordinate system and the mechanical motion coordinate system (that is, the XYZ coordinate system), the calibration board is used to replace the actual object (such as a mobile phone screen). As shown in Fig. 8, marking points are set on the calibration plate, and the distance between two adjacent marking points is fixed.
  • the process of obtaining the mapping relationship between the visual coordinate system and the mechanical motion coordinate system corresponding to a certain calibration height is as follows:
  • image A Use the camera to take an image of the calibration plate at the first calibration height, denoted as image A, and obtain the position coordinates p2 of each identification point in the visual coordinate system in the image, and the distance between the two identification points in the image number of pixels.
  • the mapping relationship of is the first mapping relationship.
  • both p1 and p2 are sets of position coordinates of multiple identification points.
  • step b) may be executed first and then step a).
  • the process of further obtaining the corresponding short side measurement value when the mobile phone screen is at the first calibration height is as follows:
  • the measured value of the short side of the mobile phone screen can be calculated, that is, the first measured value L1 of the short side, that is, The measured value refers to the length after the distance in the visual coordinate system is mapped to the mechanical motion coordinate system.
  • the short side of the mobile phone screen is in the x-axis direction of the visual coordinate system, and the long side is in the y-axis direction.
  • B2 and C2 are respectively located on the two long sides of the mobile phone screen, and the y-axis coordinates of the two points B2 and C2 are the same, that is, the line between the two points B2 and C2 is parallel to the short side, that is, the two points B2 and C2
  • the distance between them is equal to the length of the short side. Therefore, the distance between point B2 and point C2 in the screen image of the mobile phone, or the distance between point A2 and point D2 in the image is obtained, and finally the measured value of the short side of the mobile phone screen is obtained.
  • B2 and C2 are located at one end of the long side of the mobile phone, and A2 and D2 are located at the other end of the long side of the mobile phone.
  • A2 and D2 are located at the other end of the long side of the mobile phone.
  • the short-side measurements are calculated separately. Further, comparing these two short side pixel values can determine whether the mobile phone screen is tilted. If the two short side pixel values are equal, it indicates that the mobile phone screen is not tilted; if the two short side pixel values are not equal, it indicates that the mobile phone screen is tilted. For example, the side with smaller pixel values on the short side slopes downward, and the side with larger pixel values on the short side slopes upward.
  • the height value of the second calibration altitude is different from that of the first calibration altitude.
  • the second calibration altitude may be obtained by increasing or decreasing a certain value on the basis of the first calibration altitude.
  • the acquisition process of the second mapping relationship is the same as that of the first mapping relationship, and will not be repeated here.
  • the acquisition process of the second measurement value is the same as the acquisition process of the first measurement value, and will not be repeated here.
  • the target calibration height means that when the target object is at the height, the difference between the measured value of the short side and the actual value of the short side is less than the preset threshold.
  • the preset threshold can be determined according to actual conditions, for example, according to actual assembly accuracy.
  • the size of the image captured by the camera is different, and the size of the object in the further image is also different.
  • the measurement size of the object in the mechanical motion coordinate system is used instead of the measurement size of the object in the visual coordinate system.
  • the mobile phone screen is at the first calibration height z1, and the corresponding short side measurement value is L1
  • the mobile phone screen is at the second calibration height z2, and the corresponding short side measurement value is L2.
  • the actual value of the short side of the mobile phone screen is L3, assuming that its corresponding z-direction height is z3 (that is, the target calibration height). Furthermore, it is assumed that z1 , z2 , z3 , and the magnitude relationship among L1 , L2 , and L3 are as shown in FIG. 10 .
  • the included angle of the vertex B of the triangle BEC is equal to the included angle ⁇
  • the included angle of the vertex B of the triangle BFD is equal to the included angle ⁇
  • the value of the target calibration height z3 can be calculated according to formula 1, as shown in formula 2:
  • the control operating mechanism places the calibration plate at the target calibration height, and uses the camera to capture the image of the calibration plate, and further determines the position coordinates of each marking point in the image and each marking point in the mechanical motion coordinate system The mapping relationship between, that is, the third mapping relationship.
  • the short side direction of the mobile phone stand screen is a curved surface, while the long side direction is a plane. Therefore, the mapping relationship between the target calibration height and the coordinate system obtained after calibrating the short side of the mobile phone screen is not applicable to the long side direction, that is, using the short side to correspond to There is an error between the length of the long side calculated from the target calibration height and the coordinate system mapping relationship and the actual value of the long side of the mobile phone screen. Therefore, it is still necessary to calibrate the long side after the short side is calibrated.
  • the calibration sequence of the long side and the short side is not limited, the long side can be calibrated first and then the short side can be calibrated, or the short side can be calibrated first and then the long side can be calibrated.
  • the long side calibration process of the mobile phone screen is similar to the short side calibration process. Among them, the long side calibration process of the mobile phone screen is as follows:
  • the measured value of the long side is calculated by measuring the distance between A1 and B1 (or D1 and C1 ).
  • the third calibration height z4 and the fourth calibration height z5 may be two different z-direction heights randomly selected, and the size relationship between z4 and z5 is not limited in this application.
  • z4 may be greater than z5, or It is also possible that z4 is smaller than z5.
  • the long side and the short side of the mobile phone screen are calibrated first, and then the middle frame of the mobile phone is calibrated.
  • the measurement values of the short side and the long side of the screen of the mobile phone can be obtained at the same time.
  • the mobile phone screen is at the first calibration height z1
  • the first long-side measurement value and the first short-side measurement value corresponding to the mobile phone screen are obtained; similarly, when the mobile phone screen is at the second calibration height z2, the first measurement value corresponding to the mobile phone screen is obtained Two long side measurements and a second short side measurement.
  • the above calibration method can be used to continue to calibrate the middle frame of the mobile phone, that is, to obtain The target assembly height of the middle frame of the mobile phone and the mobile phone screen.
  • the calibration surface of the middle frame of the mobile phone includes multiple mark points, as shown in Figure 11, the four through holes A, B, C, and D on the middle frame of the mobile phone can be used as mark points.
  • the actual value of the distance between each mark point of the middle frame of the mobile phone is obtained by measuring with other measuring devices independent of the automatic assembly equipment.
  • the measurement principle of the measurement device for measuring the actual value of the mark point distance is also to use the camera to capture the image of the middle frame of the mobile phone to obtain the actual value of the mark point distance.
  • the middle frame of the mobile phone is placed at the actual assembly height, and the middle frame of the mobile phone is taken at This height is the corresponding image, and then the actual value of the mark point distance is obtained.
  • the long side of the middle frame of the mobile phone is in the Y-axis direction, and the short side is in the X-axis direction.
  • the relative distance between mark points refers to the relative distance between A and B in the Y-axis direction, the relative distance between C and D in the Y-axis direction, the relative distance between A and D in the X-axis direction, and the relative distance between A and D in the X-axis direction.
  • C The relative distance between the two points in the X-axis direction.
  • the relative distance between the two mark points can be calculated by using the position coordinates of the mark points measured by the measuring device.
  • the relative distance between A and B, B and C, C and D, A and D can be selected during calibration.
  • the position coordinates of the four mark points A, B, C, and D are (Xa, Ya), (Xb, Yb), (Xc, Yc) and (Xd, Yd) in sequence.
  • the acquisition method of the second relative distance measurement value is the same as that of the first relative distance measurement value, which will not be repeated here.
  • the first relative distance measurement value, the second assembly height, the second relative distance measurement value, and the relative distance actual value calculate a target assembly height corresponding to the relative distance actual value.
  • the measured value of the relative distance of the mark point corresponding to the target assembly height of the middle frame of the mobile phone matches the actual value of the relative distance of the mark point, if the error between the two is less than the preset threshold.
  • This step can be calculated using the following formula 4 to obtain the target assembly height Z3:
  • Z1 is the first assembly height
  • H1 is the relative distance measurement value of the mark point when the middle frame of the mobile phone is at the height of Z1
  • Z2 is the second assembly height
  • H2 is the relative distance measurement of the mark point when the middle frame of the mobile phone is at the height of Z2 value
  • H is the actual value of the relative distance between the mark points of the middle frame of the mobile phone
  • Z3 is the target assembly height
  • the calibration plate is used to replace the middle frame of the mobile phone, the operating mechanism places the calibration plate at the target assembly height, and the camera is used to capture the image of the calibration plate (with marking points on the calibration plate), and further determine the position coordinates of each marking point in the visual coordinate system and the mechanical
  • the mapping relationship between each identification point in the motion coordinate system is the eighth mapping relationship.
  • the coordinate system calibration method for a target object whose surface is a curved surface, such as a mobile phone screen with a curved surface, measured values of the short sides corresponding to two different calibration heights of the mobile phone screen are respectively obtained. Based on the principle of trigonometric functions, the short-side measurement values corresponding to two different calibration heights are used to calculate the target calibration height corresponding to the actual value of the short side. It only needs to perform a calibration process of the coordinate system corresponding to the short side for the target calibration height, and the mapping relationship between the visual coordinate system corresponding to the actual value of the short side and the mechanical motion coordinate can be obtained.
  • the long side of the mobile phone screen is calibrated to obtain the target calibration height at which the measured value of the long side is equal to the actual value of the long side, and then the mapping relationship between the visual coordinate system and the mechanical motion coordinate system is obtained for the target calibration height.
  • the mark point on the middle frame of the mobile phone is calibrated to obtain the target assembly height corresponding to the actual value of the relative distance of the mark point, and further obtain the coordinate system mapping relationship corresponding to the target assembly height.
  • the scheme can obtain the target calibration height that makes the measured value of the measured parameter equal to the actual value according to the measured values of the measured parameters of any two calibration heights, and only needs to obtain the visual coordinate system corresponding to the target calibration height
  • the mapping relationship with the mechanical motion coordinate system does not need to repeatedly adjust the calibration height for the coordinate system calibration process. Therefore, using this scheme reduces the complexity of the coordinate system calibration process and improves the coordinate system calibration efficiency.
  • the measured values of the long side and the short side of the mobile phone screen and the middle frame of the mobile phone are obtained by using the coordinate system mapping relationship obtained from the calibration, and further according to the mobile phone
  • the measured values of the four sides of the screen and the middle frame of the mobile phone are calculated to obtain the target assembly gap between the screen of the mobile phone and the middle frame of the mobile phone. Based on the target assembly gap, the screen of the mobile phone and the middle frame of the mobile phone are assembled, as shown in Figure 12.
  • the automatic assembly process is as follows:
  • Place the mobile phone screen at the target calibration height corresponding to the short side take an image of the mobile phone screen, use the coordinate system mapping relationship corresponding to the target calibration height to map the length of the short side of the mobile phone screen image to the mechanical motion coordinate system, and obtain the short side length.
  • the mobile phone screen is placed at the target calibration height corresponding to the long side, and the length of the long side in the mobile phone screen image is mapped to the mechanical motion coordinate system to obtain the length of the long side.
  • the measuring device for measuring the relative distance of the mark points can also measure the dimensions between each mark point and the long and short borders of the middle frame of the mobile phone.
  • the measured size parameters of mark point A are X1 and Y1, X1 is the distance between the mark point and the nearest long border, and Y1 is the distance between mark point A and the nearest short border distance.
  • X2 and Y2 are the distances between mark point B and the nearest long-side border and short-side border respectively;
  • X3 and Y3 are respectively the distances between mark point C and the nearest long-side border and short-side border;
  • X4 and Y4 are respectively The distance between mark point C and the nearest long-side border and short-side border.
  • the long-side length value of the middle frame of the mobile phone is calculated based on the formula L+Y1+Y2.
  • the length of the long side of the middle frame of the mobile phone can also be calculated based on the relative distance between points C and D, and Y3 and Y4.
  • the length of the short side of the middle frame of the mobile phone is obtained in the same way as the length of the long side.
  • the middle frame of the mobile phone is calculated based on W+X2+X3.
  • the length of the short side of the box is calculated based on W+X2+X3.
  • the embodiment of the present application does not limit the execution order of S210-S230.
  • the gap values corresponding to the four sides of the middle frame 21 of the mobile phone and the screen 22 of the mobile phone are d1, d2, d3 and d4 respectively, and the target assembly gap obtained in this embodiment can make the four gap values equal.
  • the length of the long side of the middle frame of the mobile phone is 100, and the length of the short side of the middle frame of the mobile phone is 80.
  • the length of the long side of the mobile phone screen is 90, and the length of the short side of the mobile phone screen is 70.
  • the long-side difference is 10
  • the short-side difference is 10
  • the mobile phone screen and the mobile phone middle frame When assembling the mobile phone screen and the mobile phone middle frame, obtain the actual gap values corresponding to the four sides of the mobile phone screen and the mobile phone middle frame, and adjust the position of the mobile phone screen according to each actual gap value and the target assembly gap, and finally make the actual gap values corresponding to the four sides
  • the target assembly gap value is reached, for example, the error between the actual gap value and the target assembly gap value is smaller than a preset threshold.
  • the automatic assembly method provided in this embodiment uses the calibration results of the mobile phone screen and the mobile phone middle frame to measure the length of the long side and the short side of the mobile phone screen and the mobile phone middle frame, and further calculates the target assembly gap between the mobile phone screen and the mobile phone middle frame Finally, the four gaps between the mobile phone screen and the middle frame of the mobile phone are evenly distributed, and the error of the assembly gap is reduced.
  • the embodiment of the present application can divide the automatic assembly equipment into functional modules according to the above method example, for example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 15 shows a possible composition diagram of the coordinate system calibration device involved in the above-mentioned embodiment, and the coordinate calibration device can perform any of the method embodiments of the present application. Steps in an embodiment of a method for calibrating a coordinate system.
  • the coordinate system calibration device may be an automatic assembly device, or a system-on-a-chip that supports the automatic assembly device to implement the method provided in the above embodiment of the coordinate system calibration method.
  • the coordinate system calibration device may include:
  • the first measurement value acquisition module 110 is configured to acquire a first measurement value corresponding to the measured parameter of the target object at the first calibration height.
  • the second measurement value acquisition module 120 is configured to acquire a second measurement value corresponding to the measured parameter of the target object at a second calibration height.
  • the parameter actual value acquisition module 130 is configured to acquire the actual value corresponding to the measured parameter of the target object.
  • the target calibration height determination module 140 is configured to obtain the target calibration height corresponding to the measured parameter based on the first measurement value, the second measurement value, the first calibration height, and the second calibration height.
  • the target calibration altitude matches the actual value of the measured parameter.
  • the coordinate system mapping relationship acquisition module 150 is configured to acquire the mapping relationship between the visual coordinate system corresponding to the target calibration height and the mechanical motion coordinate system.
  • the coordinate system calibration device provided in the embodiment of the present application is used to implement the coordinate system calibration method in any of the above embodiments, so it can achieve the same technical effect as the coordinate system calibration method in the above embodiment.
  • This embodiment also provides a computer-readable storage medium.
  • the computer-readable storage medium includes instructions. When the above-mentioned instructions are run on the electronic device, the electronic device is made to execute the relevant method steps shown in FIG. 7 to realize The coordinate system calibration method in the above embodiment.
  • This embodiment also provides a computer program product containing instructions.
  • the computer program product is run on the electronic device, the electronic device is made to execute the relevant method steps in the method embodiment shown in FIG. 7, so as to realize the above implementation
  • the coordinate system calibration method in the example is described in detail below.
  • FIG 16 shows a possible schematic diagram of the automatic assembly device provided by the embodiment of the present application, which is used for assembling the mobile phone screen and the middle frame of the mobile phone.
  • the automatic assembly device may be automatic assembly equipment, or a chip system that supports the automatic assembly equipment to implement the method provided by the above-mentioned automatic assembly method embodiment.
  • the automatic assembly device can include:
  • the mobile phone screen short side acquisition module 210 is used to place the mobile phone screen at the short side target calibration height, and obtain the short side length value of the mobile phone screen based on the coordinate system mapping relationship corresponding to the short side target calibration height;
  • the long side acquisition module 220 of the mobile phone screen is configured to place the mobile phone screen at the long side target calibration height, and obtain the long side length value of the mobile phone screen based on the coordinate system mapping relationship corresponding to the long side target calibration height.
  • the middle frame parameter acquisition module 230 is used to place the middle frame of the mobile phone at the target calibration height of the middle frame, and obtain the long side length value and Short side length value;
  • the target assembly gap determination module 240 is configured to determine the target assembly gap value based on the long side length value and short side length value of the mobile phone screen, and the long side length value and short side length value of the mobile phone middle frame.
  • the position adjustment module 250 is configured to adjust the relative position of the screen of the mobile phone and the middle frame of the mobile phone, so that the actual gap value between the screen of the mobile phone and the middle frame of the mobile phone matches the target assembly gap value.
  • the calibrated height of the short-side target, the calibrated height of the long-side target, the calibrated height of the middle-frame target, and the coordinate system mapping relationship corresponding to each calibrated height are obtained by using the coordinate system calibration method of the above-mentioned embodiment.
  • the automatic assembly device provided by the embodiment of the present application is used to execute the automatic assembly method of any of the above embodiments, so the same technical effect as the automatic assembly method of the above embodiment can be achieved.
  • This embodiment also provides a computer-readable storage medium, the computer-readable storage medium includes instructions, and when the above-mentioned instructions are run on the automatic assembly equipment, the equipment is made to execute the relevant method steps shown in Figure 7 or 12, In order to realize the automatic assembly method in the above-mentioned embodiment.
  • This embodiment also provides a computer program product containing instructions.
  • the equipment is made to execute the relevant method steps in the method embodiment shown in FIG. 7 or FIG. 12 , so as to Realize the automatic assembly method in the above-mentioned embodiment.
  • the disclosed coordinate system calibration method, automatic assembly method, and device can be realized in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of this embodiment may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium
  • several instructions are included to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute all or part of the steps of the method described in each embodiment.
  • the aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media capable of storing program codes.

Landscapes

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

Abstract

本申请提供了一种坐标系标定方法、自动组装方法及装置,该坐标系标定方法分别在两个不同标定高度测得目标物体的被测参数的测量值,进而依据两个不同标定高度及相应的被测参数的测量值,得到与被测参数的实际值相匹配的目标标定高度,该方案不仅适用于平面物体还适用于曲面物体,扩大了适用范围。而且,该方案只需在该目标标定高度进行一次标定就能得到与目标物体的实际值相匹配的坐标系映射关系,无需通过多次调整标定高度来获得与被测参数的真实值相匹配的标定高度,因此,该方案提高了坐标系标定结果的准确度,进一步地,降低了坐标系标定过程的复杂度,提高了坐标系标定效率。

Description

坐标系标定方法、自动组装方法及装置
本申请要求于2021年10月12日提交中国国家知识产权局、申请号为202111185903.8、发明名称为“坐标系标定方法、自动组装方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及机器视觉系统技术领域,尤其涉及坐标系标定方法、自动组装方法及装置。
背景技术
机器视觉系统是利用机器代替人眼做测量和判断,通过图像摄取装置(如相机)将被摄取目标转换成图像信号,进一步处理该图像信号获得目标的某些特征,进而根据该特征控制现场的设备动作。
机器视觉系统的一种典型应用场景是通过自动装配设备将一个零部件自动组装到另一个零部件上。该应用场景下,机器视觉系统相当于自动装配设备的眼睛,通过机器视觉系统获得目标物体的位置坐标,并基于该位置坐标控制操作机构的位置。但是机器视觉系统获得的位置坐标基于视觉坐标系(或称为图像坐标系)得到,而操作机构是基于机械运动坐标系移动和抓取物体,因此,需要将视觉坐标系转化为机械运动坐标系。坐标系转化过程需要标定视觉坐标系与机械运动坐标系之间的位置关系,该标定过程也称为机器人手眼标定。
在上述标定过程中,如果物体实际所处的位置高度与标定高度不同,则会导致机器视觉系统获得的该物体的测量值与真实值之间存在差异。
发明内容
有鉴于此,本申请提供了坐标系标定方法、自动组装方法及装置,以至少解决以上部分问题,其公开的技术方案如下:
第一方面,本申请提供了一种坐标系标定方法,应用于自动装配设备,该方法包括:获取处于第一标定高度的目标物体的被测参数对应的第一测量值,获取处于第二标定高度的目标物体的被测参数对应的第二测量值;获取目标物体的被测参数对应的实际值,基于被测参数对应的第一测量值、第二测量值、第一标定高度和第二标定高度,获得与被测参数的实际值相匹配的目标标定高度;获取目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
该实现方式分别获取目标物体处于两个不同标定高度对应的被测参数的测量值,获得使得该被测参数的测量值与实际值相等的目标标定高度,进一步,只需获得该目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系,可见,该方案适既适用于平面物体又适用于曲面物体,扩大了适用范围。
在第一方面的一种可能的实现方式中,基于被测参数对应的第一测量值、第二测量值、第一标定高度和第二标定高度,获得与被测参数的实际值相匹配的目标标定高度,包括:计算被测参数的第一测量值与第二测量值的第一测量差值,以及计算第一标定高度与第二标定高度的第一高度差值;计算第一测量差值与第一高度差值的比值;基于两个标定高度 对应的比值相等的代数式,计算得到与被测参数的实际值相匹配的目标标定高度。
该实现方式基于两个不同的标定高度,及这两个标定高度测得的被测参数的测量值,计算与该被测参数的实际值相匹配的目标高度,该方案不需要通过多次调整标定高度寻找使测量值与实际值相等的目标标定高度,因此降低了标定过程的复杂度,提高了标定效率。
在第一方面另一种可能的实现方式中,基于被测参数对应的第一测量值、第二测量值、第一标定高度和第二标定高度,获得与被测参数的实际值相匹配的目标标定高度,包括:
依据如下公式计算得到目标标定高度:
Figure PCTCN2022117560-appb-000001
其中,z3为目标标定高度,z2为第二标定高度,z1为第一标定高度,L3为被测参数的实际值,L2为被测参数的第二测量值,L1为被测参数的第一测量值。
在第一方面又一种可能的实现方式中,获取目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系,包括:获取标定板中的标识点处于目标标定高度对应的视觉坐标位置;获取标识点对应的机械坐标位置;基于标识点对应的视觉坐标位置及机械坐标位置,确定目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
在第一方面再一种可能的实现方式中,获取处于第一标定高度的目标物体的被测参数对应的第一测量值,包括:获取目标物体处于第一标定高度对应的被测参数在视觉坐标系中的视觉测量值;基于第一标定高度对应的视觉坐标系与机械运动坐标系之间的第一映射关系,将视觉测量值转换为机械运动坐标系对应的测量值,得到第一测量值。
在第一方面另一种可能的实现方式中,目标物体为手机曲面屏幕,被测参数包括手机曲面屏幕的短边长度。
在第一方面又一种可能的实现方式中,被测参数还包括手机曲面屏幕的长边长度。
在第一方面在一种可能的实现方式中,目标物体为手机中框,被测参数包括手机中框上的标记点相对距离。
第二方面,本申请还提供了一种自动组装方法,用于组装手机屏幕与手机中框,方法包括:将手机屏幕置于短边目标标定高度处,基于短边目标标定高度对应的坐标系映射关系获得手机屏幕的短边长度值;将手机屏幕置于长边目标标定高度处,基于长边目标标定高度对应的坐标系映射关系获得手机屏幕的长边长度值;将手机中框置于中框目标标定高度处,基于中框目标标定高度对应的坐标系映射关系获得手机中框的长边长度值和短边长度值;基于手机屏幕的长边长度值和短边长度值,以及手机中框的长边长度值和短边长度值,确定目标组装缝隙值;调整手机屏幕与手机中框的相对位置,以使手机屏幕与手机中框的实际缝隙值与目标组装缝隙值相匹配;其中,短边目标标定高度、长边目标标定高度、中框目标标定高度,以及各标定高度对应的坐标系映射关系利用第一方面任一种可能的实现方式所述的坐标系标定方法获得。
该实现方式提供的自动组装方法,利用手机屏幕和手机中框的标定结果,测得手机屏幕、手机中框的长边长度、短边长度,进一步计算得到手机屏幕与手机中框的目标组装缝 隙,最终使得手机屏幕与手机中框组装后的四条缝隙分布均匀,减小了组装缝隙的误差。
在第二方面的一种可能的实现方式中,基于手机屏幕的长边长度值和短边长度值,以及手机中框的长边长度值和短边长度值,确定目标组装缝隙值,包括:计算手机屏幕的长边长度值与手机中框的长边长度值的差值,得到长边差值;计算手机屏幕的短边长度值与手机中框的短边长度值的差值,得到短边差值;计算长边差值和短边差值的四均分值,得到目标组装缝隙值。
该实现方式能够获得手机屏幕的长边长度、短边长度,以及手机中框的长边和短边长度的准确值,进一步,根据这四个数值计算得到手机屏幕与手机中框的四条边之间的均匀缝隙,即目标组装缝隙值,提高了目标组装缝隙值的准确率。
第三方面,本申请还提供了一种自动组装设备,自动组装设备包括:夹持机构、一个或多个摄像机、一个或多个处理器和存储器,其中,存储器用于存储程序代码;夹持机构用于夹持目标物体,响应第一运动控制指令将目标物体置于预设标定高度,第一运动控制指令由处理器产生;摄像机响应第一拍摄指令,获取目标物体处于预设标定高度处对应的图像,第一拍摄指令由处理器产生;处理器用于运行程序代码,以执行以下步骤:
获取目标物体处于第一标定高度对应的图像,获得被测参数对应的第一测量值;获取目标物体处于第二标定高度对应的图像,获得被测参数对应的第二测量值;获取目标物体的被测参数对应的实际值;基于被测参数对应的第一测量值、第二测量值、第一标定高度和第二标定高度,获得与被测参数的实际值相匹配的目标标定高度;获取目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
在第三方面一种可能的实现方式中,处理器执行基于被测参数对应的第一测量值、第二测量值、第一标定高度和第二标定高度,获得与被测参数的实际值相匹配的目标标定高度,具体用于:计算被测参数的第一测量值与第二测量值的第一测量差值,以及计算第一标定高度与第二标定高度的第一高度差值;计算第一测量差值与第一高度差值的比值;基于两组标定高度对应的比值相等的代数式,计算得到与被测参数的实际值相匹配的目标标定高度。
在第三方面另一种可能的实现方式中,处理器执行基于被测参数对应的第一测量值、第二测量值、第一标定高度和第二标定高度,获得与被测参数的实际值相匹配的目标标定高度,具体用于:
依据如下公式计算得到目标标定高度:
Figure PCTCN2022117560-appb-000002
其中,z3为目标标定高度,z2为第二标定高度,z1为第一标定高度,L3为被测参数的实际值,L2为被测参数的第二测量值,L1为被测参数的第一测量值。
在第三方面又一种可能的实现方式中,获取目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系,包括:获取标定板中的标识点处于目标标定高度对应的视觉坐标位置;获取标识点对应的机械坐标位置;基于标识点对应的视觉坐标位置及机械坐标位 置,确定目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
在第三方面再一种可能的实现方式中,获取处于第一标定高度的目标物体的被测参数对应的第一测量值,包括:获取目标物体处于第一标定高度对应的被测参数在视觉坐标系中的视觉测量值;基于第一标定高度对应的视觉坐标系与机械运动坐标系之间的第一映射关系,将视觉测量值转换为机械运动坐标系对应的测量值,得到第一测量值。
在第三方面另一种可能的实现方式中,目标物体为手机曲面屏幕,被测参数包括手机曲面屏幕的短边长度和长边长度;或者,目标物体为手机中框,被测参数包括手机中框上的标记点相对距离。
在第三方面又一种可能的实现方式中,夹持机构包括操作机构和支撑平台;操作机构响应第二运动控制指令,分别将手机屏幕置于短边长度对应的短边目标标定高度、长边长度对应的长度目标标定高度处;摄像机响应第二拍摄指令,分别获取手机屏幕处于短边目标标定高度、长边目标标定高度对应的图像;支撑平台响应第三运动控制指令,将手机中框置于中框目标标定高度处;摄像机响应第三拍摄指令,获取手机中框处于中框目标标定高度对应的图像;处理器运行存储器内存储的程序代码,还执行以下步骤:
基于手机屏幕处于短边目标标定高度对应的图像,及短边目标标定高度对应的坐标系映射关系,获得手机屏幕的短边长度值;基于手机屏幕处于长边目标标定高度对应的图像,及长边目标标定高度对应的坐标系映射关系,获得手机屏幕的长边长度值;基于手机中框处于中框目标标定高度对应的图像,及中框目标标定高度对应的坐标系映射关系,获得手机中框的长边长度值和短边长度值;基于手机屏幕的长边长度值和短边长度值,以及手机中框的长边长度值和短边长度值,确定目标组装缝隙值;控制操作机构调整手机屏幕的位置,以使手机屏幕与手机中框的实际缝隙值与目标组装缝隙值相匹配。
在第三方面另一种可能的实现方式中,基于手机屏幕的长边长度值和短边长度值,以及手机中框的长边长度值和短边长度值,确定目标组装缝隙值,包括:计算手机屏幕的长边长度值与手机中框的长边长度值的差值,得到长边差值;计算手机屏幕的短边长度值与手机中框的短边长度值的差值,得到短边差值;计算长边差值和短边差值的四均分值,得到目标组装缝隙值。
第四方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质中包括指令,当上述指令在自动组装设备上运行时,使得该设备执行如第一方面或第一方面任一种可能的实现方式所述的坐标系标定方法。
第五方面,本申请还提供了另一种计算机可读存储介质,该计算机可读存储介质中包括指令,当上述指令在自动组装设备上运行时,使得该设备执行如第二方面或第二方面任一种可能的实现方式所述的自动组装方法。
第六方面,本申请提供了一种包含指令的计算机程序产品,当该计算机程序产品在自动组装设备上运行时,使得该设备执行如第一方面或第一方面任一种可能的实现方式所述的坐标系标定方法。
第七方面,本申请提供了一种包含指令的计算机程序产品,当该计算机程序产品在自动组装设备上运行时,使得该设备执行如第二方面或第二方面任一种可能的实现方式所述的自动组装方法。
应当理解的是,本申请中对技术特征、技术方案、有益效果或类似语言的描述并不是暗示在任意的单个实施例中可以实现所有的特点和优点。相反,可以理解的是对于特征或有益效果的描述意味着在至少一个实施例中包括特定的技术特征、技术方案或有益效果。因此,本说明书中对于技术特征、技术方案或有益效果的描述并不一定是指相同的实施例。进而,还可以任何适当的方式组合本实施例中所描述的技术特征、技术方案和有益效果。本领域技术人员将会理解,无需特定实施例的一个或多个特定的技术特征、技术方案或有益效果即可实现实施例。在其他实施例中,还可在没有体现所有实施例的特定实施例中识别出额外的技术特征和有益效果。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的物体处于不同z向高度获得的图像示意图;
图2是本申请实施例提供的一种自动装配设备的结构原理示意图;
图3是本申请实施例提供的一种手机屏幕和手机中框组装前的相对位置示意图;
图4是本申请实施例提供的一种手机屏幕的配合边示意图;
图5是本申请实施例提供的一种手机屏幕和手机中框的配合边的相对位置示意图;
图6是本申请实施例提供的一种手机屏幕和手机中框组装后的示意图;
图7是本申请实施例提供的一种坐标系标定方法的流程图;
图8是本申请实施例提供的一种标定板的示意图;
图9是本申请实施例提供的视觉坐标系中手机屏幕的尺寸测量示意图;
图10是本申请实施例提供的同一物体在不同z向高度获得的尺寸测量值之间的示意图;
图11是本申请实施例提供的手机中框的标定面上的mark点的示意图;
图12是本申请实施例提供的一种确定目标组装缝隙过程的流程图;
图13是本申请实施例提供的手机中框的标定面的mark点距离边框的距离示意图;
图14是本申请实施例提供的手机屏幕与手机中框之间的缝隙示意图;
图15是本申请实施例提供的坐标系标定装置的一种可能的示意图;
图16是本申请实施例提供的自动组装装置的一种可能的示意图。
具体实施方式
本申请说明书和权利要求书及附图说明中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于限定特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
为了下述各实施例的描述清楚简洁,先将本申请涉及的术语进行解释:
坐标系标定,是视觉坐标系和机械运动坐标系这两个坐标系之间转换关系的标定,通 过坐标系标定帮助机器人转换获得的视觉信息,从而完成后续的控制工作,例如视觉抓取等。
标定高度,是指视觉坐标系中z轴方向的高度。
在已有的一种坐标系标定方案中,利用标定板替代实际物体,如手机屏幕、手机中框,确定标定板图像中的标识点的位置坐标与该标识点在机械运动坐标系中的位置坐标之间的映射关系,即视觉坐标系到机械运动坐标系之间的映射关系。这种标定方式在目标物体是平面的场景下不会存在差异,但是,在目标物体是曲面的场景下,如手机屏幕为曲面屏幕的场景下,会出现在标定平面测得的目标物体的测量值与实际值存在偏差,发明人进一步研究发现,出现这种问题的原因如下:
以目标物体是曲面的手机屏幕为例进行说明,由于整个手机屏幕不是一个平面还包括曲面部分,因此,会选择需要重点管控精度的位置作为手机屏幕的标定面。例如,标定面选择微缝所在平面,即手机屏幕的面积最大的平面,因为手机屏幕与听筒配合的位置处采用微缝设计,即听筒位置处的尺寸需要重点管控。
对曲面屏幕进行标定时,利用相机拍摄标定面所在平面的图像,进而确定该图像中位置坐标与曲面屏幕在机械运动坐标系中的位置坐标之间的映射关系,即视觉坐标系与机械运动坐标系之间的映射关系。
由于曲面屏幕在其宽度方向具有一定的弧度,即该标定面与手机屏幕的长边框不在同一个平面,也即手机屏幕的标定面与长边框所处的z向高度位置不同。
其中,z向高度即视觉坐标系中z轴方向的高度,通常指相机与目标物体的标定面之间的垂直距离,即目标物体的标定面距离相机越远,则z向高度越大,反之,目标物体的标定面距离相机越近,z向高度越小。
相机与标定面之间的距离不同,拍摄得到的标定面的图像大小不同。例如,如图1所示,不改变手机屏幕的x轴方向和y轴方向的位置,仅改变其在z轴方向的位置,如手机屏幕在z1高度拍摄得到图像A1,手机屏幕在z2高度拍摄得到图像A2,且z1<z2。
z1高度对应的拍摄范围的尺寸小于z2高度对应的拍摄范围的尺寸,这里的尺寸是指以长度计量单位计量得到,如mm,cm等,但图像A1和A2的总像素数量相同,因此,z1高度对应的拍摄范围内单位面积包含的像素数量大于z2高度对应的拍摄范围内单位面积包含的像素数量,即同一物体所处的z向高度越小对应的像素数量越多。
对于曲面屏幕而言,平面部分所处的z向高度位置z1小于曲面部分所处的z向高度位置z2,即,曲面部分距离相机更远,但曲面部分的实际z向高度大于平面部分的z向高度,因此,在z2高度获得的曲面部分包含的像素数量小于曲面部分实际位于z1高度时获得的像素数量,即,曲面部分包含的像素数量偏小。
而曲面屏幕的宽度测量值,以平面部分(即标定面)处于标定高度时拍摄的整个曲面屏幕的图像,以及该标定高度对应的视觉-机械转化关系计算得到,但是这种情况下,图像中曲面部分的像素数量偏小,因此,曲面屏幕的宽度测量值小于宽度实际值。而为了获得宽度测量值与宽度实际值的一致性,需要通过多次重复标定寻找使得宽度测量值与宽度实际值保持一致时对应的标定高度,即多次调整曲面屏幕所处的标定高度,并获得各个标定高度对应的宽度测量值,直到宽度测量值与宽度实际值一致,停止重复标定过程。这种方 式需要进行多次重复标定,标定过程繁琐且效率低。
为了解决上述技术问题,本申请提供了一种坐标系标定方法,在能够获得目标物体的被测参数的实际值L3的前提下,获取目标物体分别处于两个不同标定高度时被测参数的测量值,如目标物体处于第一标定高度z1时,获得其长度测量值,记为L1,以及,目标物体处于第二标定高度z2时获得其长度测量值,记为L2。利用上述的z1、L1、z2、L2和L3,基于三角函数关系计算得到长度实际值对应的目标标定高度z3。然后,将标定板置于目标标定高度z3位置处进行标定,获得该目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
该方案基于分别在两个不同标定高度测得目标物体的被测参数的测量值,进而依据两个不同标定高度及相应的被测参数的测量值,计算得到与被测参数的实际值相匹配的目标标定高度。只需在该目标标定高度进行一次标定就能得到与视觉坐标系与机械运动坐标系之间的准确映射关系,在该目标标定高度获得的目标物体的被测参数对应的测量值与其实际值一致,即提高了坐标系标定结果的准确度。无论目标物体是平面物体还是曲面物体,利用该方案都能获得与目标物体的被测参数实际值一致的坐标系标定结果,扩大了该方案的适用范围。
而且,利用该方案无需通过多次调整标定高度,来寻找与被测参数的真实值一致的标定高度,基于两个任意标定高度及其对应的被测参数的测量值,直接计算得到与被测参数的实际值相匹配的目标标定高度,直接在目标标定高度进行一次坐标系标定,因此,该方案降低了坐标系标定过程的复杂度,提高了坐标系标定效率。
为了下述各实施例的描述清楚简洁,以自动组装手机屏幕与手机中框为例说明自动装配设备的工作过程。
请参见图2,示出了本申请实施例提供的一种自动装配设备的结构原理示意图,如图2所示,该自动装配设备包括操作机构11、一个或多个摄像机12、视觉处理器13、运动机构控制器14、支撑平台15。
可以理解的是,本实施例示意的自动装配设备的结构并不构成对该设备的具体限定。在另一些实施例中,该自动装配设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者,不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
操作机构11(或称为机械手)用于抓取和移动待组装零件,如手机屏幕、手机中框等。支撑平台15用于支撑另一待组装零件。
在一示例性实施例中,该支撑平台15上设置有用于固定待组装零件的定位底座,支撑平台15可以平移、升降运动,使得定位底座实现水平方向和竖直方向的运动,进一步,固定在定位底座上的零件跟随定位底座移动。
例如,需要将A零件组装到B零件上,则可以将B零件固定在支撑平台15上,利用操作机构11夹持A零件,进一步通过移动操作机构11和/或支撑平台15将A零件装配至B零件上。
摄像机12(或称为相机)用于拍摄待组装零件的图像,得到待组装组件的位置。
图像传感器是摄像机的重要组成部分,根据构成图像传感器的元件种类不同,图像传 感器可分为电荷耦合元件(Charge coupled Device,CCD)和金属氧化物半导体元件(Complementary Metal Oxide Semiconductor,CMOS)两大类。由CCD元件组成的相机称为CCD相机,由CMOS元件组成的相机称为CMOS相机。摄像机12可以采用CCD相机、CMOS相机中的任意一种。
摄像机12和运动机构控制器14均与视觉处理器13通过通信总线连接。
摄像机12可以接收视觉处理器13发送的拍摄指令,(即第一拍摄指令);同时,摄像机12可以向视觉处理器13发送拍摄得到的图像,以便视觉处理器13基于该图像进行进一步的操作。
视觉处理器13可以根据摄像机12拍摄的图像获得目标物体的位置坐标,进一步根据该位置坐标生成控制操作机构11或支撑平台15的运动控制指令(即,第一运动控制指令)并发送至运动机构控制器14,运动机构控制器14基于该运动控制指令控制操作机构11或支撑平台15的动作,例如,控制操作机构11抓取物体、移动,或者,控制支撑平台15平移或升降等。
其中,摄像机12获得的位置坐标基于视觉坐标系,即图2中的xyz坐标系。而运动机构(操作机构和支撑平台)基于机械运动坐标系,即图2中的XYZ坐标系。这两个坐标系的原点、正方向和单位长度不同,因此,需要标定视觉坐标系与机械运动坐标系之间的位置关系。该标定过程可以由视觉处理器13执行相应的标定程序实现。
视觉处理器13可以包括一个或多个处理单元,例如,视觉处理器13可以包括标定处理器、运动控制处理器等。其中,标定处理器主要用于运行标定程序实现视觉坐标系到机械运动坐标的映射。运动控制处理器主要用于控制各运动机构的操作,如操作机构11、支撑平台15等。
在本申请的一个实施例中,视觉处理器13和运动机构控制器14的功能可以集成在同一处理器中,本申请对此不做限定。
在利用该自动装配设备组装手机屏幕和手机中框时,如图3所示,手机中框21和手机屏幕22所处的z向高度不同,然后利用摄像机分别为手机屏幕22和手机中框21进行拍照来识别两者之间的相对位置。
如图4所示,将手机中框21固定在定位底座151上,利用操作机构抓取手机屏幕22,并将其移动至手机中框21的上方。利用摄像机对手机屏幕22和手机中框21的配合边进行拍照来识别两者之间的相对位置,并根据相对位置调整手机屏幕22的位置,以使手机屏幕22与手机中框21的配合边对齐。此处的四边对齐是指手机屏幕的配合边与手机中框的对应位置的配合边之间的误差在预设范围内。
例如,手机中框21与手机屏幕22的配合边采用四个角中相对位置的边,如图5所示,手机屏幕22包括A、B、C、D四个角,四个角的两条边分别为A1,A2;B1,B2;C1,C2;D1,D2。则手机屏幕22的四组配合边分别为:A1,B2;B1,A2;C1,D2;D1,C2。
同理,手机中框21的四组配合边与手机屏幕21的配合边的位置相对应。
在自动组装过程中,需要将手机屏幕22的一组配合边与手机中框21的相同位置的配合边分别对齐,例如,如图3所示,手机屏幕的A1边与手机中框的a1边对齐,同时手机屏幕的B2边与手机中框中相同位置的边对齐,A2边与a2边对齐、手机屏幕的B1边与手 机中框中相同位置的边对齐;同理,还可以是C1边与c1边对齐、D2边与d2边对齐;D1边与d1边对齐、C2边与c2边对齐。实际使用时,可以选取其中的至少一组配合边对齐,以实现手机屏幕和手机中框对齐匹配。在手机屏幕和手机中框对齐的过程中,机器视觉系统对手机屏幕22和手机中框21的配合边进行拍照,以确认手机屏幕22和手机中框21的配合边是否对齐匹配。
确定手机屏幕22和手机中框21的配合边均对齐后,如图6所示,将手机屏幕22向下平移至组装位置与手机中框组装在一起。
其中,机器视觉系统对手机屏幕和手机中框拍照时,两者分别处于不同的高度位置,因此,需要分别对手机屏幕和手机中框分别进行平面视觉标定,即标定手机屏幕所在平面的视觉坐标系与机械运动坐标系之间的映射关系,以及,标定手机中框所在平面的视觉坐标系与机械运动坐标系之间的映射关系。
下面将结合图7介绍手机屏幕的视觉坐标系与机械运动坐标系之间的映射关系,如图7所示,本实施例以标定手机屏幕的短边为例说明本申请提供的坐标系标定方法,该方法可以包括以下步骤:
S110,利用测量工具获取手机屏幕的短边实际值L3。
其中,该测量工具可以是与自动装配设备相互独立的测量装置,例如,该测量装置可以抓取手机屏幕的短边,并拍摄抓取手机屏幕的短边时的图像,进一步,计算图像中短边的距离得到手机屏幕的短边的实际值。
S120,基于第一标定高度对应的视觉坐标系与机械运动坐标系之间的第一映射关系,获取手机屏幕位于第一标定高度对应的短边的第一测量值。
第一标定高度是视觉坐标系(即xyz坐标系)中z轴方向的高度,该第一标定高度可以是随机选取的高度,本申请对此不做限定。
获得视觉坐标系与机械运动坐标系(即XYZ坐标系)之间的映射关系时,利用标定板替代实际物体(如,手机屏幕)。如图8所示,标定板上设置有标识点,且相邻两个标识点之间的距离固定不变。
在一示例性实施例中,获取某一标定高度(如第一标定高度)对应的视觉坐标系与机械运动坐标系之间的映射关系的过程如下:
a)获得标定板中各标识点在机械运动坐标系中的位置坐标p1。
b)利用相机拍摄处于第一标定高度的标定板的图像,记为图像A,并获得该图像中各标识点在视觉坐标系中的位置坐标p2,以及该图像中两个标识点之间的像素数量。
c)根据同一标识点对应的位置坐标p1、p2,两个标识点之间的实际距离,以及图像A中该两个标识点之间的像素数量,获得视觉坐标系与机械运动坐标系之间的映射关系,即第一映射关系。
其中,p1和p2都是多个标识点的位置坐标的集合。
需要说明的是,本申请并不限定a)和b)的执行顺序,如可以先执行步骤b)再执行步骤a)。
获得第一标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系后,进一步获取手机屏幕处于该第一标定高度时对应的短边测量值的过程如下:
a)利用操作机构抓取手机屏幕并将手机屏幕置于第一标定高度处,利用相机拍摄手机屏幕处于该高度时的图像,即第一图像。
b)根据第一标定高度对应的第一映射关系,以及第一图像中手机屏幕的短边像素值,可以计算得到手机屏幕的短边测量值,即短边的第一测量值L1,即,该测量值是指视觉坐标系中的距离映射到机械运动坐标系后的长度。
如图9所示,手机屏幕的短边处于视觉坐标系的x轴方向,长边处于y轴方向。
其中,B2和C2分别位于手机屏幕的两个长边上,且B2和C2两点的y轴坐标相同,即B2和C2两点之间的连线与短边平行,即B2与C2两点之间的距离等于短边的长度。因此,获取手机屏幕图像中B2点与C2点之间的距离,或者,图像中A2点与D2点之间距离,最终得到手机屏幕的短边测量值。
如图9所示,B2和C2位于手机长边方向一端,A2和D2位于手机长边方向的另一端,通过选取分别位于长边方向两端的两组点,如B2和C2,A2和D2,分别计算得到短边测量值。进一步,比较这两个短边像素值可以判定手机屏幕是否存在倾斜,如果两个短边像素值相等,表明手机屏幕不倾斜;如果两个短边像素值不相等,表明手机屏幕倾斜。例如,短边像素值小的一端向下倾斜,短边像素值大的一端向上倾斜。
S130,基于第二标定高度对应的视觉坐标系与机械运动坐标系之间的第二映射关系,获取手机屏幕位于第二标定高度对应的短边的第二测量值L2。
第二标定高度与第一标定高度的高度值不同,例如,第二标定高度可以是在第一标定高度的基础增加或减小某一数值得到。
第二映射关系的获取过程与第一映射关系的获取过程相同,此处不再赘述。第二测量值的获取过程与第一测量值的获取过程相同,此处亦不再赘述。
S140,基于三角函数原理,根据第一标定高度z1、第一测量值L1、第二标定高度z2和第二测量值L2,计算得到与短边实际值L3对应的目标标定高度。
目标标定高度是指目标物体处于该高度时测得的短边测量值与短边实际值之间的差值小于预设阈值。例如,该预设阈值可以根据实际情况确定,例如,根据实际组装精度确定。
对于处于不同z向高度位置的物体,相机拍摄的图像的尺寸存在差异,进一步图像中物体的尺寸也存在差异,物体在视觉坐标系中的测量尺寸与其在机械运动坐标系中的测量尺寸存在一定的映射关系,因此,z向高度与物体在机械运动坐标系中的测量尺寸之间存在一定的映射关系。
为了方便描述,利用物体在机械运动坐标系中的测量尺寸代替该物体在视觉坐标系中的测量尺寸,如图10所示,手机屏幕处于第一标定高度z1,对应的短边测量值为L1,手机屏幕处于第二标定高度z2,对应的短边测量值为L2。
由图10可知,相机与标定面之间的垂线(即与z轴平行的直线)与相机的拍摄边界线之间的夹角为α,该夹角α的大小不会随标定面在z向的高度变化而变化。
手机屏幕的短边实际值为L3,假设其对应的z向高度为z3(即,目标标定高度)。而且,假设z1、z2、z3,以及L1、L2和L3之间的大小关系如图10所示。
其中,三角形BEC的顶点B的夹角与夹角α相等,同理,三角形BFD中顶点B的夹角与夹角α相等。根据正切函数公式可知,这两个三角形中顶点B对应的夹角的正切值相 等,即存在如下公式1所示的关系:
Figure PCTCN2022117560-appb-000003
根据公式1可以计算出目标标定高度z3的数值,如公式2所示:
Figure PCTCN2022117560-appb-000004
S150,利用标定板获取目标标定高度对应的视觉坐标系与机械运动坐标系之间的第三映射关系。
计算得到目标标定高度后,控制操作机构将标定板置于目标标定高度处,并利用相机拍摄标定板的图像,进一步确定该图像中各标识点的位置坐标与机械运动坐标系中的各标识点之间的映射关系,即第三映射关系。
手机架屏幕的短边方向是曲面,而长边方向是平面,因此,对手机屏幕的短边标定后得到的目标标定高度和坐标系映射关系并不适用于长边方向,即利用短边对应的目标标定高度和坐标系映射关系计算得到的长边长度与手机屏幕的长边实际值存在误差。因此,标定短边后仍需要对长边进行标定。
其中,长边和短边的标定顺序不限,可以先标定长边后标定短边,也可以先标定短标后标定长边。
S160,执行手机屏幕的长边标定过程,获得手机屏幕的长边对应的目标标定高度,以及该高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
手机屏幕的长边标定过程与短边标定过程相似,其中,手机屏幕的长边标定过程如下:
1)利用测量工具获得手机屏幕的长边实际值L6;
2)获取第三标定高度z4对应的视觉坐标系与机械运动坐标系之间的第四映射关系,进一步获取手机屏幕处于第三标定高度z4时对应的第一长边测量值L4;
3)获取第四标定高度z5对应的视觉坐标系与机械运动坐标系之间的第五映射关系,进一步获取手机屏幕处于第四标定高度z5对应的第二长边测量值L5;
如图9所示,通过测量A1和B1(或D1与C1)之间的距离计算得到长边测量值。
其中,第三标定高度z4、第四标定高度z5可以是随机选择的两个不同的z向高度,z4和z5之间的大小关系,本申请不做限定,例如,可以是z4大于z5,或者还可以是z4小于z5。
4)根据公式3,计算得到长边测量值与长边实际值相匹配时,对应的标定高度,即长边对应的目标标定高度z6。
Figure PCTCN2022117560-appb-000005
5)获取标定板位于长边对应的目标标定高度时视觉坐标系与机械运动坐标系之间的映 射关系,即第六映射关系。
需要说明的是,1)~5)的执行顺序可以根据实际需求设定,本申请对此并不限定。
本实施例中,先标定手机屏幕的长边和短边,后标定手机中框。当然,在其他实施例中,也可以先标定手机中框,再标定手机屏幕的短边和长边,本申请对此不做限定。
在本申请的其它实施例中,对于同一个标定高度,可以同时获得手机屏幕的短边和长边的测量值。
例如,手机屏幕处于第一标定高度z1时,获得手机屏幕对应的第一长边测量值和第一短边测量值;同理,手机屏幕处于第二标定高度z2时,获得手机屏幕对应的第二长边测量值和第二短边测量值。
如上所述,获取两个不同标定高度分别对应的长边测量值和短边测量值,只需将手机屏幕分别放置在两个不同的标定高度,而不需要将手机屏幕分别放置于四个标定高度处。这样能够节省将手机屏幕分别放置在两个不同标定高度的过程消耗的时间,因此,缩短了长边和短边标定过程的总耗时,提高了标定效率。
在本申请一示例性实施例中,在手机屏幕和手机中框组装过程中,为了避免操作机构向下压装是过压或欠压,可以利用上述的标定方法继续标定手机中框,即获得手机中框和手机屏幕的目标组装高度。
S170,获取手机中框的mark点距离实际值H。
手机中框的标定面包括多个mark点,如图11所示,可以以手机中框上的四个通孔A、B、C、D作为mark点。
在一示例性实施例中,利用与自动装配设备相互独立的其他测量装置测量得到该手机中框的各个mark点距离实际值。
其中,该测量装置的测量mark点距离实际值的测量原理也是利用摄像机拍摄手机中框的图像,从而获得mark点距离实际值,例如,将手机中框置于实际组装高度,拍摄手机中框处于此高度时对应的图像,进而获得mark点距离实际值。
如图11所示,手机中框的长边处于Y轴方向,短边处于X轴方向。
例如,mark点间的相对距离是指A和B两点在Y轴方向的相对距离,C、D两点在Y轴方向的相对距离,A、D两点在X轴方向的相对距离,B、C两点在X轴方向的相对距离。利用测量装置测得的mark点的位置坐标即可计算得到两个mark点的相对距离。标定时可以选取A和B,B和C,C和D,A和D间的相对距离。
例如,A、B、C、D四个mark点的位置坐标依次是(Xa,Ya)、(Xb,Yb)、(Xc,Yc)和(Xd,Yd)。如图12所示,A和B两点在Y轴方向的相对距离是A点和B点的Y轴坐标的差值绝对值,即A、B两点之间的相对距离L=|Ya-Yb|。同理,B、C两点在X轴方向的相对距离=W=|Xb-Xc|,C和D两点在Y轴方向的相对距离为|Yc-Yd|,A和D两点在X轴方向的相对距离为|Xa-Xd|。
S180,基于第一组装高度Z1对应的视觉坐标系与机械运动坐标系之间的映射关系,即第六映射关系,获得手机中框处于Z1对应的mark点相对距离测量值,即第一相对距离测量值。
将手机中框抓取至Z1高度处,并利用摄像机拍摄该手机中框的图像,获得该图像中的 mark点相对距离,进一步利用Z1高度对应的视觉坐标系与机械运动坐标系之间的映射关系,将视觉坐标系中的mark点相对距离映射到机械运动坐标系,得到第一相对距离测量值。
S190,基于第二组装高度Z2对应的视觉坐标系与机械运动坐标之间的映射关系,即第七映射关系,获得手机中框处于Z2对应的mark点相对距离测量值,即第二相对距离测量值。
第二相对距离测量值与第一相对距离测量值的获取方式相同,此处不再赘述。
S1100,根据第一组装高度、第一相对距离测量值、第二组装高度、第二相对距离测量值,以及相对距离实际值,计算得到相对距离实际值对应的目标组装高度。
手机中框在目标组装高度对应的mark点相对距离测量值与mark点相对距离实际值相匹配,如两者的误差小于预设阈值。
该步骤可以利用如下公式4计算得到目标组装高度Z3:
Figure PCTCN2022117560-appb-000006
公式4中,Z1为第一组装高度、H1是手机中框处于Z1高度时的mark点相对距离测量值,Z2为第二组装高度,H2是手机中框处于Z2高度时的mark点相对距离测量值,H为手机中框的mark点相对距离实际值,Z3为目标组装高度。
S1110,获取目标组装高度对应的视觉坐标系与机械运动坐标系之间的第八映射关系。
利用标定板替代手机中框,操作机构将标定板置于目标组装高度处,利用相机拍摄标定板(标定板上具有标识点)的图像,进一步确定视觉坐标系中各标识点的位置坐标与机械运动坐标系中各标识点之间的映射关系,即第八映射关系。
在组装过程中,将手机中框置于目标组装高度,利用相机拍摄手机中框的图像,进一步根据目标组装高度对应的第八映射关系,测得手机中框的长边长度和短边长度。
本实施例提供的坐标系标定方法,对于表面是曲面的目标物体,如曲面的手机屏幕,获取手机屏幕分别处于两个不同标定高度对应的短边测量值。基于三角函数原理,利用两个不同标定高度分别对应的短边测量值,计算得到短边实际值对应的目标标定高度。只需针对该目标标定高度进行一次短边对应的坐标系标定过程,即可得到与短边实际值对应的视觉坐标系与机械运动坐标之间的映射关系。同理,对手机屏幕的长边进行标定,获得长边测量值与长边实际值相等的目标标定高度,再针对该目标标定高度获得视觉坐标系与机械运动坐标系之间的映射关系。基于相同的原理,对手机中框上的mark点进行标定,获得与mark点相对距离实际值对应的目标组装高度,进一步获得该目标组装高度对应的坐标系映射关系。由上述内容可见,该方案根据任意两个标定高度的被测参数测量值即可获得使得被测参数的测量值与实际值相等的目标标定高度,只需获得该目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系无需多次重复地调整标定高度进行坐标系标定过程。因此,利用该方案降低了坐标系标定过程的复杂度,提高了坐标系标定效率。
在本申请的其他实施例中,对手机屏幕和手机中框标定完成后,分别利用标定得到的坐标系映射关系,获得手机屏幕及手机中框的长边、短边的测量值,进一步根据手机屏幕和手机中框的四个边的测量值计算得到手机屏幕与手机中框的目标组装缝隙,基于该目标 组装缝隙组装手机屏幕和手机中框,如图12所示,自动组装过程如下:
S210,将手机屏幕置于短边对应的目标标定高度,获得手机屏幕的短边长度。
将手机屏幕置于短边对应的目标标定高度处,拍摄手机屏幕的图像,利用该目标标定高度对应的坐标系映射关系将手机屏幕图像中短边长度映射到机械运动坐标系中,得到该短边长度。
S220,将手机屏幕置于长边对应的目标标定高度,获得手机屏幕的长边长度。
同理,将手机屏幕置于长边对应的目标标定高度处,将手机屏幕图像中的长边长度映射到机械运动坐标系中,得到长边长度。
S230,将手机屏幕置于目标组装高度,获得手机中框的长边长度和短边长度。
在本申请一示例性实施例中,用于测量mark点相对距离的测量装置还可以测得各个mark点分别与手机中框的长、短边框之间的尺寸。
例如,如图13所示,测得mark点A的尺寸参数为X1和Y1,X1是mark点与最近的长边边框之间的距离,Y1是mark点A与距离最近的短边边框之间的距离。同理,X2和Y2分别是mark点B距离最近的长边边框和短边边框的距离;X3和Y3分别是mark点C距离最近的长边边框和短边边框的距离;X4和Y4分别是mark点C距离最近的长边边框和短边边框的距离。
进一步,根据A、B两点分别距离最近的短边边框的距离Y1和Y2,基于公式L+Y1+Y2计算得到手机中框的长边长度值。同理,还可以根据C、D两点的相对距离,以及Y3、Y4,计算得到手机中框的长边长度。
手机中框的短边长度与长边长度的获取方式相同,如图12所示,根据B、C两点之间的相对距离W,以及X2和X3,基于W+X2+X3计算得到手机中框的短边长度。
此外,本申请实施例并不限定S210~S230的执行顺序。
S240,根据手机屏幕和手机中框的长边长度、短边长度,计算得到目标组装缝隙值。
计算手机中框与手机屏幕的长边长度之间的差值,计算手机中框与手机屏幕的短边长度之间的差值。
计算长边差值和短边差值的总和的四平分值,即(长边差值+短边差值)/4,作为目标组装缝隙。
如图14所示,手机中框21与手机屏幕22的四标边对应的缝隙值分别为d1、d2、d3和d4,该实施例得到的目标组装缝隙能够使该四个缝隙值相等。
例如,手机中框的长边长度为100,手机中框的短边长度是80。手机屏幕的长边长度为90,手机屏幕的短边长度是70。则长边差值为10,短边差值为10,目标组装缝隙为5。即图14中的d1=d2=d3=d4=5。
S250,调整手机屏幕与手机中框的相对位置,以使手机屏幕与手机中框的实际缝隙值与目标组装缝隙值相匹配。
组装手机屏幕和手机中框时,获取手机屏幕与手机中框的四条边对应的实际缝隙值,并根据各个实际缝隙值与目标组装缝隙调整手机屏幕的位置,最终使四条边对应的实际缝隙值达到目标组装缝隙值,例如,实际缝隙值与目标组装缝隙值之间的误差小于预设阈值。
假设目标组装缝隙为5,四条边对应的实际缝隙值依次为d1=3,d2=7,d3=4,d4=6, 以图14所示的XY轴坐标方向为例进行说明,此种情况下,需要将手机屏幕向Y轴正方向移动1,以及向X轴负方向移动2,最终使四条边对应的实际缝隙值均匀。
本实施例提供的自动组装方法,利用手机屏幕和手机中框的标定结果,测得手机屏幕、手机中框的长边长度、短边长度,进一步计算得到手机屏幕与手机中框的目标组装缝隙,最终使得手机屏幕与手机中框组装后的四条缝隙分布均匀,减小了组装缝隙的误差。
本申请实施例可以根据上述方法示例对自动组装设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图15示出了上述实施例中涉及的坐标系标定装置的一种可能的组成示意图,该坐标标定装置能执行本申请各方法实施例中任一坐标系标定方法实施例的步骤。所述坐标系标定装置可以是自动组装设备,或支持自动组装设备实现上述的坐标系标定方法实施例提供的方法的芯片系统。
如图15所示,该坐标系标定装置可以包括:
第一测量值获取模块110,用于获取处于第一标定高度的目标物体的被测参数对应的第一测量值。
第二测量值获取模块120,用于获取处于第二标定高度的所述目标物体的所述被测参数对应的第二测量值。
参数实际值获取模块130,用于获取所述目标物体的所述被测参数对应的实际值。
目标标定高度确定模块140,用于基于所述被测参数对应的所述第一测量值、所述第二测量值、所述第一标定高度和所述第二标定高度,获得与所述被测参数的实际值相匹配的目标标定高度。
坐标系映射关系获取模块150,用于获取所述目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本申请实施例提供的坐标系标定装置,用于执行上述任一实施例的坐标系标定方法,因此可以达到与上述实施例的坐标系标定方法相同的技术效果。
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中包括指令,当上述指令在电子设备上运行时,使得该电子设备执行图7所示的相关方法步骤,以实现上述实施例中的坐标系标定方法。
本实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行如图7所示方法实施例中的相关方法步骤,以实现上述实施例中的坐标系标定方法。
请参见图16,示出了本申请实施例提供的自动组装装置的一种可能的示意图,该自动 组装装置用于组装手机屏幕与手机中框。该自动组装装置可以是自动组装设备,或支持自动组装设备实现上述的自动组装方法实施例提供的方法的芯片系统。
如图16所示,该自动组装装置可以包括:
手机屏幕短边获取模块210,用于将手机屏幕置于短边目标标定高度处,基于所述短边目标标定高度对应的坐标系映射关系获得所述手机屏幕的短边长度值;
手机屏幕长边获取模块220,用于将所述手机屏幕置于长边目标标定高度处,基于所述长边目标标定高度对应的坐标系映射关系获得所述手机屏幕的长边长度值。
中框参数获取模块230,用于将所述手机中框置于中框目标标定高度处,基于所述中框目标标定高度对应的坐标系映射关系获得所述手机中框的长边长度值和短边长度值;
目标组装缝隙确定模块240,用于基于所述手机屏幕的长边长度值和短边长度值,以及所述手机中框的长边长度值和短边长度值,确定目标组装缝隙值。
位置调整模块250,用于调整所述手机屏幕与所述手机中框的相对位置,以使所述手机屏幕与所述手机中框的实际缝隙值与所述目标组装缝隙值相匹配。
其中,所述短边目标标定高度、所述长边目标标定高度、所述中框目标标定高度,以及各标定高度对应的坐标系映射关系利用上述实施例的坐标系标定方法获得。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本申请实施例提供的自动组装装置,用于执行上述任一实施例的自动组装方法,因此可以达到与上述实施例的自动组装方法相同的技术效果。
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中包括指令,当上述指令在自动组装设备上运行时,使得该设备执行图7或12所示的相关方法步骤,以实现上述实施例中的自动组装方法。
本实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在自动组装设备上运行时,使得该设备执行如图7或图12所示方法实施例中的相关方法步骤,以实现上述实施例中的自动组装方法。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本实施例所提供的几个实施例中,应该理解到,所揭露的坐标系标定方法、自动组装方法,装置,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (24)

  1. 一种坐标系标定方法,其特征在于,应用于自动装配设备,所述方法包括:
    获取处于第一标定高度的目标物体的被测参数对应的第一测量值;
    获取处于第二标定高度的所述目标物体的所述被测参数对应的第二测量值;
    获取所述目标物体的所述被测参数对应的实际值;
    基于所述被测参数对应的所述第一测量值、所述第二测量值、所述第一标定高度和所述第二标定高度,获得与所述被测参数的实际值相匹配的目标标定高度;
    获取所述目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述被测参数对应的所述第一测量值、所述第二测量值、所述第一标定高度和所述第二标定高度,获得与所述被测参数的实际值相匹配的目标标定高度,包括:
    计算所述被测参数的第一测量值与所述第二测量值的第一测量差值,以及计算所述第一标定高度与所述第二标定高度的第一高度差值;
    计算所述第一测量差值与所述第一高度差值的比值;
    基于两个标定高度对应的所述比值相等的代数式,计算得到与所述被测参数的实际值相匹配的目标标定高度。
  3. 根据权利要求1或2所述的方法,其特征在于,所述基于所述被测参数对应的所述第一测量值、所述第二测量值、所述第一标定高度和所述第二标定高度,获得与所述被测参数的实际值相匹配的目标标定高度,包括:
    依据如下公式计算得到所述目标标定高度:
    Figure PCTCN2022117560-appb-100001
    其中,z3为所述目标标定高度,z2为所述第二标定高度,z1为所述第一标定高度,L3为所述被测参数的实际值,L2为所述被测参数的第二测量值,L1为所述被测参数的第一测量值。
  4. 根据权利要求1所述的方法,其特征在于,所述获取所述目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系,包括:
    获取标定板中的标识点处于所述目标标定高度对应的视觉坐标位置;
    获取所述标识点对应的机械坐标位置;
    基于所述标识点对应的视觉坐标位置及机械坐标位置,确定所述目标标定高度对应的 视觉坐标系与所述机械运动坐标系之间的映射关系。
  5. 根据权利要求1所述的方法,其特征在于,所述获取处于第一标定高度的目标物体的被测参数对应的第一测量值,包括:
    获取所述目标物体处于所述第一标定高度对应的所述被测参数在视觉坐标系中的视觉测量值;
    基于所述第一标定高度对应的视觉坐标系与机械运动坐标系之间的第一映射关系,将所述视觉测量值转换为机械运动坐标系对应的测量值,得到所述第一测量值。
  6. 根据权利要求1所述的方法,其特征在于,所述目标物体为手机曲面屏幕,所述被测参数包括所述手机曲面屏幕的短边长度。
  7. 根据权利要求6所述的方法,其特征在于,所述被测参数还包括手机曲面屏幕的长边长度。
  8. 根据权利要求1所述的方法,其特征在于,所述目标物体为手机中框,所述被测参数包括所述手机中框上的标记点相对距离。
  9. 一种自动组装方法,其特征在于,用于组装手机屏幕与手机中框,所述方法包括:
    将手机屏幕置于短边目标标定高度处,基于所述短边目标标定高度对应的坐标系映射关系获得所述手机屏幕的短边长度值;
    将所述手机屏幕置于长边目标标定高度处,基于所述长边目标标定高度对应的坐标系映射关系获得所述手机屏幕的长边长度值;
    将所述手机中框置于中框目标标定高度处,基于所述中框目标标定高度对应的坐标系映射关系获得所述手机中框的长边长度值和短边长度值;
    基于所述手机屏幕的长边长度值和短边长度值,以及所述手机中框的长边长度值和短边长度值,确定目标组装缝隙值;
    调整所述手机屏幕与所述手机中框的相对位置,以使所述手机屏幕与所述手机中框的实际缝隙值与所述目标组装缝隙值相匹配;
    其中,所述短边目标标定高度、所述长边目标标定高度、所述中框目标标定高度,以及各标定高度对应的坐标系映射关系利用权利要求1-8任一项所述的坐标系标定方法获得。
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述手机屏幕的长边长度值和短边长度值,以及所述手机中框的长边长度值和短边长度值,确定目标组装缝隙值,包括:
    计算所述手机屏幕的长边长度值与所述手机中框的长边长度值的差值,得到长边差值;
    计算所述手机屏幕的短边长度值与所述手机中框的短边长度值的差值,得到短边差值;
    计算所述长边差值和所述短边差值的四均分值,得到所述目标组装缝隙值。
  11. 一种自动组装设备,其特征在于,所述自动组装设备包括:夹持机构、一个或多个摄像机、一个或多个处理器和存储器,其中,所述存储器用于存储程序代码;
    所述夹持机构用于夹持目标物体,响应第一运动控制指令将所述目标物体置于预设标定高度,所述第一运动控制指令由所述处理器产生;
    所述摄像机响应第一拍摄指令,获取所述目标物体处于所述预设标定高度处对应的图像,所述第一拍摄指令由所述处理器产生;
    所述处理器用于运行所述程序代码,以执行以下步骤:
    获取所述目标物体处于第一标定高度对应的图像,获得被测参数对应的第一测量值;
    获取所述目标物体处于第二标定高度对应的图像,获得所述被测参数对应的第二测量值;
    获取所述目标物体的所述被测参数对应的实际值;
    基于所述被测参数对应的所述第一测量值、所述第二测量值、所述第一标定高度和所述第二标定高度,获得与所述被测参数的实际值相匹配的目标标定高度;
    获取所述目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
  12. 根据权利要求11所述的自动组装设备,其特征在于,所述处理器执行所述基于所述被测参数对应的所述第一测量值、所述第二测量值、所述第一标定高度和所述第二标定高度,获得与所述被测参数的实际值相匹配的目标标定高度,具体用于:
    计算所述被测参数的第一测量值与所述第二测量值的第一测量差值,以及计算所述第一标定高度与所述第二标定高度的第一高度差值;
    计算所述第一测量差值与所述第一高度差值的比值;
    基于两组标定高度对应的所述比值相等的代数式,计算得到与所述被测参数的实际值相匹配的目标标定高度。
  13. 根据权利要求11或12所述的自动组装设备,其特征在于,所述处理器执行所述基于所述被测参数对应的所述第一测量值、所述第二测量值、所述第一标定高度和所述第二标定高度,获得与所述被测参数的实际值相匹配的目标标定高度,具体用于:
    依据如下公式计算得到所述目标标定高度:
    Figure PCTCN2022117560-appb-100002
    其中,z3为所述目标标定高度,z2为所述第二标定高度,z1为所述第一标定高度,L3 为所述被测参数的实际值,L2为所述被测参数的第二测量值,L1为所述被测参数的第一测量值。
  14. 根据权利要求11所述的自动组装设备,其特征在于,所述获取所述目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系,包括:
    获取标定板中的标识点处于所述目标标定高度对应的视觉坐标位置;
    获取所述标识点对应的机械坐标位置;
    基于所述标识点对应的视觉坐标位置及机械坐标位置,确定所述目标标定高度对应的视觉坐标系与所述机械运动坐标系之间的映射关系。
  15. 根据权利要11所述的自动组装设备,其特征在于,所述获取处于第一标定高度的目标物体的被测参数对应的第一测量值,包括:
    获取所述目标物体处于所述第一标定高度对应的所述被测参数在视觉坐标系中的视觉测量值;
    基于所述第一标定高度对应的视觉坐标系与机械运动坐标系之间的第一映射关系,将所述视觉测量值转换为机械运动坐标系对应的测量值,得到所述第一测量值。
  16. 根据权利要求11所述的自动组装设备,其特征在于,所述目标物体为手机曲面屏幕,所述被测参数包括所述手机曲面屏幕的短边长度和长边长度;
    或者,
    所述目标物体为手机中框,所述被测参数包括所述手机中框上的标记点相对距离。
  17. 根据权利要求11所述的自动组装设备,其特征在于,所述夹持机构包括操作机构和支撑平台;
    所述操作机构响应第二运动控制指令,分别将手机屏幕置于短边长度对应的短边目标标定高度、长边长度对应的长度目标标定高度处;
    所述摄像机响应第二拍摄指令,分别获取所述手机屏幕处于所述短边目标标定高度、所述长边目标标定高度对应的图像;
    所述支撑平台响应第三运动控制指令,将所述手机中框置于中框目标标定高度处;
    所述摄像机响应第三拍摄指令,获取所述手机中框处于所述中框目标标定高度对应的图像;
    所述处理器运行所述存储器内存储的程序代码,还执行以下步骤:
    基于所述手机屏幕处于所述短边目标标定高度对应的图像,及所述短边目标标定高度对应的坐标系映射关系,获得所述手机屏幕的短边长度值;
    基于所述手机屏幕处于所述长边目标标定高度对应的图像,及所述长边目标标定高度对应的坐标系映射关系,获得所述手机屏幕的长边长度值;
    基于所述手机中框处于所述中框目标标定高度对应的图像,及所述中框目标标定高度对应的坐标系映射关系,获得所述手机中框的长边长度值和短边长度值;
    基于所述手机屏幕的长边长度值和短边长度值,以及所述手机中框的长边长度值和短边长度值,确定目标组装缝隙值;
    控制所述操作机构调整所述手机屏幕的位置,以使所述手机屏幕与所述手机中框的实际缝隙值与所述目标组装缝隙值相匹配。
  18. 根据权利要求17所述的自动组装设备,其特征在于,所述基于所述手机屏幕的长边长度值和短边长度值,以及所述手机中框的长边长度值和短边长度值,确定目标组装缝隙值,包括:
    计算所述手机屏幕的长边长度值与所述手机中框的长边长度值的差值,得到长边差值;
    计算所述手机屏幕的短边长度值与所述手机中框的短边长度值的差值,得到短边差值;
    计算所述长边差值和所述短边差值的四均分值,得到所述目标组装缝隙值。
  19. 一种坐标系标定方法,其特征在于,应用于自动装配设备,所述方法包括:
    获取处于第一标定高度的目标物体的被测参数对应的第一测量值;
    获取处于第二标定高度的所述目标物体的所述被测参数对应的第二测量值;
    获取所述目标物体的所述被测参数对应的实际值;
    依据如下公式计算得到目标标定高度:
    Figure PCTCN2022117560-appb-100003
    其中,z3为所述目标标定高度,z2为所述第二标定高度,z1为所述第一标定高度,L3为所述被测参数的实际值,L2为所述被测参数的第二测量值,L1为所述被测参数的第一测量值;
    获取所述目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系。
  20. 根据权利要求19所述的方法,其特征在于,所述获取所述目标标定高度对应的视觉坐标系与机械运动坐标系之间的映射关系,包括:
    获取标定板中的标识点处于所述目标标定高度对应的视觉坐标位置;
    获取所述标识点对应的机械坐标位置;
    基于所述标识点对应的视觉坐标位置及机械坐标位置,确定所述目标标定高度对应的 视觉坐标系与所述机械运动坐标系之间的映射关系。
  21. 根据权利要求19所述的方法,其特征在于,所述获取处于第一标定高度的目标物体的被测参数对应的第一测量值,包括:
    获取所述目标物体处于所述第一标定高度对应的所述被测参数在视觉坐标系中的视觉测量值;
    基于所述第一标定高度对应的视觉坐标系与机械运动坐标系之间的第一映射关系,将所述视觉测量值转换为机械运动坐标系对应的测量值,得到所述第一测量值。
  22. 根据权利要求19所述的方法,其特征在于,所述目标物体为手机曲面屏幕,所述被测参数包括所述手机曲面屏幕的短边长度。
  23. 根据权利要求22所述的方法,其特征在于,所述被测参数还包括手机曲面屏幕的长边长度。
  24. 根据权利要求19所述的方法,其特征在于,所述目标物体为手机中框,所述被测参数包括所述手机中框上的标记点相对距离。
PCT/CN2022/117560 2021-10-12 2022-09-07 坐标系标定方法、自动组装方法及装置 WO2023061110A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22879654.6A EP4220558A4 (en) 2021-10-12 2022-09-07 COORDINATE SYSTEM CALIBRATION METHOD, AND AUTOMATIC ASSEMBLY METHOD AND APPARATUS
US18/036,820 US20240017416A1 (en) 2021-10-12 2022-09-07 Coordinate System Calibration Method, Automatic Assembly Method, and Apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111185903.8 2021-10-12
CN202111185903.8A CN113643384B (zh) 2021-10-12 2021-10-12 坐标系标定方法、自动组装方法及装置

Publications (1)

Publication Number Publication Date
WO2023061110A1 true WO2023061110A1 (zh) 2023-04-20

Family

ID=78426474

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/117560 WO2023061110A1 (zh) 2021-10-12 2022-09-07 坐标系标定方法、自动组装方法及装置

Country Status (4)

Country Link
US (1) US20240017416A1 (zh)
EP (1) EP4220558A4 (zh)
CN (1) CN113643384B (zh)
WO (1) WO2023061110A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113643384B (zh) * 2021-10-12 2022-02-08 深圳荣耀智能机器有限公司 坐标系标定方法、自动组装方法及装置
CN114670194B (zh) * 2022-03-22 2023-06-27 荣耀终端有限公司 机械手系统定位方法及装置
CN117066843B (zh) * 2023-10-08 2024-05-10 荣耀终端有限公司 产品组件的组装方法和设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104165584A (zh) * 2013-05-17 2014-11-26 上海三菱电梯有限公司 机器人基坐标系的非接触式高精度标定方法及其应用
CN109285145A (zh) * 2018-08-12 2019-01-29 浙江农林大学 基于智能手机的多株立木高度测量方法
CN109454634A (zh) * 2018-09-20 2019-03-12 广东工业大学 一种基于平面图像识别的机器人手眼标定方法
JP2019061502A (ja) * 2017-09-27 2019-04-18 沖電気工業株式会社 情報処理装置、情報処理方法、及びプログラム
US20200014912A1 (en) * 2018-07-06 2020-01-09 Samsung Electronics Co., Ltd. Calibration device and method of operating the same
CN110834333A (zh) * 2019-11-14 2020-02-25 中科新松有限公司 一种机器人手眼标定方法及存储介质
CN113643384A (zh) * 2021-10-12 2021-11-12 深圳荣耀智能机器有限公司 坐标系标定方法、自动组装方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105073348B (zh) * 2013-04-05 2016-11-09 Abb技术有限公司 用于校准的机器人系统和方法
CN105522576A (zh) * 2014-10-27 2016-04-27 广明光电股份有限公司 机器手臂自动再校正的方法
CN108240793A (zh) * 2018-01-26 2018-07-03 广东美的智能机器人有限公司 物体尺寸测量方法、装置和系统
CN109443129B (zh) * 2018-11-26 2024-04-16 东莞捷荣技术股份有限公司 一种手机壳卡扣位置检测装置及检测方法
CN109794963B (zh) * 2019-01-07 2021-06-01 南京航空航天大学 一种面向曲面构件的机器人快速定位方法
CN111791226B (zh) * 2019-12-31 2021-12-03 深圳市豪恩声学股份有限公司 通过机器人实现组装的方法、装置及机器人
CN112880642B (zh) * 2021-03-01 2023-06-13 苏州挚途科技有限公司 测距系统和测距方法
CN113172636B (zh) * 2021-06-29 2021-11-02 深圳市越疆科技有限公司 一种自动手眼标定方法、装置及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104165584A (zh) * 2013-05-17 2014-11-26 上海三菱电梯有限公司 机器人基坐标系的非接触式高精度标定方法及其应用
JP2019061502A (ja) * 2017-09-27 2019-04-18 沖電気工業株式会社 情報処理装置、情報処理方法、及びプログラム
US20200014912A1 (en) * 2018-07-06 2020-01-09 Samsung Electronics Co., Ltd. Calibration device and method of operating the same
CN109285145A (zh) * 2018-08-12 2019-01-29 浙江农林大学 基于智能手机的多株立木高度测量方法
CN109454634A (zh) * 2018-09-20 2019-03-12 广东工业大学 一种基于平面图像识别的机器人手眼标定方法
CN110834333A (zh) * 2019-11-14 2020-02-25 中科新松有限公司 一种机器人手眼标定方法及存储介质
CN113643384A (zh) * 2021-10-12 2021-11-12 深圳荣耀智能机器有限公司 坐标系标定方法、自动组装方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4220558A4

Also Published As

Publication number Publication date
US20240017416A1 (en) 2024-01-18
EP4220558A4 (en) 2024-06-05
EP4220558A1 (en) 2023-08-02
CN113643384B (zh) 2022-02-08
CN113643384A (zh) 2021-11-12

Similar Documents

Publication Publication Date Title
WO2023061110A1 (zh) 坐标系标定方法、自动组装方法及装置
WO2019114339A1 (zh) 机械臂运动的校正方法和装置
JP2020116734A (ja) ロボットモーション用のビジョンシステムの自動ハンドアイ校正のためのシステム及び方法
WO2021259151A1 (zh) 一种激光标定系统的标定方法、装置以及激光标定系统
WO2022052404A1 (zh) 基于机器视觉内存对位接插方法与系统、设备、存储介质
TW200402117A (en) Carriage robot system and controlling method thereof
JP2011117914A (ja) オブジェクト制御システム、オブジェクト制御方法、プログラム、及び回転中心位置特定装置
TW201947078A (zh) 自動校正針頭位置的方法及系統
US12058468B2 (en) Image capturing apparatus, image processing apparatus, image processing method, image capturing apparatus calibration method, robot apparatus, method for manufacturing article using robot apparatus, and recording medium
CN113645456B (zh) 投影图像校正方法、投影系统及可读存储介质
WO2022141324A1 (zh) 摄像头的硬件在环标定、靶点设置方法、系统及相关设备
WO2014048166A1 (zh) 光学防震相机模组的自动调试方法及系统
CN110722558A (zh) 机器人的原点校正方法、装置、控制器和存储介质
CN117173254A (zh) 一种相机标定方法、系统、装置和电子设备
CN116359131A (zh) 极片缺陷检测系统的标定方法及极片缺陷检测系统
CN111465188B (zh) 异形电路板及元器件插件方法及装置
JP2009301181A (ja) 画像処理装置、画像処理プログラム、画像処理方法、および電子機器
CN108109179B (zh) 基于针孔摄像机模型的摄像机姿态校正方法
CN116242319A (zh) 一种大范围运动物体的高精度双目视觉测量方法及装置
CN116147477A (zh) 联合标定方法、孔位检测方法、电子设备以及存储介质
WO2021120911A1 (zh) 一种板状工件的三维坐标校准方法
CN114331977A (zh) 多阵列三维测量系统的拼接标定系统、方法及装置
CN113255662A (zh) 一种基于视觉成像的定位矫正方法、系统、设备及存储介质
CN113592956A (zh) 一种基于显微检测机台的多镜头联合标定方法和装置
CN114643577A (zh) 一种通用型机器人视觉自动标定装置和方法

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022879654

Country of ref document: EP

Effective date: 20230428

WWE Wipo information: entry into national phase

Ref document number: 18036820

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22879654

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE