Object calibration method, device and system
Calculate normal information through a variety of different color light sources, generate motion instructions to apply calibration forces, solve the problem of low object calibration accuracy in the existing technology, achieve efficient defect detection and calibration, and are suitable for various shapes of object surfaces .
Patent Information
- Application Number
- CN202410636025.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2024-09-24
AI Technical Summary
In existing object calibration technology, defect detection relies on machine vision methods, which require a large number of negative sample training, resulting in a low detection rate and strict lighting environment requirements, and low calibration accuracy, making it unable to adapt to industrial production scenarios.
A variety of light sources of different colors are used to surround the object, and the shadow image is obtained through the image sensor, the normal information is calculated, and motion instructions are generated to apply calibration force to improve the accuracy of calibration.
No negative sample training is required, the light source accuracy requirements are reduced, the accuracy of object calibration and the recognition accuracy of defect detection are improved, and it is suitable for various shapes of object surfaces.
Smart Images

Figure CN118688104A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of object calibration, and in particular to an object calibration method, device and system. Background Art
[0002] Existing defect detection technology for objects (such as force / tactile sensors including curved surfaces) mainly uses machine vision methods. The disadvantage of this method is that it requires a large number of negative samples (defect samples) as training data / recognition data to train models or adjust recognition strategies. However, there are very few negative samples in actual industrial production scenarios, resulting in low detection rates and poor generalization. In addition, existing defect detection devices for objects are mostly based on images collected by RGBD cameras for detection. Their disadvantages are low recognition accuracy, strict requirements on the lighting environment (for example, no interference from infrared light sources), and strict requirements on the objects to be inspected (for example, the objects to be inspected must not have too high reflectivity and absorption rates for both visible light and infrared light).
[0003] In addition, the force applied during the existing object calibration is a vector predefined according to the design drawings, so the calibration accuracy is often low. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device and system for calibrating an object to improve the accuracy of calibration.
[0005] In a first aspect, an embodiment of the present application provides a method for calibrating an object, including the following technical solutions:
[0006] A method for calibrating an object, the method comprising the following steps:
[0007] Before object calibration, a first shadow image of each light source on the surface of the object is obtained;
[0008] Obtaining first normal information of the surface of the object based on the first shadow image;
[0009] A motion instruction is generated based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object, thereby completing the object calibration.
[0010] Furthermore, in one embodiment, the light source is at least three light sources of different colors, and the optical axes of any two light sources are not parallel; and obtaining the first normal information of the object surface based on the first shadow image comprises the following steps:
[0011] Based on the first shadow image, the first normal information is obtained in combination with formula (1);
[0012] M′=ELN′P (4)
[0013] Wherein, E represents the intensity of the light source, L represents the direction vector of the light source, N' represents the first normal information, P represents the reflectivity of the object surface, and M' represents the pixel light intensity of the first shadow image.
[0014] In a second aspect, an embodiment of the present application provides an object processing system, the system comprising: an image acquisition device, an actuator, and a controller;
[0015] The image acquisition device comprises: an image sensor and at least three different color light sources; the at least three different color light sources are arranged around the object, and the optical axes of any two light sources are not parallel;
[0016] The actuator comprises: an actuator body and an end actuator;
[0017] The controller is communicatively connected with the image acquisition device and the actuator respectively;
[0018] The controller is used to implement the steps of the object calibration method described in claim 1 or 2.
[0019] In a third aspect, an embodiment of the present application provides a calibration device for an object, the calibration device comprising:
[0020] A first acquisition module, used for acquiring a first shadow image of each light source on the surface of the object before object calibration;
[0021] A first obtaining module, used for obtaining first normal information of the surface of the object based on the first shadow image;
[0022] The object calibration module is used to generate a motion instruction based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object, thereby completing the object calibration.
[0023] In a fourth aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the object calibration method described above when executing the computer program.
[0024] In a fifth aspect, the present application example provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the object calibration method described above are implemented.
[0025] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0026] In an embodiment of the present application, the force applied during object calibration is no longer a vector predefined in a design drawing, but a suitable force vector sequence distribution is given according to the individual differences of the object detected during production, thereby quantifying the difference between the manufacturing results of the object's hardware and the design parameters, thereby improving the accuracy of the calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0028] Figure 1 is a system architecture diagram of an embodiment of an object processing system of the present application;
[0029] Figure 2 A schematic diagram of an embodiment of normal information of an object surface of the present application;
[0030] Figure 3 is a flow chart of an embodiment of a method for detecting defects of an object of the present application;
[0031] Figure 4 is a flow chart of an embodiment of a method for calibrating an object of the present application;
[0032] Figure 5 is a structural block diagram of an embodiment of a defect detection device for an object of the present application;
[0033] Figure 6 is a structural block diagram of an embodiment of an object calibration device of the present application;
[0034] Figure 7 It is a structural diagram of an embodiment of a computer device of the present application. DETAILED DESCRIPTION
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0038] like Figure 1 As shown, Figure 1 It is a system architecture diagram of an embodiment of the object processing system of the present application.
[0039] The embodiment of the present application provides an object processing system 100, which can complete object calibration and object defect detection based on the same processing system.
[0040] For ease of understanding, the present application embodiment takes the object as a force / tactile sensor 200 including a curved surface as an example for detailed description. In addition, the object described in the present application embodiment can also be set as other objects with similar properties as needed. It should be noted that the surface of the object can be any shape such as a curved surface, a flat surface, etc., and this application does not limit it.
[0041] The force / tactile sensor 200 refers to a force sensor and / or a tactile sensor.
[0042] The force sensor may be, but is not limited to, a two-dimensional or multi-dimensional force sensor for measuring two-dimensional or multi-dimensional force data.
[0043] Tactile sensors are a type of sensing device that can be placed on end effectors, etc., and can measure contact force information. The implementation of tactile sensors includes flexible contact surfaces, sensing circuits, computing devices, and contact force information analysis algorithms.
[0044] Specifically, the force / tactile sensor may include an integral sensing unit or a plurality of sensing units arranged in an array, etc., all of which fall within the scope of protection of the present application.
[0045] An embodiment of the present application provides an object processing system 100 , which includes: an image acquisition device 110 , an actuator 120 and a controller 130 .
[0046] Image acquisition device
[0047] The image acquisition device 110 includes: an image sensor 111 and at least three different color light sources; the at least three different color light sources are arranged around the object, and the optical axes of any two light sources are not parallel.
[0048] like Figure 1 As shown, in one embodiment, the three different color light sources include: a red light source 112, a blue light source 113, and a green light source 114. By using three primary colors of light, the shadow of the object corresponding to each color of light can be obtained by capturing the image of the object once by the image sensor in the following embodiments. In addition, other color light sources can be used as needed. If other color light is used, it may be necessary to capture the shadow of the object corresponding to each light source multiple times. Three monochromatic light sources are arranged around the force / tactile sensor 200.
[0049] It should be noted that the number of the above light sources is at least 3, and any number more than 3 can be used as required. The multiple light sources ensure at least three different colors.
[0050] In one embodiment, three different color light sources are substantially equidistantly arranged around the object to be measured, which can improve the accuracy of the calculation results. In addition, the three light sources can also be arranged at other angles and positions as needed, as long as the axes of any two light sources are not parallel, they are within the scope of protection of this application, wherein the axis of the light source refers to the direction of light propagation.
[0051] Actuator
[0052] The effector 120 may include an effector body 121 and an end effector 122 .
[0053] Specifically, the actuator may be, but is not limited to, a robot (such as a robotic arm or a humanoid robot); an XYZ platform or an actuator including an XYZ platform. For ease of understanding, the embodiments of the present application are mainly described in detail by taking the actuator as a robotic arm as an example.
[0054] An end effector 122 is disposed at the effector end of the effector body 121 so as to apply a force for object calibration to the surface of the object through the end effector.
[0055] Controller
[0056] The controller 130 is connected to the image sensor 111 and the actuator 121 respectively by wired or wireless communication. For the definition of the controller, please refer to the description of the object surface defect detection method in the following embodiment.
[0057] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future.
[0058] The controller in the embodiments of the present application may be, but is not limited to: a computer terminal (Personal Computer, PC); an industrial control computer terminal (Industrial Personal Computer, IPC); a mobile terminal; a server; a system including a terminal and a server, and implemented through the interaction between the terminal and the server; a programmable logic controller (Programmable Logic Controller, PLC); a field programmable gate array (Field-Programmable Gate Array, FPGA); a digital signal processor (Digital Signal Processer, DSP) or a microcontroller unit (Microcontroller unit, MCU). The controller generates program instructions according to a pre-fixed program and combines the data output by the image sensor, actuator, etc. For example, it can be applied to Figure 7 In the computer device shown.
[0059] The controller 130 described in the embodiment of the present application may be an independent controller, or may be fully or partially integrated in the image acquisition device 110 and the actuator 120, etc., and the present application does not make any limitation thereto.
[0060] It should be noted that the image acquisition device, actuator, and object mentioned in the embodiments of the present application can be a real object in a real environment or a virtual object in a simulation platform, and the simulation environment is used to achieve the effect of connecting to the real object. The controller trained in a virtual environment can be transplanted to a real environment to control or retrain the real object, which can save resources and time in the training process.
[0061] In one embodiment, the object defect detection method provided in the embodiment of the present application is generally composed of the above embodiment. Figure 1 The controller 130 of the object processing system described in the embodiment is executed, and accordingly, the defect detection device for the object is generally arranged in the controller 130 of the object processing system.
[0062] like Figure 3 As shown, Figure 3 The present invention provides a method for detecting defects in an object, which may include the following steps:
[0063] In step 210 , after the object is calibrated, a second shadow image of each light source on the surface of the object is obtained.
[0064] Step 220 obtains second normal information of the object surface based on the second shadow image.
[0065] Step 230 compares the difference between the first normal information and the second normal information of the object surface before object calibration.
[0066] Step 240 generates a calibrated defect detection result of the object surface based on the difference.
[0067] The embodiment of the present application compares the difference between the first normal information of the object before calibration and the second normal information after calibration; and calculates the defect detection result on the object surface based on the difference. This can reduce the accuracy requirements of the real acquisition light source and visual acquisition equipment, and there is no need to collect negative samples for training, thereby reducing the costs of hardware, software, etc. on the basis of high recognition of defect detection.
[0068] For ease of understanding, the above method steps are further described in detail below.
[0069] In step 210 , after the object is calibrated, a second shadow image of each light source on the surface of the object is obtained.
[0070] In one embodiment, after the object is calibrated, the controller obtains the second shadow image of the object under the illumination of at least three monochromatic light sources, or the second shadow image after some preprocessing, collected by the image sensor, from the memory or the server according to the preset address. Specifically, the calibration method can be calibrated by various existing or future developed method steps.
[0071] It should be noted that, based on the foregoing embodiments, the second shadow image may be an image including multiple shadows corresponding to multiple light sources; in addition, it may also be multiple images, each image including a shadow corresponding to one light source.
[0072] In the embodiment of the present application, taking the force / tactile sensor as an example, it is possible that the force / tactile sensor is damaged during the calibration process (for example, in the process of controlling the actuator to press the force / tactile sensor, defects such as breakage and dents may occur on the surface of the force / tactile sensor). Therefore, defect detection is performed on the calibrated force / tactile sensor based on the defect detection method described in the embodiment of the present application.
[0073] Step 220 obtains second normal information of the object surface based on the second shadow image.
[0074] In one embodiment, step 220 may include the following method steps:
[0075] Step 221 calculates the second normal information of the object surface based on the second shadow image and formula (1).
[0076] M=ELNP (1)
[0077] Among them, E represents the intensity of the light source, L represents the light source direction vector, N represents the second normal information, P represents the reflectivity of the object surface, and M is the pixel light intensity of the second shadow image.
[0078] In the embodiment of the present application, assuming that there are three light sources of different colors and the optical axes of any two light sources are not parallel, the normal vector N (ie, the second normal information) of the surface of the object being measured can be solved based on formula (1).
[0079] like Figure 2 As shown, Figure 2 FIG. 1 is a schematic diagram of an embodiment of the model normal information of the object surface of the present application. For example, based on formula (1), the following can be obtained: Figure 2 The second normal information N of the object surface shown in .
[0080] In the embodiment of the present application, since all variables in formula (1) are matrices, vectors in all directions of the surface of the object can be solved at one time.
[0081] Step 230 compares the difference between the first normal information and the second normal information of the object surface before object calibration.
[0082] In one embodiment, step 230 may include the following method steps:
[0083] Step 231 calculates the average difference AD (AerageDistance) between the first normal information and the corresponding second normal information of the plurality of detection points based on formula (2).
[0084]
[0085] Among them, x ij Represents the first normal information of the i-th detection point; y ij Represents the second normal information of the i-th detection point; n represents the total number of detection points.
[0086] Specifically, the mathematical meaning of the above formula (2) is the average difference (AD) between two vector sets, which can reflect the average difference of the entire surface.
[0087] Step 232 calculates the single-point difference Dj between the first normal information and the corresponding second normal information of each detection point based on formula (3).
[0088]
[0089] Among them, Distance j represents a single point difference; x j Represents the first normal information of a single detection point; y j Represents the second normal information of a single detection point.
[0090] Step 240 generates a calibrated defect detection result of the object surface based on the difference.
[0091] In one embodiment, step 240 may include the following method steps:
[0092] Step 241 combines the average difference and the individual differences to generate a defect detection result of the object.
[0093] In one embodiment, it can be assumed that the threshold of the average difference is t_1 and the threshold of the single point difference is t_2.
[0094] When AD is greater than t_1 or Dj is greater than t_2, it will be considered unqualified (the actual surface is too different from the designed surface).
[0095] The embodiment of the present application can obtain the average difference between the first normal information and the second normal information corresponding to multiple detection points, and the single point difference between the first normal information and the second normal information corresponding to each detection point, respectively, through the above method steps. In practical applications, both individuals with excessive average errors and individuals with excessive errors at some points are detected, and defect assessment is performed from two perspectives. Any incorrect assessment result is considered to be a defect, thereby improving the overall recognition accuracy of the final defect detection.
[0096] The embodiment of the present application compares the difference between the first normal information of the object before calibration and the second normal information after calibration; and calculates the defect detection result on the object surface based on the difference. This can reduce the accuracy requirements of the real acquisition light source and visual acquisition equipment, and there is no need to collect negative samples for training, thereby reducing the costs of hardware, software, etc. on the basis of high recognition of defect detection.
[0097] In addition, defect detection based on the above-mentioned normal information difference does not limit the surface shape of the object, and defect detection can be performed on the surfaces of objects of various shapes including curved surfaces, flat surfaces, etc., thereby increasing the scope of application of surface defect detection of objects.
[0098] In one embodiment, before step 210, the object defect detection method described in the embodiment of the present application may further include the following method steps:
[0099] Step 240 is to obtain a first shadow image of each light source on the surface of the object before object calibration.
[0100] In one embodiment, before object calibration, the controller obtains a first shadow image of the object under illumination of at least three monochromatic light sources acquired by an image sensor or the first shadow image after some preprocessing from a memory or a server according to a preset address.
[0101] For other descriptions about the first shadow image, please refer to the second shadow image, which will not be repeated here.
[0102] Step 250 obtains first normal information of the object surface based on the first shadow image.
[0103] In one embodiment, step 250 may include the following method steps:
[0104] Step 251 calculates the first normal information of the object surface based on the first shadow image and in combination with formula (4).
[0105] M′=ELN′P (4)
[0106] Wherein, E represents the intensity of the light source, L represents the direction vector of the light source, N' represents the first normal information, P represents the reflectivity of the object surface, and M' represents the pixel light intensity of the first shadow image.
[0107] The embodiment of the present application uses the above method steps to perform first normal information detection on the object before object calibration.
[0108] In one embodiment, after step 250 and before step 210, the object defect detection method described in the embodiment of the present application may further include the following method steps:
[0109] Step 260 generates a motion instruction based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object to complete the calibration of the object.
[0110] Specifically, various existing or future developed methods may be used to generate motion instructions based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object to complete the calibration of the object.
[0111] In one embodiment, the direction vector of the calibration force is the same as the vector direction of the first normal information.
[0112] In an embodiment of the present application, the force applied during object calibration is no longer a vector predefined in a design drawing, but a suitable force vector sequence distribution is given according to the individual differences of the object detected during production, thereby quantifying the difference between the manufacturing results of the object's hardware and the design parameters, thereby improving the accuracy of the calibration.
[0113] It should be noted that the contact points where the actuator applies contact force to the surface of the object can be generated uniformly or randomly on the surface of the object to be measured as needed. The data abundance of the distribution of contact points on the surface of the object can depend on the structure of the object to be measured and the accuracy requirements of each area. For example, when the object to be measured is a matrix force sensor, the area with more calibration detection points will have higher accuracy than other areas after calibration, so more dense contact points may be required.
[0114] In one implementation, there are usually multiple calibration detection points on the surface of an object. Therefore, corresponding to the multiple calibration detection points, based on the processing system described in the previous embodiment, the structures such as the convex body set on the end effector in the actuator can apply contact force at one or more contact points on the surface of the object based on the motion instructions to achieve point contact with the surface of the object.
[0115] In one embodiment, the object calibration method provided in the embodiment of the present application is generally composed of the above embodiment. Figure 1 The controller 130 of the object processing system described in the embodiment is executed, and accordingly, the calibration device for the object is generally arranged in the controller 130 of the object processing system.
[0116] like Figure 3 As shown, Figure 3 The present invention provides a method for calibrating an object, which may include the following steps:
[0117] Step 310 obtains a first shadow image of each light source on the surface of the object.
[0118] Step 320 obtains first normal information of the object surface based on the first shadow image.
[0119] In one embodiment, step 320 may include the following method steps:
[0120] Step 321 calculates the first normal information of the object surface based on the first shadow image and in combination with formula (4).
[0121] M′=ELN′P (4)
[0122] Wherein, E represents the intensity of the light source, L represents the direction vector of the light source, N' represents the first normal information, P represents the reflectivity of the object surface, and M' represents the pixel light intensity of the first shadow image.
[0123] Step 330 generates a motion instruction based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object to complete the calibration of the object.
[0124] For other related descriptions of step 310 to step 330, please refer to the above embodiment, which will not be repeated here.
[0125] In an embodiment of the present application, the force applied during object calibration is no longer a vector predefined in a design drawing, but a suitable force vector sequence distribution is given according to the individual differences of the object detected during production, thereby quantifying the difference between the manufacturing results of the object's hardware and the design parameters, thereby improving the accuracy of the calibration.
[0126] In addition, the embodiments of the present application can realize object calibration and / or object defect detection functions based on the same system, thereby effectively reducing the overall hardware cost.
[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0128] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0129] Further references Figure 5 , as a response to the above Figure 3 In order to realize the method shown in the figure, the present application provides an embodiment of a defect detection device for an object, and the device embodiment is Figure 3 Corresponding to the embodiment of the object defect detection method shown, the device can be specifically applied to various controllers.
[0130] like Figure 3 As shown, the defect detection device 200 of an object in an embodiment of the present application may include:
[0131] A second acquisition module 210 is used to acquire a second shadow image of each light source on the surface of the object after the object is calibrated;
[0132] A second obtaining module 220, configured to obtain second normal information of the object surface based on the second shadow image;
[0133] A difference comparison module 230, used to compare the difference between the first normal information and the second normal information of the object surface before the object is calibrated;
[0134] The defect detection module 240 is used to generate a defect detection result of the calibrated object surface based on the difference.
[0135] In one embodiment, the light source is at least three different color light sources, and the optical axes of any two light sources are not parallel; the second obtaining module 220 may include:
[0136] A first obtaining submodule, used for obtaining second normal information based on the second shadow image and in combination with formula (1);
[0137] M=ELNP (1)
[0138] Among them, E represents the intensity of the light source, L represents the direction vector of the light source, N represents the second normal information, P represents the reflectivity of the object surface; and M represents the pixel light intensity of the second shadow image.
[0139] In one embodiment, the difference comparison module 230 may include:
[0140] An average obtaining submodule, used for obtaining an average difference AD between the first normal information and the corresponding second normal information of a plurality of detection points based on formula (2);
[0141]
[0142] Among them, x ij Represents the first normal information of the i-th detection point; y ij Represents the second normal information of the i-th detection point; n represents the total number of detection points;
[0143] A single point obtaining submodule, used for obtaining the single point difference between the first normal information and the corresponding second normal information of each detection point based on formula (3);
[0144]
[0145] Among them, Distance j represents a single point difference; x j Represents the first normal information of a single detection point; y j Represents the second normal information of a single detection point.
[0146] In one embodiment, the defect detection module 240 may include:
[0147] The result generation submodule 241 is used to generate a defect detection result of the object by combining the average difference and the individual difference.
[0148] In one embodiment, after the object is calibrated and before obtaining the second shadow image of each light source on the surface of the object, the defect detection device 200 may further include:
[0149] A first acquisition module, used for acquiring a first shadow image of each light source on the surface of the object before object calibration;
[0150] The first obtaining module is used to obtain first normal information of the object surface based on the first shadow image.
[0151] Further, in one embodiment, the first obtaining module may include:
[0152] The first obtaining submodule is used to obtain first normal information of the surface of the object based on the first shadow image in combination with formula (4).
[0153] M′=ELN′P (4)
[0154] Wherein, E represents the intensity of the light source, L represents the direction vector of the light source, N' represents the first normal information, P represents the reflectivity of the object surface, and M' represents the pixel light intensity of the first shadow image.
[0155] In one embodiment, after obtaining the first normal information of the object surface based on the first shadow image, after the object is calibrated, and before obtaining the second shadow image of each light source on the object surface, the defect detection device 200 may further include:
[0156] The sensor calibration module is used to generate a motion instruction based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object, thereby completing the object calibration.
[0157] Further references Figure 6 , as a response to the above Figure 4 In order to realize the method shown in the figure, the present application provides an embodiment of a calibration device for an object, and the device embodiment is similar to Figure 4 Corresponding to the embodiment of the object calibration method shown, the device can be specifically applied to various controllers.
[0158] like Figure 3 As shown, the object calibration device 300 of the embodiment of the present application includes:
[0159] A first acquisition module 310 is used to acquire a first shadow image of each light source on the surface of the object before the object is calibrated;
[0160] A first obtaining module 320, configured to obtain first normal information of the object surface based on the first shadow image;
[0161] The object calibration module 330 is used to generate a motion instruction based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object, thereby completing the object calibration.
[0162] In one embodiment, the first obtaining module 320 may include:
[0163] The first obtaining submodule is used to obtain first normal information of the surface of the object based on the first shadow image in combination with formula (4).
[0164] M′=ELN′P (4)
[0165] Wherein, E represents the intensity of the light source, L represents the direction vector of the light source, N' represents the first normal information, P represents the reflectivity of the object surface, and M' represents the pixel light intensity of the first shadow image.
[0166] Please refer to Figure 7 In order to solve the above technical problems, the embodiment of the present application also provides a controller (taking computer device 6 as an example).
[0167] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 with components 61-63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0168] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0169] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk equipped on the computer device 6, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as the program code of the defect detection and / or calibration method of the object. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.
[0170] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run the program code or process data stored in the memory 61, such as the program code of the defect detection and / or calibration method of the object.
[0171] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
[0172] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an object defect detection and / or calibration program, and the object defect detection and / or calibration program can be executed by at least one processor so that the at least one processor performs the steps of the object defect detection and / or calibration method as described above.
[0173] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0174] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for calibrating an object, characterized in that: The calibration method comprises the following steps: Before object calibration, a first shadow image of each light source on the surface of the object is obtained; Obtaining first normal information of the surface of the object based on the first shadow image; A motion instruction is generated based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object, thereby completing the object calibration.
2. The object defect detection method according to claim 1, characterized in that: The light sources are at least three different color light sources, and the optical axes of any two light sources are not parallel; obtaining the first normal information of the surface of the object based on the first shadow image comprises the following steps: Based on the first shadow image, the first normal information is obtained in combination with formula (1); M′=ELN′P (4) Wherein, E represents the intensity of the light source, L represents the direction vector of the light source, N' represents the first normal information, P represents the reflectivity of the object surface, and M' represents the pixel light intensity of the first shadow image.
3. A system for processing an object, characterized in that: The system comprises: an image acquisition device, an actuator and a controller; The image acquisition device comprises: an image sensor and at least three different color light sources; the at least three different color light sources are arranged around the object, and the optical axes of any two light sources are not parallel; The actuator comprises: an actuator body and an end actuator; The controller is communicatively connected with the image acquisition device and the actuator respectively; The controller is used to implement the steps of the object calibration method described in claim 1 or 2.
4. A device for calibrating an object, characterized in that: The calibration device comprises: A first acquisition module, used for acquiring a first shadow image of each light source on the surface of the object before object calibration; A first obtaining module, used for obtaining first normal information of the surface of the object based on the first shadow image; The object calibration module is used to generate a motion instruction based on the first normal information to instruct the actuator to apply a calibration force to the surface of the object, thereby completing the object calibration.
5. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the object calibration method described in claim 1 or 2 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the object calibration method described in claim 1 or 2 are implemented.
