Disclosure of Invention
The invention aims to provide a three-dimensional automatic detection method and a three-dimensional automatic detection system for the appearance of an automobile, aiming at the defects of the prior art. The object of the present invention can be achieved by the following technical means.
A three-dimensional automatic detection method for automobile appearance adopts a robot to cooperate with a laser scanner for detection, and comprises the following steps:
preprocessing before the automobile appearance detection;
driving the automobile into a detection space, dividing the automobile into a working area and a non-working area according to detection requirements, and marking the working area;
selecting a plurality of shooting points for shooting the appearance of the automobile in a working area, and moving the shooting points to each shooting point according to a preset track to shoot;
performing visual processing according to shooting to obtain position data of a working area, generating a 2D visual image of the outer contour of the automobile, identifying the 2D visual image of the marked working area, and calculating the position of the marked working area in a plane coordinate system through a calibration algorithm;
determining a starting point and an end point of the working area according to the position of the working area in the plane coordinate system, and scanning the outline of the automobile by moving from the starting point to the end point to generate point cloud data of a three-dimensional outline;
and generating a running track according to the point cloud data of the three-dimensional outline and automatically spraying the automobile body.
Preferably, the preprocessing before the detection of the automobile appearance includes:
determining a detection space, and arranging a moving mechanism at the periphery of the detection space;
a robot is taken and fixed on the moving mechanism, and the robot moves around the detection space along with the moving mechanism;
installing a 2D camera and a line laser scanner at the tail end of the robot;
and electrically connecting the moving mechanism, the robot and the control cabinet.
Preferably, the division into the working area and the non-working area includes: a reflecting layer is arranged on the boundary of the working area, and a black matte layer is arranged in the non-working area, so that an illumination reflection value difference is generated between the working area and the non-working area.
Preferably, generating a running track according to the point cloud data of the three-dimensional contour and automatically spraying the automobile body comprises the following steps:
converting the point cloud data into position data in a robot coordinate system according to a line laser scanner and a conversion matrix calibrated by the robot;
calculating normal phase attitude data of each point;
acquiring automobile contour position data according to the set robot track parameters of X-direction distance Nx and Y-direction distance Ny;
sequencing the automobile contour position data according to the X direction or the Y direction of a robot coordinate system, and sequentially sending the data to the robot;
and the robot receives the data to generate a running track and automatically spray the automobile body.
A computer-readable storage device stores a computer program that is executed by a processor to implement the above-described three-dimensional automatic detection method of the appearance of an automobile.
A mobile terminal, comprising:
a processor adapted to execute program instructions;
and the storage device is suitable for storing program instructions which are suitable for being loaded and executed by the processor to realize the three-dimensional automatic detection method of the appearance of the automobile.
A system for three-dimensional automatic detection of the appearance of an automobile comprises a server;
the server comprises a processor and a storage device;
a processor adapted to execute program instructions;
and the storage device is suitable for storing program instructions which are suitable for being loaded and executed by the processor to realize the three-dimensional automatic detection method of the appearance of the automobile.
Compared with the prior art, the invention has the beneficial effects that:
the invention discloses a three-dimensional automatic detection method and a three-dimensional automatic detection system for automobile outlines.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to specific embodiments, and it should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A three-dimensional automatic detection method for automobile appearance, as shown in figure 2, adopts a robot to cooperate with a laser scanner for detection, and comprises the following steps:
and (4) preprocessing before the automobile appearance detection. The preprocessing is mainly to build a detection system and provide an adaptive detection environment for subsequent detection. Specifically, firstly, a detection space is determined to ensure that the detection space is enough to accommodate the automobile for detection, and a moving mechanism is arranged at the periphery of the detection space and provides applicable conditions for photographing and scanning the outline of the automobile when the automobile is subsequently moved to different positions. And install 2D camera and line laser scanner at the robot end, the 2D camera is used for the fixed point to shoot, and line laser scanner is used for scanning the car appearance profile, with moving mechanism and robot and switch board electric connection moreover, is convenient for control moving mechanism and robot. That is, as shown in fig. 1, based on a computer platform, the computer platform controls the mechanical moving mechanism through an automatic device controller, the computer platform controls the 2D camera of the robot to take a picture and then transmits the picture to the computer platform for processing, and the computer platform also controls the laser scanner to scan and transmit the picture to the computer platform for processing.
The automobile is driven into the detection space and parked in the safe landmark boundary as required, so that the detection target is ensured to be free from interference with a moving mechanism of automatic equipment and the like. And according to the detection requirement, dividing the area into a working area and a non-working area, and marking the working area. The working area is an area for detecting the appearance of the automobile, the working area can be determined according to actual requirements, for example, only a local area of the appearance of the automobile needs to be detected, the working area only needs to be set in the local area, and similarly, the working area can be set for the whole appearance of the automobile to detect the whole appearance of the automobile. For better differentiation, can divide through subsides nursing, set up the reflector layer in the work area border, the reflector layer can be retro-reflective material's reflection of light sticker, set up black matte layer in the non-work area, can cover black matte paper in the non-work area to make work area and non-work area produce the illumination reflection value difference, can distinguish work area and non-work area fast through the illumination reflection value difference.
And selecting a plurality of shooting points for shooting the appearance of the automobile in the working area, and moving to each shooting point according to a preset track to shoot. Preferably, 9 shooting points are selected, the number of the shooting points is respectively 1-9, the number of the shooting points 1-3 are sequentially and uniformly distributed on the left side of the automobile, the number of the shooting points 4-6 are sequentially and uniformly distributed on the right side of the automobile, the number of the shooting points 7-9 are sequentially distributed above the automobile, and meanwhile, the distance between the shooting points in the same direction is also determined so as to calculate the position coordinate, thereby positioning the whole automobile or locally detecting the automobile.
And performing visual processing according to shooting to obtain position data of the working area, generating a 2D visual image of the outer contour of the automobile, identifying the 2D visual image of the marked working area, and calculating the position of the marked working area in a plane coordinate system through a calibration algorithm. The 2D visual image of the outer contour of the automobile refers to the whole image shot by the camera. The 2D visual image of the marked working area is the part of the whole image captured by the camera that is circled by the mark, such as the area of the middle mark circle shown in fig. 3, i.e. the outline area of the car to be detected. And obtaining the coordinate position of the image by using a plane coordinate calibration algorithm after obtaining the image. The calibration algorithm includes, but is not limited to, a hand-eye calibration algorithm, an opencv calibration algorithm, and an imu calibration algorithm.
And then performing line laser scanning, determining a starting point and an end point of the working area according to the position of the working area in the plane coordinate system, moving along the starting point to the end point to scan the outline of the automobile, and generating point cloud data of the three-dimensional outline.
The point cloud data is data in a relative plane coordinate system, however, a robot is finally adopted to detect and spray the automobile, in order to ensure that the spraying position is accurate, the point cloud data needs to be converted into data in the robot coordinate system, and a running track needs to be generated according to the point cloud data of the three-dimensional contour and the automobile body needs to be automatically sprayed. Specifically, point cloud data is converted into position data in a robot coordinate system according to a line laser scanner and a conversion matrix calibrated by the robot. Normal pose data for each point is calculated, including but not limited to pose angles and the like. The method comprises the steps of capturing position data according to a transverse distance value and a longitudinal distance value of a set coordinate point, namely obtaining automobile contour position data according to a set robot track parameter X-direction distance Nx and a set robot track parameter Y-direction distance Ny, sequencing the automobile contour position data according to the X direction or the Y direction of a robot coordinate system, sequentially sending the data to a robot, generating a running track matched with the contour of an automobile detection area according to the sequencing after the robot receives the data, and automatically spraying the automobile body by the robot along the running track.
The invention provides a three-dimensional automatic detection method and a system for automobile outlines, which are characterized in that a working area and a non-working area are divided in a detection space, shooting points are selected in the working area to generate a corresponding 2D visual image, the position of the working area in a plane coordinate system is calculated, point cloud data are generated through scanning and converting automobile outlines, the point cloud data are converted into position data in a robot coordinate system, a running track is further generated for automatic spraying, and therefore automatic detection spraying can be carried out on the automobile outlines instead of manual work, the spraying position is accurate, and the method and the system are convenient and fast. The automatic appearance detection device can be applied to the field of three-dimensional detection of more appearances, can simply and quickly realize automatic upgrading of appearance operation, liberates personnel from high-energy severe production environment, and saves production labor cost. The method is applied to three-dimensional detection of the appearance of the automobile body, realizes automatic spraying of the whole or local metal plate of the automobile body, diversifies the detection target, saves a great deal of work of a designer for programming and teaching the profiling track, shortens the design period and saves the design cost.
In addition, under the condition that automatic equipment cannot be used for moving detection or the cost is allowed, a plurality of detection devices can be matched with a computer platform, the detection devices are fixedly installed, and each detection device only detects one direction. In the occasion that the detection area is small and only one-way detection is needed, a detection device can be used together with a computer platform, and the detection device is fixedly arranged to detect only one direction.
In addition, one of ordinary skill in the art will understand that: all or part of the steps for implementing the method can be implemented by hardware related to program instructions, the program instructions can be stored in a computer readable storage medium or storage device, and the program instructions can execute the steps of the method when executed; and the aforementioned storage media or storage devices include, but are not limited to: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Accordingly, the embodiment of the present invention further provides a computer-readable storage device, which stores a computer program, wherein the computer program is executed by a processor to implement the method for three-dimensional automatic detection of the appearance of the automobile.
Further, the invention also provides a corresponding mobile terminal and a corresponding system for realizing the three-dimensional automatic detection method of the automobile appearance, which specifically comprises the following steps:
a mobile terminal, comprising:
a processor adapted to execute program instructions;
a storage device adapted to store program instructions adapted to be loaded and executed by a processor to implement the method of three-dimensional automated inspection of an exterior shape of an automobile.
A method for three-dimensional automatic detection of the appearance of an automobile comprises a server; the server comprises a processor and a storage device;
a processor adapted to execute program instructions;
a storage device adapted to store program instructions adapted to be loaded and executed by a processor to implement the method of three-dimensional automated inspection of an exterior shape of an automobile.
The present invention has been further described with reference to specific embodiments, but it should be understood that the detailed description should not be construed as limiting the spirit and scope of the present invention, and various modifications made to the above-described embodiments by those of ordinary skill in the art after reading this specification are within the scope of the present invention.