Porcelain bottle detection method, device and equipment based on image and detection system

By adopting an image-based detection method in the porcelain bottle detection system, using a variable pitch mechanism to collect the internal images of the porcelain bottle and perform feature processing, the problems of low manual detection efficiency and high cost in the prior art are solved, and efficient and accurate porcelain bottle detection is achieved.

CN119880928APending Publication Date: 2025-04-25BEIJING YIQING TECH GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411765020.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, the porcelain bottle foreign matter detection method based on manual detection has problems such as detection errors and inefficiency, resulting in high labor costs.

Method used

The image-based detection method is adopted, and the image acquisition device is controlled to move through a variable pitch mechanism, the bottom image of the inside of the porcelain bottle is collected, and image feature processing is performed to determine the detection result.

Benefits of technology

It improves the efficiency of porcelain bottle inspection, reduces manual errors, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880928A_ABST
    Figure CN119880928A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a porcelain bottle detection method, device and equipment based on an image and a detection system, and relates to the field of image processing. The method comprises the following steps: determining specification information of a porcelain bottle to be detected; according to the specification information, an image acquisition device is controlled to move through a variable spacing mechanism so as to acquire a bottle bottom image in the porcelain bottle to be detected; performing image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image; wherein the target area is an image area with defect features in the bottle bottom image; determining a detection result of the porcelain bottle to be detected according to the target area; wherein the detection result represents whether the porcelain bottle to be detected is detected to be qualified. The method is used for achieving the effect of improving the detection efficiency of the porcelain bottle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to an image-based porcelain bottle detection method, device, equipment and detection system. Background Art

[0002] During the porcelain bottle production process, each porcelain bottle produced needs to be inspected for foreign matter in order to obtain qualified porcelain bottle products.

[0003] In the prior art, based on the manual inspection method, the inspectors inspect the inside of each porcelain bottle to be inspected by lighting to see if there are any foreign objects.

[0004] However, in the above method, manual inspection is used, which may result in errors in inspection, thereby reducing the inspection efficiency of porcelain bottles and causing high labor costs. Summary of the invention

[0005] The embodiments of the present application provide an image-based porcelain bottle detection method, device, equipment and detection system to achieve the effect of improving the detection efficiency of porcelain bottles.

[0006] In a first aspect, an embodiment of the present application provides an image-based porcelain bottle detection method, which is applied to a host computer in a detection system; the detection system also includes a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; the method includes:

[0007] Determine the specification information of the porcelain bottle to be detected; and according to the specification information, control the movement of the image acquisition device through the variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be detected;

[0008] Performing image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image; wherein the target area is an image area having defect features in the bottle bottom image;

[0009] According to the target area, the detection result of the porcelain bottle to be detected is determined; wherein the detection result indicates whether the porcelain bottle to be detected is qualified.

[0010] In a possible implementation, the detection system further includes a collaborative robot, and the variable spacing mechanism is disposed at one end of the collaborative robot; according to the specification information, the image acquisition device is controlled to move by the variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be detected, including:

[0011] According to the specification information, a control signal is sent to the variable spacing mechanism; wherein the control signal is used to control the variable spacing mechanism to drive the image acquisition device to move to a target position indicated by the control signal;

[0012] The collaborative robot is used to control the sensor in the image acquisition device to enter the interior of the porcelain bottle to be inspected, so as to acquire the image of the bottom of the porcelain bottle to be inspected.

[0013] In a possible implementation, the variable spacing mechanism includes a driving module and a variable mechanism, the variable mechanism is disposed at one end of the collaborative robot, and the image acquisition device is disposed at one end of the variable mechanism;

[0014] Sending a control signal to the variable spacing mechanism according to the specification information includes:

[0015] The control signal is sent to the driving module according to the specification information; wherein the control signal is used to control the driving module to drive the variable mechanism to operate, so as to drive the image acquisition device to move to the target position.

[0016] In a possible implementation, sending a control signal to the driving module according to the specification information includes:

[0017] According to the specification information, determining the acquisition spacing of the image acquisition device; wherein the acquisition spacing is the spacing between the image acquisition device and the porcelain bottle to be detected when performing image acquisition;

[0018] Determine the moving distance of the image acquisition device according to the acquisition interval; wherein the moving distance is the distance the image acquisition device currently needs to move;

[0019] The control signal is sent to the driving module according to the moving distance.

[0020] In a possible implementation, performing image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image includes:

[0021] Performing a deformed transformation process on the bottle bottom image to obtain a transformed bottle bottom image;

