Method for acquiring apparent image of automobile spraying part

Through neural network and laser positioning technology, combined with the three-dimensional coordinate system, precise multi-angle image collection of automobile parts is achieved, solving the problems of low manual detection efficiency and inaccurate image reflection, and improving detection efficiency and accuracy.

CN118688218APending Publication Date: 2024-09-24GUANGZHOU MARITIME INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410517604.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In the existing technology, the spray appearance quality inspection of automobile parts relies on artificial naked eye observation, which is inefficient and difficult to meet the requirements of speed, accuracy and stability, and image collection is difficult to reflect the appearance of non-planar parts.

Method used

A camera and a robotic arm are used to identify the type of parts through a neural network, calculate deviation information, and combine laser positioning and a three-dimensional coordinate system to achieve accurate multi-angle acquisition of the camera, avoid the impact of placement errors, and reduce costs.

Benefits of technology

It improves detection efficiency, provides accurate image collection, simplifies the workflow, adapts to multi-angle collection of non-planar shape parts, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000
    Figure 00000000_0000
Patent Text Reader

Abstract

The invention relates to an automobile spraying part apparent image acquisition method. A first camera and a mechanical arm are fixedly arranged above a conveying belt, and a second camera is arranged at the bottom end of the mechanical arm. The method comprises the following steps: establishing a three-dimensional coordinate system O-XYZ by taking a shooting area of a first camera on a conveyor belt as an XY plane, and establishing grid coordinates on the XY plane; when the automobile parts move to the preset shooting position, the conveying belt is stopped; a first image which is shot by a first camera and contains an automobile part is input into a neural network to obtain the type of the automobile part, so that reference coordinates and a collection sequence of a plurality of collection point positions when the automobile part is located at a preset reference position are obtained; and the deviation information of the actual position of the automobile part relative to the reference position is calculated based on the first image, then the second camera is moved to the position above all the actual collection point positions in sequence through the mechanical arm according to the reference coordinates, the deviation information and the collection sequence of the multiple collection point positions, and image collection is conducted on the automobile part.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of automobile technology, and in particular relates to a method for collecting surface images of automobile spray-painted parts. Background Art

[0002] The appearance quality inspection of automobile parts spraying is an important part of the production logistics process of automobile enterprises. In recent years, the automobile industry has developed rapidly, and the market demand for automobiles has been rising. Therefore, the demand for automobile components has also increased, and the appearance requirements have become higher and higher. The appearance of the parts is the automobile part that is finally presented to consumers. Therefore, whether from the perspective of appearance or market requirements, the abnormal detection of the surface of automobile parts is an indispensable key link in the production line. At present, the appearance quality inspection of automobile parts spraying is mainly carried out by workers on the production line. The surface defects of automobile parts on the conveyor belt are detected by naked eye observation. However, due to the different structures of automobile parts, the manual inspection method is inefficient and the workload is large. This inspection method is increasingly difficult to meet the increasingly high requirements of fast, accurate and stable production process of automobile parts spraying. There are also intelligent discrimination methods through image recognition. However, the shapes of automobile parts are different, and the surface shape is not a plane shape. This makes it inconvenient for the camera to collect images of automobile parts, and the collected images cannot reflect the appearance of automobile parts well. Summary of the invention

[0003] The purpose of the present invention is to solve the problems and shortcomings existing in the background technology and to provide a method for collecting surface images of automobile spray-painted parts.

[0004] The present invention is achieved through the following technical solutions:

[0005] A method for collecting surface images of automobile spray parts comprises a first camera, a mechanical arm and a second camera, wherein the first camera is fixed above a conveyor belt, the mechanical arm is located on one side of the first camera and fixed above the conveyor belt, and the second camera is arranged at the bottom end of the mechanical arm; the method comprises the following steps:

[0006] Determine the shooting area of ​​the first camera on the conveyor belt, use the shooting area as the XY plane, establish a three-dimensional coordinate system O-XYZ, and establish grid coordinates on the XY plane;

[0007] Determine whether the automobile parts on the conveyor belt have moved to the preset shooting position, and if so, stop the conveyor belt;

[0008] A first image containing automobile parts is captured by a first camera, and the first image is input into a constructed neural network to obtain types of automobile parts in the first image;

[0009] According to the types of automobile parts, the reference coordinates and collection order of the preset multiple collection points are obtained when the automobile parts are in the preset reference positions;

[0010] Calculating deviation information of an actual position of the automobile component relative to a reference position based on the first image;