[0022] Binarizing the transformed bottle bottom image to obtain a binarized bottle bottom image;

[0023] Threshold segmentation is performed on the binarized bottle bottom image to obtain the image area.

[0024] In a possible implementation, performing a deformity transformation process on the bottle bottom image to obtain a transformed bottle bottom image includes:

[0025] Generate an initial calibration file, and generate a calibration plate image corresponding to a preset ceramic pattern in the initial calibration file; wherein the calibration plate image is an image of a ceramic calibration plate corresponding to a preset ceramic image acquired by an image acquisition device;

[0026] Performing a deformity calibration process on the calibration plate image to obtain a deformity calibration file of the image acquisition device;

[0027] According to the deformity calibration file, the bottle bottom image is subjected to deformity transformation processing to obtain the transformed bottle bottom image.

[0028] In a possible implementation, binarizing the transformed bottle bottom image to obtain a binarized bottle bottom image includes:

[0029] Binarization is performed on the transformed bottle bottom image to obtain a preprocessed bottle bottom image; wherein the preprocessed bottle bottom image includes at least one abnormal pixel point, and the abnormal pixel point is a pixel point with abnormal image features in the transformed bottle bottom image;

[0030] Filtering is performed on each abnormal pixel in the preprocessed bottle bottom image to obtain the binarized bottle bottom image.

[0031] In a possible implementation, determining the detection result of the porcelain bottle to be detected according to the target area includes:

[0032] The detection result of the porcelain bottle to be detected is determined according to the area of ​​the target area.

[0033] In a possible implementation manner, the specification information includes, but is not limited to, one or more of the following: identification information, type information, and size information of the porcelain bottle to be inspected.

[0034] In a second aspect, an embodiment of the present application provides an image-based porcelain bottle detection device, which is applied to a host computer in a detection system; the detection system also includes a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; the device includes:

[0035] A control module, used to determine the specification information of the porcelain bottle to be detected; and according to the specification information, control the movement of the image acquisition device through the variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be detected;

[0036] A processing module, used for performing image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image; wherein the target area is an image area having defect features in the bottle bottom image;

[0037] The detection module is used to determine the detection result of the porcelain bottle to be detected according to the target area; wherein the detection result indicates whether the porcelain bottle to be detected is qualified.

[0038] In a possible embodiment, the detection system also includes a collaborative robot, and the variable spacing mechanism is arranged at one end of the collaborative robot; the control module is specifically used to: send a control signal to the variable spacing mechanism according to the specification information; wherein the control signal is used to control the variable spacing mechanism to drive the image acquisition device to move to the target position indicated by the control signal; through the collaborative robot, control the sensor in the image acquisition device to enter the interior of the porcelain bottle to be inspected, so as to capture the bottom image of the interior of the porcelain bottle to be inspected.

[0039] In a possible embodiment, the variable spacing mechanism includes a driving module and a variable mechanism, the variable mechanism is arranged at one end of the collaborative robot, and the image acquisition device is arranged at one end of the variable mechanism; the control module is specifically used to: send the control signal to the driving module according to the specification information; wherein the control signal is used to control the driving module to drive the variable mechanism to operate, so as to drive the image acquisition device to move to the target position.

[0040] In a possible implementation, the processing module is specifically used to: determine the acquisition spacing of the image acquisition device according to the specification information; wherein the acquisition spacing is the spacing between the image acquisition device and the porcelain bottle to be detected when performing image acquisition; determine the moving distance of the image acquisition device according to the acquisition spacing; wherein the moving distance is the distance that the image acquisition device currently needs to move; and send the control signal to the driving module according to the moving distance.

[0041] In a possible implementation, the processing module is specifically used to: perform a deformity transformation process on the bottle bottom image to obtain a transformed bottle bottom image; perform a binarization process on the transformed bottle bottom image to obtain a binarized bottle bottom image; and perform a threshold segmentation process on the binarized bottle bottom image to obtain the image area.

[0042] In a possible implementation, the processing module is specifically used to: generate an initial calibration file, and generate a calibration plate image corresponding to a preset ceramic pattern in the initial calibration file; wherein the calibration plate image is an image of a ceramic calibration plate corresponding to a preset ceramic image acquired by an image acquisition device; perform deformity calibration processing on the calibration plate image to obtain a deformity calibration file of the image acquisition device; perform deformity transformation processing on the bottle bottom image according to the deformity calibration file to obtain the transformed bottle bottom image.

[0043] In a possible implementation, the processing module is further specifically used to: perform binarization processing on the transformed bottle bottom image to obtain a preprocessed bottle bottom image; wherein the preprocessed bottle bottom image includes at least one abnormal pixel point, and the abnormal pixel point is a pixel point with abnormal image features in the transformed bottle bottom image; and perform filtering processing on each abnormal pixel point in the preprocessed bottle bottom image to obtain the binarized bottle bottom image.

[0044] In a possible implementation, the detection module is specifically used to determine the detection result of the porcelain bottle to be detected according to the area of ​​the target area.

[0045] In a possible implementation manner, the specification information includes, but is not limited to, one or more of the following: identification information, type information, and size information of the porcelain bottle to be inspected.

[0046] In a third aspect, an embodiment of the present application provides a host computer, including: a memory, a processor;

[0047] The memory stores computer-executable instructions;

[0048] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0049] In a fourth aspect, an embodiment of the present application provides a detection system, wherein the detection system includes a host computer and a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism;

[0050] The host computer is used to execute the above first aspect and / or various possible implementation methods of the first aspect.

[0051] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0052] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0053] The image-based porcelain bottle detection method, device, equipment and detection system provided in the embodiment of the present application determine the specification information of the porcelain bottle to be detected; and according to the specification information, control the movement of the image acquisition device through the variable spacing mechanism to collect the bottle bottom image inside the porcelain bottle to be detected; perform image feature processing on the bottle bottom image to obtain the target area corresponding to the bottle bottom image; wherein the target area is the image area with defect features in the bottle bottom image; according to the target area, determine the detection result of the porcelain bottle to be detected; wherein the detection result represents whether the porcelain bottle to be detected is qualified. Furthermore, according to the specification information of each porcelain bottle to be detected, the image acquisition device is controlled to move through the variable spacing mechanism, so that the image acquisition device accurately collects the bottle bottom image of different specifications inside the porcelain bottles to be detected at the appropriate position, and based on the image processing method, accurately detects whether the porcelain bottle to be detected is qualified, so as to achieve the effect of improving the detection efficiency of the porcelain bottle. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0055] Figure 1 A schematic diagram of an application scenario provided for this application;

[0056] Figure 2 A schematic diagram of a flow chart of an image-based porcelain bottle detection method provided in an embodiment of the present application;

[0057] Figure 3 A schematic diagram of the structure of a detection system provided in an embodiment of the present application;

[0058] Figure 4 A schematic diagram of a flow chart of another image-based porcelain bottle detection method provided in an embodiment of the present application;

[0059] Figure 5 A schematic diagram of the structure of another detection system provided in an embodiment of the present application;

[0060] Figure 6 A schematic diagram of a porcelain bottle detection process provided in an embodiment of the present application;

[0061] Figure 7 A schematic diagram of the structure of another detection system provided in an embodiment of the present application;

[0062] Figure 8 A schematic diagram of a deformity transformation processing flow provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of a binarization process provided in an embodiment of the present application;

[0064] Fig.10 A schematic diagram of a threshold segmentation processing flow provided in an embodiment of the present application;

[0065] Fig.11 A schematic diagram of the structure of an image-based porcelain bottle detection device provided in an embodiment of the present application;

[0066] Fig.12 A schematic diagram of the structure of a host computer provided in an embodiment of the present application.

[0067] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0069] It should be noted that the image-based porcelain bottle detection method, device, equipment and detection system of the present application can be used in the field of image processing, and can also be used in any field except image processing. The application field of the image-based porcelain bottle detection method, device, equipment and detection system of the present application is not limited.

[0070] Figure 1 A schematic diagram of an application scenario provided for this application, such as Figure 1 As shown, the specific application scenario of the present application is that in the porcelain bottle production process, each porcelain bottle generated needs to be inspected for foreign matter to obtain qualified porcelain bottle products.

[0071] In one example, based on a manual inspection method, inspectors use lighting to inspect the inside of each porcelain bottle to see if there are any foreign objects.

[0072] However, in the above method, manual inspection is used, which may result in errors in inspection, thereby reducing the inspection efficiency of porcelain bottles and causing high labor costs.

[0073] In response to the above technical problems, the present application proposes the following technical concept: according to the specification information of each porcelain bottle to be inspected, the image acquisition device is controlled to move through a variable spacing mechanism, so that the image acquisition device accurately captures the bottom image of the inside of the porcelain bottles to be inspected of different specifications at the appropriate position, and based on the image processing method, accurately detects whether the porcelain bottles to be inspected are qualified. In this way, the problem of manual inspection in the prior art, the existence of detection errors, and the reduction of the inspection efficiency of the porcelain bottles, and the high labor cost can be solved.