[0011] According to the quasi-base coordinates, deviation information and acquisition sequence of multiple acquisition points, the second camera is moved in sequence to above each acquisition point when the automobile parts are in the actual position by the robotic arm, and the image of the automobile parts is acquired by the second camera.

[0012] Furthermore, it also includes a laser transmitter and a laser receiver, which are arranged at a preset shooting position behind the conveyor belt in the forward direction, and are respectively arranged on both sides of the conveyor belt;

[0013] The step of determining whether the automobile parts on the conveyor belt have moved to the preset shooting position includes:

[0014] When the laser receiver does not receive the laser emitted by the laser transmitter, determining whether the laser receiver can receive the laser emitted by the laser transmitter;

[0015] If so, it is determined that the automobile parts on the conveyor belt move to the preset shooting position.

[0016] Furthermore, the step of calculating the deviation information of the actual position of the automobile component relative to the reference position based on the first image includes:

[0017] Performing contour recognition on the automobile parts in the first image to obtain edge contours of the automobile parts in the first image;

[0018] Taking a certain point on the edge contour as the starting point and a preset distance as the interval, the edge contour of the automobile parts is sampled to obtain multiple contour points, and the coordinates of each contour point are recorded;

[0019] For multiple contour points, the distance between the contour points is calculated two by two, and the two contour points with the largest distance are recorded as A1 and B1 respectively;

[0020] Establish vector OA1 and vector OB1, calculate the angle β1 between vector OA1 and the X-axis or Y-axis, calculate the angle γ1 between vector OB1 and the X-axis or Y-axis, where O is the origin of the coordinate system;

[0021] Get the predetermined points A0 and B0, vectors OA0 and OB0, and vector OA when the automobile parts are in the preset reference position o The angle β0 between the vector OB0 and the X-axis or Y-axis and the angle γ0 between the vector OB0 and the X-axis or Y-axis;

[0022] Calculate the distance deviation L of A1 relative to A0 A , the distance deviation L between B1 and B0 B 、The modulus deviation T of vector OA1 relative to vector OA0 A , the modulus deviation T of vector OB1 relative to vector OB0 B 、The angle deviation θ of vector OA1 relative to vector OA0 A 、The angle deviation θ of vector OB1 relative to vector OB0 B , get the deviation information L of the actual position of the automobile parts relative to the reference position A , L B , T A , T B ,θ A and θ B .

[0023] Furthermore, the step of performing contour recognition on the automobile parts in the first image to obtain the edge contour of the automobile parts in the first image includes:

[0024] Performing grayscale value conversion on the first image, and performing binarization processing on the image after the grayscale value conversion to obtain a binarized image;

[0025] Perform contour detection on the binary image to obtain multiple closed contours;

[0026] The perimeters of multiple closed contours are calculated, and the closed contour with the smallest difference between the perimeter and the actual perimeter of the automobile part is taken as the edge contour of the automobile part.

[0027] Compared with the prior art, the beneficial effects of the present invention are as follows: the collection and classification are carried out according to the types of automobile parts, the work process is simplified, the work efficiency is improved, and the collection error is adjusted in combination with the placement contour of the automobile parts to avoid the influence of the placement error on the automatic collection of automobile parts images by the robot arm; the automobile parts images are collected from multiple angles to provide accurate images for the subsequent surface quality identification of automobile parts, thereby avoiding the influence of the irregularity of the sprayed surface of automobile parts; a three-dimensional coordinate system is established to provide spatial coordinate information for the collection points of the collected images, which is convenient for the precise movement of the robot arm, so that the camera can accurately collect automobile parts images from multiple angles, and the use of a single camera instead of multiple cameras to collect images can reduce costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart of the steps of the method for collecting the surface image of the automobile spray-painted parts of the present invention;

[0029] Figure 2 It is a collection schematic diagram of the surface image collection method of automobile spray-painted parts of the present invention;

[0030] Figure 3 It is a schematic diagram of an automobile component being in a reference position in the method for collecting the surface image of an automobile spray-painted part of the present invention;

[0031] Figure 4 It is a schematic diagram of automobile parts in actual positions in the method for collecting the surface image of automobile spray-painted parts of the present invention;

[0032] Figure 5 The figure is a schematic diagram of the collection points of a certain automobile component in the surface image collection method of automobile spray-painted parts of the present invention.

[0033] In the figure, 10 is a first camera, 20 is a robotic arm, 30 is a second camera, 40 is a laser transmitter, 50 is a laser receiver, 60 is a conveyor belt, and 70 is an automobile component. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0035] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0037] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0038] In the description of the present invention, it should be noted that the terms "upper", "lower", "inside", "outside", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, or are directions or positional relationships in which the product of the invention is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation on the present invention.