[0074] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0075] Figure 2 A flowchart of an image-based porcelain bottle detection method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method is applied to a host computer in a detection system; the detection system also includes a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; the method includes:

[0076] 201. Determine the specification information of the porcelain bottle to be inspected; and according to the specification information, control the movement of the image acquisition device through a variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be inspected.

[0077] Exemplarily, the execution subject of this embodiment may be a host computer. Figure 3 A schematic diagram of a detection system provided in an embodiment of the present application is shown in FIG. Figure 3As shown, the detection system includes a host computer, a variable spacing mechanism, an image acquisition device such as a high-precision camera, and also includes a porcelain bottle conveyor line and a rack platform, wherein the host computer can send a control signal to the variable spacing mechanism, the image acquisition device is fixedly arranged at the lower end of the variable spacing mechanism, and the porcelain bottle conveyor line transports one or a batch of porcelain bottles to be detected to the detection station of the rack platform. When the detection personnel can start the detection process through the host computer, the detection personnel can input the specification information of each porcelain bottle to be detected, such as the material number, into the host computer, so that the host computer determines the specification information of each porcelain bottle to be detected, or the host computer directly controls the movement of the variable spacing mechanism to drive the image acquisition to take a picture of the bottle body of each porcelain bottle to be detected, and performs image recognition to obtain the specification information of each porcelain bottle to be detected. The host computer sends a control signal to the variable spacing mechanism according to the determined specification information to control the variable spacing mechanism to change its own variable spacing, thereby driving the image acquisition device to move to a suitable position to capture the bottom image of each porcelain bottle to be inspected, and transmit the captured bottom image to the host computer for processing.

[0078] 202. Perform image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image; wherein the target area is an image area having defect features in the bottle bottom image.

[0079] Exemplarily, based on the image processing technology preset by the host computer, such as deep learning, image feature processing is performed on each obtained bottle bottom image to obtain an image area with defect features in each bottle bottom image, that is, a target area, such as an image area with abnormal contaminant features.

[0080] 203. Determine the test result of the porcelain bottle to be tested according to the target area; wherein the test result indicates whether the porcelain bottle to be tested is qualified.

[0081] Exemplarily, the host computer analyzes each extracted target area based on a preset detection method and according to preset process parameters, for example, determines whether the parameters of the defect characteristics in each target area are bad, and then determines whether each porcelain bottle to be inspected is qualified. After the inspection is completed, the defective porcelain bottles can be statistically analyzed for subsequent production.

[0082] In the present embodiment, an image-based porcelain bottle detection method is provided. According to the specification information of each porcelain bottle to be detected, the movement of the image acquisition device is controlled by a variable spacing mechanism, so that the image acquisition device can accurately capture the bottom image of the inside of the porcelain bottles to be detected of different specifications at the appropriate position, and based on the image processing method, it is accurately detected whether the porcelain bottle to be detected is qualified, thereby achieving the effect of improving the detection efficiency of the porcelain bottles.

[0083] Figure 4A flow chart of another image-based porcelain bottle detection method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the method is applied to a host computer in a detection system; the detection system also includes a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; the method includes:

[0084] 301. Determine the specification information of the porcelain bottle to be tested.

[0085] Exemplarily, this step may refer to step 201 and will not be described in detail.

[0086] 302. Send a control signal to the variable spacing mechanism according to the specification information; wherein the control signal is used to control the variable spacing mechanism to drive the image acquisition device to move to a target position indicated by the control signal.

[0087] The detection system also includes a collaborative robot, and the variable spacing mechanism is arranged at one end of the collaborative robot.

[0088] The specification information includes but is not limited to one or more of the following: identification information, type information, and size information of the porcelain bottle to be tested.

[0089] For example, Figure 5 A schematic diagram of the structure of another detection system provided in an embodiment of the present application, Figure 6 A schematic diagram of a porcelain bottle detection process provided in an embodiment of the present application, combined with Figure 5 , 6 The detection system also includes a collaborative robot, and the variable spacing mechanism is arranged at the lower end of the collaborative robot. When the detection starts, after the porcelain bottle to be detected is delivered to the position, the upper computer can first control the collaborative robot to move to the preset position. At this time, the upper computer sends a control signal corresponding to the specification information to the variable spacing mechanism based on the determined specification information, including identification information such as label, type information such as porcelain bottle type, size information such as height, and based on the preset mapping relationship, so as to control the variable spacing mechanism to change its own variable spacing, and then drive the image acquisition device to move to the position corresponding to the control signal, that is, the target position.

[0090] In one example, the variable spacing mechanism includes a driving module and a variable mechanism, the variable mechanism is arranged at one end of the collaborative robot, and the image acquisition device is arranged at one end of the variable mechanism; step 302 includes: sending a control signal to the driving module according to the specification information; wherein the control signal is used to control the driving module to drive the variable mechanism to operate, so as to drive the image acquisition device to move to the target position.

[0091] For example, Figure 7 A structural diagram of another detection system provided in an embodiment of the present application is shown in FIG. Figure 7As shown, the variable spacing mechanism in the detection system includes a driving module such as a servo motor and a variable mechanism such as an up-and-down moving mechanism. The variable mechanism is arranged at one end of the collaborative robot, and the image acquisition device is arranged at one end of the variable mechanism. The upper computer sends a control signal corresponding to the specification information to the driving module based on the determined specification information, including identification information such as a label, type information such as a porcelain bottle type, and size information such as a height, and based on a preset mapping relationship, to control the driving module to drive the variable mechanism to operate, so that the variable mechanism changes its own variable spacing, and then drives the image acquisition device to move to the target position.

[0092] In one example, step 302 specifically includes:

[0093] Step 1: Determine the acquisition spacing of the image acquisition device according to the specification information; wherein the acquisition spacing is the spacing between the image acquisition device and the porcelain bottle to be detected when performing image acquisition.

[0094] Step 2: Determine the moving distance of the image acquisition device according to the acquisition interval; wherein the moving distance is the distance that the image acquisition device currently needs to move.

[0095] Step 3: Send a control signal to the drive module according to the moving distance.

[0096] Specifically, based on the host computer, according to the determined specification information and based on the preset mapping relationship, the acquisition spacing of the image acquisition device corresponding to the specification information is determined, that is, the spacing between the image acquisition device and the porcelain bottle to be detected when performing image acquisition. According to the current spacing between the image acquisition device and the porcelain bottle to be detected, and the acquisition spacing, the distance that the image acquisition device currently needs to move, that is, the moving distance, can be determined. According to the moving distance of the image acquisition device, the variable spacing that the variable mechanism itself needs to change can be determined. Then, according to the variable spacing, a control signal is generated and sent to the drive module to control the drive module to drive the variable mechanism to change its own variable spacing. Then, the spacing between the cameras can be adaptively adjusted according to the different specifications of the ceramic bottles, so that the lens can accurately penetrate into the bottom of the ceramic bottle.

[0097] 303. By means of the collaborative robot, control the sensor in the image acquisition device to enter the interior of the porcelain bottle to be inspected, so as to acquire the bottle bottom image inside the porcelain bottle to be inspected.

[0098] For example, in combination Figure 5 , 6The host computer sends instructions to the collaborative robot, so that the collaborative robot controls the sensor in the image acquisition device electrically connected to the collaborative robot, such as a high-precision lens, to enter the interior of the porcelain bottle to be inspected, so that the high-precision lens can take pictures of the bottom of the bottle at various angles, and can collect the image of the bottom of the porcelain bottle to be inspected and transmit it to the host computer for image processing.

[0099] 304. Perform a deformed transformation process on the bottle bottom image to obtain a transformed bottle bottom image.

[0100] For example, in order to correct image distortion caused by lens distortion or improper shooting angle, the host computer performs a distortion transformation process on the bottle bottom image based on preset distortion transformation parameters to obtain a transformed bottle bottom image.

[0101] In one example, step 304 includes:

[0102] Step 1: Generate an initial calibration file, and generate a calibration plate image corresponding to a preset ceramic pattern in the initial calibration file; wherein the calibration plate image is an image of a ceramic calibration plate corresponding to a preset ceramic image acquired by an image acquisition device.

[0103] Step 2: Perform deformity calibration processing on the calibration plate image to obtain a deformity calibration file of the image acquisition device.

[0104] Step 3: According to the deformity calibration file, the bottle bottom image is deformed and transformed to obtain the transformed bottle bottom image.