[0039] See also Figure 1 and Figure 2 , Figure 1 The following is a flow chart of the steps of the method for collecting the surface image of the automobile spray-painted parts of the present invention. Figure 2 The present invention is a schematic diagram of the surface image acquisition method of automobile spray-painted parts. A surface image acquisition method of automobile spray-painted parts includes a first camera 10, a mechanical arm 20 and a second camera 30. The first camera 10 is fixed above a conveyor belt 60. The mechanical arm 20 is located on one side of the first camera 10 and fixed above the conveyor belt 60. The second camera 30 is arranged at the bottom end of the mechanical arm 20, and the second camera 30 is driven to move by the mechanical arm 20. The mechanical arm 20 preferably adopts a six-axis mechanical arm 20.

[0040] The surface image acquisition method of automobile spray-painted parts includes the following steps:

[0041] S1, determining the shooting area of ​​the first camera 10 on the conveyor belt 60, taking the shooting area as the XY plane, establishing a three-dimensional coordinate system O-XYZ, and establishing grid coordinates on the XY plane;

[0042] S2, determining whether the automobile parts 70 on the conveyor belt 60 have moved to the preset shooting position, and if so, stopping the conveyor belt 60;

[0043] S3, taking a first image containing the automobile component 70 by the first camera 10, and inputting the first image into the constructed neural network to obtain the type of the automobile component 70 in the first image;

[0044] S4. According to the type of the automobile component 70, the reference coordinates and collection order of the preset multiple collection points are obtained when the automobile component 70 is in the preset reference position;

[0045] S5, calculating deviation information of the actual position of the automobile component 70 relative to the reference position based on the first image;

[0046] S6. According to the quasi-base coordinates, deviation information and acquisition sequence of multiple acquisition points, the second camera 30 is moved in sequence to the top of each acquisition point when the automobile component is in the actual position through the robot arm 20, and the automobile component 70 is imaged through the second camera 30.

[0047] In the above step S1, the shooting area of ​​the conveyor belt 60 is first determined by the first camera 10. Figure 2 As shown, the lower left corner of the shooting area is taken as the coordinate origin O, the forward direction of the conveyor belt 60 is the X-axis, the vertical upward direction on the conveyor belt 60 is the Y-axis, and the direction perpendicular to the XY plane (conveyor belt 60) is the Z-axis. A three-dimensional spatial coordinate system O-XYZ is established. At the same time, actual coordinate scales can be assigned on the X-axis, Y-axis and Z-axis according to the size of the shooting area, the position height of the first camera 10, etc., as shown in FIG. Figure 2 Then, a coordinate grid of 0.01 mm × 0.01 mm is established in the XY plane to provide spatial coordinate information for the acquisition points of the acquired image.

[0048] In the above step S2, when the conveyor belt 60 drives the automobile parts 70 to move to the preset collection position, such as moving to the bottom of the first camera 10, the conveyor belt is stopped to facilitate the subsequent robot arm 20 to drive the second camera 30 to collect the surface image of the automobile parts 70.

[0049] Furthermore, the method for collecting the surface image of the automobile spray-painted parts further includes a laser transmitter 40 and a laser receiver 50, which are arranged at a preset shooting position behind the conveyor belt 60 in the forward direction, and are respectively arranged on both sides of the conveyor belt 60;

[0050] In step S2, the step of determining whether the automobile parts 70 on the conveyor belt 60 have moved to the preset shooting position includes:

[0051] S21, when the laser receiver 50 does not receive the laser emitted by the laser transmitter 40, determining whether the laser receiver 50 can receive the laser emitted by the laser transmitter 40;

[0052] S22: If yes, it is determined that the automobile parts 70 on the conveyor belt 60 have moved to the preset shooting position.

[0053] In the above steps S21 to S22, before the automobile parts 70 move to the shooting area, the laser emitted by the laser transmitter 40 will be received by the laser receiver 50. Therefore, when the laser receiver 50 does not receive the laser emitted by the laser transmitter 40, it means that the front end of the automobile parts 70 has entered the designated shooting position, and the automobile parts 70 have blocked the laser emitted by the laser transmitter 40. When the laser receiver 50 receives the laser emitted by the laser transmitter 40 again, it means that the automobile parts 70 have all entered the shooting position, and the automobile parts 70 no longer block the laser emitted by the laser transmitter 40. At this time, the conveyor belt 60 can be stopped.