[0105] For example, Figure 8 A schematic diagram of a deformity transformation processing flow provided in an embodiment of the present application is shown as follows: Figure 8 As shown, after the host computer obtains the bottom image of the porcelain bottle to be tested, it can first generate an initial calibration file, such as a dxf format calibration file, based on the calibration file generation tool provided by the camera, and then make a high-precision ceramic calibration plate based on the preset ceramic pattern in the initial calibration file. Generally, a ceramic plate is used, and the calibration plate at the preset position is photographed by the camera to obtain the image of the ceramic calibration plate, that is, the calibration plate image. Figure 8 As shown, the host computer uses the "distortion calibration" module and sets relevant parameters, such as the correction point input is point by point, the calibration plate type is a checkerboard calibration plate, the distortion type is radial perspective distortion, the grayscale contrast is 17, and the median filter state is to perform filtering. After determining "generate calibration file", based on the set relevant parameters, the calibration plate image is deformed and calibrated to obtain the deformity calibration file of the image acquisition device, such as including some deformity calibration parameters. Figure 8As shown, the host computer loads the deformity calibration file based on the "distortion correction" module and sets the operating parameters. The correction mode and the distortion type set in the "distortion calibration" module must be consistent to perform deformity transformation processing on the bottle bottom image. After outputting the image, the transformed bottle bottom image is obtained.

[0106] 305. Binarize the transformed bottle bottom image to obtain a binarized bottle bottom image.

[0107] Exemplarily, the host computer performs binarization processing on the bottle bottom image based on preset binarization processing parameters, such as high and low thresholds, to obtain a binarized bottle bottom image.

[0108] In one example, step 305 includes:

[0109] Step 1: binarize the transformed bottle bottom image to obtain a preprocessed bottle bottom image; wherein the preprocessed bottle bottom image includes at least one abnormal pixel point, and the abnormal pixel point is a pixel point with abnormal image features in the transformed bottle bottom image.

[0110] Step 2: Filter each abnormal pixel in the preprocessed bottle bottom image to obtain a binary bottle bottom image.

[0111] For example, Fig. 9 A schematic diagram of a binarization process provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the host computer sets appropriate low threshold and high threshold through the image binarization module, and sets the binarization type to hard threshold binarization, so as to perform binarization preprocessing on the transformed bottle bottom image, so that the pixels with abnormal image features in the transformed bottle bottom image, that is, the abnormal pixels, appear to obtain the preprocessed bottle bottom image; then, based on the morphological method, the morphological type is set to dilation, the shape is rectangular, the number of iterations is 3, the kernel width is 3, and the kernel height is 3, so as to perform filtering processing on each abnormal pixel in the preprocessed bottle bottom image, remove part of the interference and some noise points, and obtain the binarized bottle bottom image.

[0112] 306. Perform threshold segmentation processing on the binarized bottle bottom image to obtain an image region.

[0113] For example, Fig.10 A schematic diagram of a threshold segmentation process provided in an embodiment of the present application is shown in FIG. Fig.10As shown, the host computer uses the threshold segmentation method, sets the threshold mode to soft threshold, polarity to brighter than background, threshold range to 91-102, soft threshold softness to 249, search number to 91, minimum hole area to 0, and sets the corresponding area enable and area range to perform threshold segmentation on the binarized bottle bottom image, extract the defect features of the bottle bottom image, and extract the image area where the defect features are located, that is, to obtain the target area.

[0114] 307. Determine the test result of the porcelain bottle to be tested according to the area of ​​the target area.

[0115] For example, based on the host computer, the size of the target area is used to determine whether the defective product meets the requirements, such as whether the area size of the image area exceeds the preset area size. If it exceeds, it is a defective product, and if it does not exceed, it means that the product is not qualified. Figure 6 After the inspection is completed, the robot moves the lens out of the porcelain bottle to be inspected. After the porcelain bottle to be inspected is transported out of the inspection platform through the production line, the inspection system waits for the next or next batch of porcelain bottles to be inspected, and the collaborative robot controls the lens.

[0116] In this embodiment, based on the above embodiments, on the one hand, it is possible to adaptively detect porcelain bottles of various specifications and sizes to meet the requirements of flexible manufacturing; on the other hand, it is possible to accurately identify foreign matter at the bottom of the porcelain bottle, and subsequent equipment can remove defective porcelain bottles to improve product quality.

[0117] Fig.11 A schematic diagram of the structure of an image-based porcelain bottle detection device provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, the device is applied to a host computer in a detection system; the detection system also includes a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; the device includes:

[0118] The control module 401 is used to determine the specification information of the porcelain bottle to be inspected; and according to the specification information, control the movement of the image acquisition device through the variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be inspected;

[0119] The processing module 402 is used to perform image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image; wherein the target area is an image area with defect features in the bottle bottom image;

[0120] The detection module 403 is used to determine the detection result of the porcelain bottle to be detected according to the target area; wherein the detection result indicates whether the porcelain bottle to be detected is qualified.

[0121] In a possible embodiment, the detection system also includes a collaborative robot, and the variable spacing mechanism is arranged at one end of the collaborative robot; the control module 401 is specifically used to: send a control signal to the variable spacing mechanism according to the specification information; wherein the control signal is used to control the variable spacing mechanism to drive the image acquisition device to move to the target position indicated by the control signal; through the collaborative robot, control the sensor in the image acquisition device to enter the interior of the porcelain bottle to be inspected, so as to collect the bottle bottom image inside the porcelain bottle to be inspected.

[0122] In a possible embodiment, the variable spacing mechanism includes a driving module and a variable mechanism, the variable mechanism is arranged at one end of the collaborative robot, and the image acquisition device is arranged at one end of the variable mechanism; the control module 401 is specifically used to: send a control signal to the driving module according to the specification information; wherein the control signal is used to control the driving module to drive the variable mechanism to operate, so as to drive the image acquisition device to move to the target position.

[0123] In a possible implementation, the processing module 402 is specifically used to: determine the acquisition spacing of the image acquisition device according to the specification information; wherein the acquisition spacing is the spacing between the image acquisition device and the porcelain bottle to be detected when the image acquisition device is performing image acquisition; determine the moving distance of the image acquisition device according to the acquisition spacing; wherein the moving distance is the distance that the image acquisition device currently needs to move; and send a control signal to the driving module according to the moving distance.

[0124] In a possible implementation, the processing module 402 is specifically used to: perform a deformity transformation process on the bottle bottom image to obtain a transformed bottle bottom image; perform a binarization process on the transformed bottle bottom image to obtain a binarized bottle bottom image; and perform a threshold segmentation process on the binarized bottle bottom image to obtain an image area.

[0125] In a possible implementation, the processing module 402 is specifically used to: generate an initial calibration file, and generate a calibration plate image corresponding to a preset ceramic pattern in the initial calibration file; wherein the calibration plate image is an image of a ceramic calibration plate corresponding to a preset ceramic image acquired by an image acquisition device; perform deformity calibration processing on the calibration plate image to obtain a deformity calibration file of the image acquisition device; perform deformity transformation processing on the bottle bottom image according to the deformity calibration file to obtain a transformed bottle bottom image.

[0126] In a possible implementation, the processing module 402 is further specifically used to: perform binarization processing on the transformed bottle bottom image to obtain a preprocessed bottle bottom image; wherein the preprocessed bottle bottom image includes at least one abnormal pixel point, and the abnormal pixel point is a pixel point with abnormal image features in the transformed bottle bottom image; and perform filtering processing on each abnormal pixel point in the preprocessed bottle bottom image to obtain a binarized bottle bottom image.

[0127] In a possible implementation, the detection module 403 is specifically used to determine the detection result of the porcelain bottle to be detected according to the area of ​​the target area.

[0128] In one possible implementation, the specification information includes but is not limited to one or more of the following: identification information, type information, and size information of the porcelain bottle to be inspected. In one possible implementation, the specification information includes but is not limited to one or more of the following: identification information, type information, and size information of the porcelain bottle to be inspected.

[0129] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0130] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. Each module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The functions of each module. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0131] Fig.12 A schematic diagram of the structure of a host computer provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the host computer includes: a memory 501, a processor 502; the memory 501; and a memory for storing executable instructions of the processor 502.

[0132] The processor 502 is configured to execute the method provided in the above embodiment.

[0133] The host computer 500 further includes a receiver 503 and a transmitter 504. The receiver 503 is used to receive instructions and data sent by other devices, and the transmitter 504 is used to send instructions and data to external devices.

[0134] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solutions in the above embodiments.

[0135] An embodiment of the present application provides a detection system, which includes a host computer and a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; the host computer is used to execute the first aspect and / or various possible implementation methods of the first aspect as described above.

[0136] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution in the above embodiment.

[0137] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution in the above embodiments can be implemented.

[0138] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0141] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0142] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0143] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A porcelain bottle detection method based on an image, characterized in that: The method is applied to a host computer in a detection system; the detection system also includes a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; the method includes: Determine the specification information of the porcelain bottle to be detected; and according to the specification information, control the movement of the image acquisition device through the variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be detected; Performing image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image; wherein the target area is an image area having defect features in the bottle bottom image; According to the target area, the detection result of the porcelain bottle to be detected is determined; wherein the detection result indicates whether the porcelain bottle to be detected is qualified.