[0054] In the above step S3, since there are many types of auto parts 70 and the shapes of different types of auto parts 70 are quite different, it is necessary to first determine the types of auto parts 70 whose images need to be collected. Therefore, a neural network can be constructed in advance, the input of the neural network is an image containing auto parts 70, and the output is the type of auto parts 70 in the image. The construction and training of the neural network are existing technologies and will not be repeated here. The neural network can adopt a deep convolutional neural network. The first camera 10 is set just above the conveyor belt 60 as a global positioning camera to collect reference images of the auto parts 70 and the entire XY plane, and then the first image containing the auto parts 70 and the XY plane taken by the first camera 10 is input into the constructed neural network, and the type of the auto parts 70 in the first image is obtained by the neural network.

[0055] Please refer to Figure 5 , Figure 5 The schematic diagram of the collection points of a certain automobile component in the surface image collection method of automobile spraying parts of the present invention. In the above step S4, according to the characteristics of each type of automobile component 70 and the previous test verification, the multiple collection points and the collection order of each type of automobile component 70 that need to be imaged are pre-determined, and the reference positions of various types of automobile components 70 in the three-dimensional coordinate system are determined, and then the various types of automobile components 70 are placed at the reference positions, and the reference coordinates of the multiple collection points on the various types of automobile components 70 in the three-dimensional coordinate system are determined and recorded, and then the types of automobile components 70, the reference coordinates of the multiple collection points when the automobile components 70 are in the reference position, and the collection order of the multiple collection points are stored accordingly for subsequent use. Then, after the types of automobile components 70 on the conveyor belt 60 are obtained according to step S3, the reference coordinates and the collection order of the multiple collection points of the corresponding type of automobile components 70 can be obtained according to the pre-recorded and stored information.

[0056] Clear combination Figure 3 and Figure 4 , Figure 3 It is a schematic diagram of an automobile component in a reference position in the method for collecting the surface image of an automobile spray-painted part of the present invention, Figure 4 The figure is a schematic diagram of the actual position of the automobile parts in the method for collecting the surface image of the automobile spray parts of the present invention. In the above step S5, in the actual scene, the placement direction of the automobile parts 70 on the conveyor belt 60 is uncertain, so it is necessary to calculate the deviation information of the actual placement position of the automobile parts 70 relative to the reference position when the automobile parts 70 are moved to the shooting position, and the deviation information is used to allow the robot arm 20 to perceive the actual position of the automobile parts 70.

[0057] Furthermore, in step S5, the step of calculating the deviation information of the actual position of the automobile component 70 relative to the reference position includes:

[0058] S51, performing contour recognition on the automobile component 70 in the first image to obtain an edge contour of the automobile component 70 in the first image;

[0059] S52, taking a certain point on the edge contour as a starting point and taking a preset distance as an interval, sampling points on the edge contour of the automobile part 70 to obtain a plurality of contour points, and recording the coordinates of each contour point;

[0060] S53, for multiple contour points, calculating the distance between the contour points in pairs, and recording the two contour points with the largest distance as A1 and B1 respectively;

[0061] S54, establish vector OA1 and vector OB1, calculate the angle β1 between vector OA1 and the X axis or the Y axis, calculate the angle γ1 between vector OB1 and the X axis or the Y axis, where O is the origin of the coordinate system;

[0062] S55, obtaining the predetermined points A0 and B0, the vectors OA0 and OB0, and the vector OA when the automobile component 70 is in the preset reference position o The angle β0 between the vector OB0 and the X-axis or Y-axis and the angle γ0 between the vector OB0 and the X-axis or Y-axis;

[0063] S56, calculate the distance deviation L of A1 relative to A0 A , the distance deviation L between B1 and B0 B 、The modulus deviation T of vector OA1 relative to vector OA0 A , the modulus deviation T of vector OB1 relative to vector OB0 B 、The angle deviation θ of vector OA1 relative to vector OA0 A 、The angle deviation θ of vector OB1 relative to vector OB0 B, obtain the deviation information L of the actual position of the automobile component 70 relative to the reference position A , L B 、T A 、T B ,θ A and θ B .

[0064] In the above step S51, the contour recognition of the automobile component 70 can be performed by OpenCV-Python. Specifically, the following steps are included:

[0065] S511, performing grayscale value conversion on the first image, and performing binarization processing on the image after grayscale value conversion to obtain a binarized image;

[0066] S512, performing contour detection on the binary image to obtain multiple closed contours;