2. The method according to claim 1, characterized in that The detection system also includes a collaborative robot, and the variable spacing mechanism is arranged at one end of the collaborative robot; according to the specification information, the image acquisition device is controlled to move by the variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be detected, including: According to the specification information, a control signal is sent to the variable spacing mechanism; wherein the control signal is used to control the variable spacing mechanism to drive the image acquisition device to move to a target position indicated by the control signal; The collaborative robot is used to control the sensor in the image acquisition device to enter the interior of the porcelain bottle to be inspected, so as to acquire the image of the bottom of the porcelain bottle to be inspected.

3. The method according to claim 2, characterized in that The variable spacing mechanism includes a driving module and a variable mechanism, the variable mechanism is arranged at one end of the collaborative robot, and the image acquisition device is arranged at one end of the variable mechanism; Sending a control signal to the variable spacing mechanism according to the specification information includes: The control signal is sent to the driving module according to the specification information; wherein the control signal is used to control the driving module to drive the variable mechanism to operate, so as to drive the image acquisition device to move to the target position.

4. The method according to claim 3, characterized in that Sending a control signal to the driving module according to the specification information includes: According to the specification information, determining the acquisition spacing of the image acquisition device; wherein the acquisition spacing is the spacing between the image acquisition device and the porcelain bottle to be detected when performing image acquisition; Determine the moving distance of the image acquisition device according to the acquisition interval; wherein the moving distance is the distance the image acquisition device currently needs to move; The control signal is sent to the driving module according to the moving distance.

5. The method according to claim 1, characterized in that Performing image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image includes: Performing a deformity transformation process on the bottle bottom image to obtain a transformed bottle bottom image; Binarizing the transformed bottle bottom image to obtain a binarized bottle bottom image; Threshold segmentation is performed on the binarized bottle bottom image to obtain the image area.

6. The method according to claim 5, characterized in that Performing a deformed transformation process on the bottle bottom image to obtain a transformed bottle bottom image includes: Generate an initial calibration file, and generate a calibration plate image corresponding to a preset ceramic pattern in the initial calibration file; wherein the calibration plate image is an image of a ceramic calibration plate corresponding to a preset ceramic image acquired by an image acquisition device; Performing a deformity calibration process on the calibration plate image to obtain a deformity calibration file of the image acquisition device; According to the deformity calibration file, the bottle bottom image is subjected to deformity transformation processing to obtain the transformed bottle bottom image.

7. The method according to claim 5, characterized in that Binarizing the transformed bottle bottom image to obtain a binarized bottle bottom image includes: Binarization is performed on the transformed bottle bottom image to obtain a preprocessed bottle bottom image; wherein the preprocessed bottle bottom image includes at least one abnormal pixel point, and the abnormal pixel point is a pixel point with abnormal image features in the transformed bottle bottom image; Filtering is performed on each abnormal pixel in the preprocessed bottle bottom image to obtain the binarized bottle bottom image.

8. The method according to claim 1, characterized in that: Determining the detection result of the porcelain bottle to be detected according to the target area includes: The detection result of the porcelain bottle to be detected is determined according to the area of ​​the target area.

9. The method according to any one of claims 1 to 8, characterized in that The specification information includes, but is not limited to, one or more of the following: identification information, type information, and size information of the porcelain bottle to be tested.

10. An image-based porcelain bottle detection device, characterized in that: The device is applied to a host computer in a detection system; the detection system also includes a variable spacing mechanism, one end of which is provided with an image acquisition device; the device includes: A control module, used to determine the specification information of the porcelain bottle to be detected; and according to the specification information, control the movement of the image acquisition device through the variable spacing mechanism to acquire the bottle bottom image inside the porcelain bottle to be detected; A processing module, used for performing image feature processing on the bottle bottom image to obtain a target area corresponding to the bottle bottom image; wherein the target area is an image area having defect features in the bottle bottom image; The detection module is used to determine the detection result of the porcelain bottle to be detected according to the target area; wherein the detection result indicates whether the porcelain bottle to be detected is qualified.

11. A host computer, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 9.

12. A detection system, characterized in that: The detection system includes a host computer and a variable spacing mechanism, and an image acquisition device is provided at one end of the variable spacing mechanism; The host computer is used to execute the method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.

14. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when being executed by a processor.