[0067] S513 , calculating the perimeters of multiple closed contours, and taking the closed contour whose perimeter is the smallest different from the actual perimeter of the automobile component 70 as the edge contour of the automobile component 70 .

[0068] In the above steps S511 to S513, each pixel of the first image is converted into a grayscale value, and then binarized to obtain a binary image. Then, the binary image is subjected to contour detection to obtain multiple closed contours, wherein contour detection refers to the process of ignoring the influence of the texture inside the background and the object and the noise interference in the image containing the object and the background, and using certain techniques and methods to realize the process of extracting the contour of the object. Since the surface shape of the automobile part 70 is not a planar shape, multiple closed contours will be obtained, and there will be an error range when fitting the contour, so the perimeter of all closed contours is calculated, and the perimeter of each closed contour is compared with the actual perimeter of the automobile part 70, and the contour with the smallest error between the perimeter and the actual perimeter of the automobile part 70 is selected as the final edge contour of the automobile part 70.

[0069] In the above step S52, a certain point on the edge contour is used as a starting point to sample points on the edge contour. The interval between the sampled points may be 0.01 mm, and the coordinates of each contour point sampled on the edge contour are recorded and maintained.

[0070] In the above step S53, according to the coordinates of each contour point, multiple contour points on the edge contour are traversed, the distance between any two contour points is calculated, and the calculated distances are compared to obtain the two contour points with the longest distance. These two contour points are respectively recorded as A1 and B1, thereby obtaining the coordinates of A1 (x A1 ,y A1 ), the coordinates of B1 (x B1 ,y B1).

[0071] In the above step S54, two vectors are established based on points A1 and B1, namely vector OA1 and vector OB1, and then the angle β1 between vector OA1 and the X-axis or Y-axis is calculated, and the angle γ1 between vector OB1 and the X-axis or Y-axis is calculated. In this embodiment, the coordinate value of B1 is greater than the coordinate value of A1, the angle β1 is the angle between vector OA1 and the Y-axis, and the angle γ1 is the angle between vector OB1 and the X-axis.

[0072] In the above step S55, the two points with the longest distance on the edge contour when the automobile component 70 is placed in the reference position are recorded in advance, and are respectively recorded as A0 and B0, and the coordinates (x A0 ,y A0 ) and the coordinates of B0 (x B0 ,y B0 ), and based on A0 and B0, vector OA0 and vector OB0 are established, and vector OA is recorded o The angle β0 with the X-axis or the Y-axis and the angle γ0 with the vector OB0 and the X-axis or the Y-axis, and A0, B0, vector OA0, vector OB0, β0, γ0 and the type of the automobile part 70 are stored correspondingly, so that later, according to the type of the automobile part 70, the corresponding A0, B0, vector OA0, vector OB0, β0 and γ0 of the automobile part 70 of this type when it is in the reference position can be obtained.

[0073] In the above step S55, the distance deviation L between A1 and A0 is calculated using the following formula: A , the distance deviation L between B1 and B0 B , the modulus T of vector OA1 relative to vector OA0 A , the modulus T of vector OB1 relative to vector OB0 B 、The angle deviation θ of vector OA1 relative to vector OA0 A 、The angle deviation θ of vector OB1 relative to vector OB0 B :

[0074]

[0075]

[0076]

[0077]

[0078]

[0079]

[0080] In the above step S6, based on the calculated deviation information, the reference coordinates of multiple acquisition points when the automobile component 70 is in the reference position, and the acquisition sequence, the robot arm 20 can sense the acquisition points when the automobile component 70 is in the actual position. For example, the actual coordinates of multiple acquisition points that need to be acquired for image acquisition when the automobile component 70 is in the actual position can be calculated through the deviation information and the reference coordinates of multiple acquisition points when the automobile component 70 is in the reference position. According to the calculated actual coordinates of the multiple acquisition points and the acquisition sequence of the multiple acquisition points, the robot arm 20 can control the second camera 30 to move in sequence to the top of the actual acquisition points when the automobile component is in the actual position in the acquisition sequence to acquire images of the automobile component 70, thereby obtaining multiple acquired images of the automobile component 70 to provide accurate images for subsequent apparent quality identification of the automobile component 70.

[0081] Compared with the prior art, the beneficial effects of the present invention are as follows: the automobile parts 70 are divided and collected into categories according to their types, the work process is simplified, the work efficiency is improved, and the collection error is adjusted in combination with the placement contour of the automobile parts 70 to avoid the influence of the placement error on the automatic collection of images of the automobile parts 70 by the robot arm 20; the images of the automobile parts 70 are collected from multiple angles to provide accurate images for the subsequent surface quality identification of the automobile parts 70, thereby avoiding the influence of the irregularities of the sprayed surfaces of the automobile parts 70; a three-dimensional coordinate system is established to provide spatial coordinate information for the collection points of the collected images, which is convenient for the precise movement of the robot arm 20, so that the camera can accurately collect images of the automobile parts 70 from multiple angles, and the use of a single camera instead of multiple cameras to collect images can reduce costs.

[0082] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A method for collecting surface images of automobile spray-painted parts, characterized in that: The method comprises a first camera, a mechanical arm and a second camera, wherein the first camera is fixed above a conveyor belt, the mechanical arm is located on one side of the first camera and fixed above the conveyor belt, and the second camera is arranged at the bottom end of the mechanical arm; the method comprises the following steps: Determine the shooting area of ​​the first camera on the conveyor belt, establish a three-dimensional coordinate system O-XYZ with the shooting area as the XY plane, and establish grid coordinates on the XY plane; Determine whether the automobile parts on the conveyor belt have moved to a preset shooting position, and if so, stop the conveyor belt; A first image containing automobile parts is captured by the first camera, and the first image is input into the constructed neural network to obtain the types of automobile parts in the first image; According to the type of the automobile component, obtaining the reference coordinates and collection order of a plurality of preset collection points when the automobile component is in a preset reference position; Calculating deviation information of the actual position of the automobile component relative to the reference position based on the first image; According to the quasi-base coordinates, deviation information and acquisition sequence of multiple acquisition points, the second camera is moved in sequence to above each acquisition point when the automobile component is in the actual position by the robotic arm, and the image of the automobile component is acquired by the second camera.

2. The method for collecting surface images of automobile spray-painted parts according to claim 1, characterized in that: It also includes a laser transmitter and a laser receiver, wherein the laser transmitter and the laser receiver are arranged at a preset shooting position behind the conveyor belt in the forward direction, and are respectively arranged on both sides of the conveyor belt; The step of determining whether the automobile parts on the conveyor belt have moved to the preset shooting position comprises: When the laser receiver does not receive the laser emitted by the laser transmitter, determining whether the laser receiver can receive the laser emitted by the laser transmitter; If so, it is determined that the automobile parts on the conveyor belt move to the preset shooting position.

3. The method for collecting surface images of automobile spray-painted parts according to claim 1, characterized in that: The step of calculating the deviation information of the actual position of the automobile component relative to the reference position based on the first image comprises: Performing contour recognition on the automobile parts in the first image to obtain edge contours of the automobile parts in the first image; Taking a certain point on the edge contour as a starting point and a preset distance as an interval, sampling points on the edge contour of the automobile part to obtain a plurality of contour points, and recording the coordinates of each contour point; For multiple contour points, the distance between the contour points is calculated two by two, and the two contour points with the largest distance are recorded as A1 and B1 respectively; Establish vector OA1 and vector OB1, calculate the angle β1 between vector OA1 and the X-axis or Y-axis, calculate the angle γ1 between vector OB1 and the X-axis or Y-axis, where O is the origin of the coordinate system; When the automobile component is in a preset reference position, the predetermined points A0 and B0, the vectors OA0 and OB0, and the vector OA o The angle β0 between the vector OB0 and the X-axis or Y-axis and the angle γ0 between the vector OB0 and the X-axis or Y-axis; Calculate the distance deviation L of A1 relative to A0 A , the distance deviation L of B1 relative to B0 B 、The modulus deviation T of vector OA1 relative to vector OA0 A , the modulus deviation T of vector OB1 relative to vector OB0 B 、The angle deviation θ of vector OA1 relative to vector OA0 A 、The angle deviation θ of vector OB1 relative to vector OB0 B , obtain the deviation information L of the actual position of the automobile part relative to the reference position A , L B 、T A 、T B ,θ A and θ B .

4. The method for collecting surface images of automobile spray-painted parts according to claim 3, characterized in that: The step of performing contour recognition on the automobile parts in the first image to obtain the edge contour of the automobile parts in the first image comprises: Performing grayscale value conversion on the first image, and performing binarization processing on the image after grayscale value conversion to obtain a binarized image; Performing contour detection on the binary image to obtain a plurality of closed contours; The perimeters of the plurality of closed contours are calculated, and the closed contour having the smallest difference between the perimeter and the actual perimeter of the automobile component is used as the edge contour of the automobile component.