Detection method and test device

By identifying the outer contour and center of the beads of the lamp cup image and detecting according to preset characteristics, the problems of low detection efficiency and easy damage to the lamp cup in the prior art are solved, and high-precision and automated lamp cup detection are achieved.

CN114066805BActive Publication Date: 2025-06-03SZ ZUVI FUYONG INTELLIGENT MFG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111160689.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-06-03
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

The method of detecting lamp cups in the prior art is inefficient and prone to damage the reflective film layer. The multi-lane cup design is complex, making it difficult to ensure the consistency of the optical path.

Method used

By identifying the image of the lamp cup, it obtains its outer contour and the center of mass of the lamp beads, and detects it according to the preset qualified characteristics, and automatically detects it using a conveyor belt and a detection module.

Benefits of technology

It improves detection accuracy and efficiency, avoids damage to the lamp cup by manual detection, and ensures the consistency of the optical path of the multi-lane cup design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114066805B_ABST
    Figure CN114066805B_ABST
Patent Text Reader

Abstract

The present application discloses a detection method and a testing device. The detection method is used to obtain an image of a lamp cup to be tested in a first direction, where the first direction is opposite to the light-emitting direction of the lamp cup; identify and obtain the outer contour of the lamp cup and the centroid of the lamp beads in the image; obtain preset information, where the preset information is used to characterize the features of a qualified lamp cup; obtain the detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp beads and the preset information; wherein the detection result includes a first result for characterizing that the lamp cup is unqualified. The detection method and the testing device according to the embodiments of the present application identify and obtain the outer contour of the lamp cup and the centroid of the lamp beads in the image of the lamp cup to be tested, and use the features of the qualified lamp cup as the preset information to achieve the purpose of judging whether the lamp cup to be tested is qualified. Compared with manual detection, detecting the lamp cup by the testing device not only ensures the detection accuracy, but also improves the detection efficiency, and can also prevent damage to the lamp cup during the detection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of detection technologies, and more particularly, to a detection method and a testing device. Background Art

[0002] In order to increase brightness or radiation intensity, there are solutions in the prior art to integrate multiple light sources in one device, such as multi-head flashlights, spotlights, projection lamps, etc. During design, it is necessary to determine the positions of the respective light sources according to a preset optical path direction, and set the light sources at a certain inclination angle to achieve light convergence. Each light source generally includes a lamp bead and a lamp cup. According to the preset position and inclination angle, the shape of the lamp cup and the position of the lamp bead in each lamp cup are designed correspondingly. Compared with a single light source, for multiple light sources, the coordination of their respective light-emitting directions needs to be considered, making the design of the lamp cup tend to be complex. Especially in the design of multi-lamp-cup integration, there are relatively high requirements for the arrangement positions and overall consistency of the respective lamp cups. In order to avoid optical path problems caused by deviations in the production of the lamp cup, it is necessary to detect the lamp cup.

[0003] In the prior art, generally, an operator measures the lamp cup with a caliper or other structures, resulting in poor detection accuracy and low efficiency. Moreover, since the lamp cup needs to be coated with a reflective film layer, the reflective surface is easily damaged during manual measurement. Summary of the Invention

[0004] Embodiments of the present application provide a detection method and a testing device.

[0005] The detection method according to the embodiments of the present application is used to obtain an image of the lamp cup to be measured in a first direction, where the first direction is opposite to the light-emitting direction of the lamp cup; identify and obtain the outer contour of the lamp cup and the centroid of the lamp bead in the image; obtain preset information, where the preset information is used to characterize the features of a qualified lamp cup; and obtain a detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp bead, and the preset information; where the detection result includes a first result for characterizing that the lamp cup is unqualified.

[0006] The testing device according to the embodiments of the present application includes a conveyor belt and a detection module. The conveyor belt is used to drive the lamp cup to move to a detection station. The detection module is used to perform the following detection method on the lamp cup at the detection station and output a detection result. The detection method includes: obtaining an image of the lamp cup to be measured in a first direction, where the first direction is opposite to the light-emitting direction of the lamp cup; identifying and obtaining the outer contour of the lamp cup and the centroid of the lamp bead in the image; obtaining preset information, where the preset information is used to characterize the features of a qualified lamp cup; and obtaining a detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp bead, and the preset information; where the detection result includes a first result for characterizing that the lamp cup is unqualified.

[0007] The detection method and test device according to the embodiments of the present application identify and obtain the outer contour of the lamp cup and the centroid of the lamp beads in the image of the lamp cup to be tested, and judge whether the outer contour of the lamp cup to be tested and the centroid of the lamp beads are qualified according to the characteristics of the qualified lamp cup as preset information, so as to achieve the purpose of judging whether the lamp cup to be tested is qualified. Compared with manual detection, detecting the lamp cup by the test device not only ensures the detection accuracy, but also improves the detection efficiency, and can also prevent damage to the lamp cup during the detection process.

[0008] Additional aspects and advantages of the embodiments of the present application will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the embodiments of the present application. Description of the Drawings

[0009] The above and / or additional aspects and advantages of the present application will become apparent and easy to understand from the description of the embodiments in conjunction with the following drawings, where:

[0010] Figure 1 is a schematic flowchart of the detection method of some embodiments of the present application;

[0011] Figure 2 is a schematic structural diagram of a lamp cup of some embodiments of the present application;

[0012] Figure 3 is a schematic plan view of a lamp cup of some embodiments of the present application;

[0013] Figure 4 is a schematic plan view of the test device of some embodiments of the present application;

[0014] Figure 5 is a schematic flowchart of the detection method of some embodiments of the present application;

[0015] Figure 6 is a schematic scene diagram of the detection method of some embodiments of the present application;

[0016] Figure 7 is a schematic flowchart of the detection method of some embodiments of the present application;

[0017] Figure 8 is a schematic scene diagram of the detection method of some embodiments of the present application;

[0018] Figure 9 is a schematic flowchart of the detection method of some embodiments of the present application;

[0019] Figures 10 to 12 is a schematic scene diagram of the detection method of some embodiments of the present application;

[0020] Figure 13 andFigure 14 is a schematic flow chart of a detection method according to some embodiments of the present application;

[0021] Figure 15 is a schematic scenario diagram of a detection method according to some embodiments of the present application;

[0022] Figure 16 is a schematic flow chart of a detection method according to some embodiments of the present application;

[0023] Figure 17 is a schematic scenario diagram of a detection method according to some embodiments of the present application;

[0024] Figure 18 and Figure 19 is a schematic flow chart of a detection method according to some embodiments of the present application;

[0025] Figure 20 is a schematic scenario diagram of a detection method according to some embodiments of the present application;

[0026] Figure 21 is a schematic flow chart of a detection method according to some embodiments of the present application;

[0027] Figure 22 is a schematic scenario diagram of a detection method according to some embodiments of the present application;

[0028] Figure 23 is a schematic flow chart of a detection method according to some embodiments of the present application. Detailed Embodiments

[0029] The following describes in detail the embodiments of the present application. Examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the embodiments of the present application and should not be construed as limiting the embodiments of the present application.

[0030] Please refer to Figure 1 , Figure 2 and Figure 3 , the embodiments of the present application provide a detection method for detecting a lamp cup 100. The detection method includes the steps of:

[0031] 01: Obtain an image of the lamp cup 100 to be measured in a first direction, where the first direction is opposite to the light-emitting direction of the lamp cup 100;

[0032] 03: Identify and obtain the outer contour of the lamp cup 100 and the centroid of the lamp beads 101 in the image;

[0033] 05: Obtain preset information, where the preset information is used to characterize the characteristics of a qualified lamp cup 100; and

[0034] 07: Obtain the detection result of the lamp cup 100 according to the outer contour of the lamp cup 100, the centroid of the lamp beads 101, and the preset information.

[0035] Please refer to Figure 4 , this embodiment of the present application also provides a testing device 1000. The testing device 1000 includes a conveyor belt 200 and a detection module 300. The detection method of this embodiment of the present application can be applied to the testing device 1000. The conveyor belt is used to drive the lamp cup 100 to move to the detection station. The detection module 300 is used to perform the above detection method on the lamp cup 100 at the detection station and output the detection result. That is, the detection module 300 is used to execute step 01, step 03, step 05, and step 07 and output the detection result. That is, the detection module 300 is used to obtain an image of the to-be-tested lamp cup 100 in the first direction, where the first direction is opposite to the light-emitting direction of the lamp cup 100; identify and obtain the outer contour of the lamp cup 100 and the centroid of the lamp beads 101 in the image; obtain the preset information, where the preset information is used to characterize the characteristics of the qualified lamp cup 100; and obtain the detection result of the lamp cup 100 according to the outer contour of the lamp cup 100, the centroid of the lamp beads 101, and the preset information.

[0036] Specifically, the testing device 1000 further includes an illumination device 400 and a sensor 500. The illumination device 400 is used to emit light toward the lamp cup 100 so that the detection module 300 can obtain a better image of the lamp cup 100. The sensor 500 is used to detect the lamp cup 100 at the detection station. Among them, the sensor 500 can be a laser sensor, a distance sensor, a photosensitive sensor, etc., which can detect and output information to the detection module 300. The detection module 300 can judge whether there is a lamp cup 100 at the detection station by judging that the information output by the sensor 500 changes. For example, when the sensor 500 is a distance sensor, when there is no lamp cup 100 placed at the detection station, the distance between the sensor 500 and the detection station is fixed, and when the distance information output by the sensor 500 becomes smaller, it indicates that a lamp cup 100 is placed at the detection station.

[0037] In some embodiments, the illumination device 400 can judge whether to emit light toward the lamp cup 100 according to whether there is a lamp cup 100 placed at the detection station. That is, when there is a lamp cup 100 placed at the detection station, the illumination device 400 will be turned on and emit light toward the lamp cup 100. When there is no lamp cup 100 placed at the detection station, the illumination device 400 is turned off. Thus, the workload of the illumination device 400 can be reduced and the power consumption can be reduced. The illumination device 400 can also always remain in a constant-on state, that is, regardless of whether there is a lamp cup 100 placed at the detection station, the illumination device 400 always emits light toward the direction where the lamp cup 100 is placed. Thus, the number of switchings of the illumination device 400 can be reduced to improve the service life of the illumination device 400.

[0038] Please combine Figure 2 and Figure 3 , the lamp cup 100 includes a plurality of sub-lamp cups 10 arranged in a ring, and each sub-lamp cup 10 is provided with a lamp bead 101. After the conveyor belt 200 (as shown in Figure 4 ) moves the lamp cup 100 to the detection station, the detection module 300 starts to detect the lamp cup 100 on the detection station. Specifically, the detection module 300 acquires an image of the lamp cup 100 to be tested in the first direction. Since the first direction is opposite to the light-emitting direction of the lamp cup 100, the image of the lamp cup 100 to be tested acquired by the detection module 300 in the first direction (as shown in Figure 3 ), the detection module 300 can identify the outer contour of the lamp cup 100 and the centroid of the lamp bead 101 according to this image. Among them, since the lamp bead 101 is a uniform object, the centroid of the lamp bead 101 is the center at the position of the lamp bead 101 in the image of the lamp cup 100.

[0039] Next, the test device 1000 is provided with preset information. The detection module 300 acquires this preset information and obtains the detection result of the lamp cup 100 according to the outer wheel of the lamp cup 100, the centroid of the lamp bead 101, and the preset information. Among them, the preset information is used to characterize the characteristics of a qualified lamp cup 100, that is, the preset information is an image containing the outer contour of a qualified lamp cup 100 and the centroid of the lamp bead 101. The detection result includes a first result used to characterize that the lamp cup 100 is unqualified. The first result can be a specific number to represent that the lamp cup 100 is unqualified. For example, when the number output by the detection module 300 is "1", it represents the first result.

[0040] Thus, the detection module 300 can calculate the coincidence degree between the outer contour of the qualified lamp cup 100 in the preset information and the outer contour of the lamp cup 100 to be tested, and calculate the coincidence degree between the centroids of the plurality of lamp beads 101 in the lamp cup 100 to be tested and the centroids of the plurality of lamp beads 101 in the qualified lamp cup 100, so as to judge whether the lamp cup 100 is qualified.

[0041] Among them, the coincidence degree between the outer contour of the qualified lamp cup 100 and the outer contour of the lamp cup 100 to be measured can be calculated by aligning the outer contour image of the lamp cup 100 to be measured with the outer contour image of the qualified lamp cup 100. The coincidence degree between the centroids of multiple lamp beads 101 in the lamp cup 100 to be measured and the centroids of multiple lamp beads 101 in the qualified lamp cup 100 can be obtained by aligning the centroid images of multiple lamp beads 101 in the lamp cup 100 to be measured with the centroid images of multiple lamp beads 101 in the qualified lamp cup 100. Preferably, before aligning the centroid images of multiple lamp beads 101 in the lamp cup 100 to be measured with the centroid images of multiple lamp beads 101 in the qualified lamp cup 100, the centroids of multiple lamp beads 101 in the lamp cup 100 to be measured can be fitted into a first fitting image, and the centroids of multiple lamp beads 101 in the qualified lamp cup 100 can be fitted into a second fitting image. By aligning the first fitting image and the second fitting image, the coincidence degree of the centroids of multiple lamp beads 101 can be calculated simultaneously.

[0042] It should be noted that when the detection module 300 calculates the coincidence degree between the outer contour of the qualified lamp cup 100 in the preset information and the outer contour of the lamp cup 100 to be measured, and calculates that the coincidence degree between the centroids of multiple lamp beads 101 in the lamp cup 100 to be measured and the centroids of multiple lamp beads 101 in the qualified lamp cup 100 is relatively low for one of them, the detection result output by the detection module 300 is the first result, that is, it outputs that the lamp cup 100 is unqualified. When the detection module 300 calculates the coincidence degree between the outer contour of the qualified lamp cup 100 in the preset information and the outer contour of the lamp cup 100 to be measured, and calculates that the coincidence degrees between the centroids of multiple lamp beads 101 in the lamp cup 100 to be measured and the centroids of multiple lamp beads 101 in the qualified lamp cup 100 are relatively high at the same time, it indicates that the lamp cup 100 is qualified at this time, and the detection module 300 outputs the detection result that the lamp cup 100 is qualified. Among them, when the centroid of one of the multiple lamp beads 101 has a relatively low coincidence degree, the detection module 300 will also output the first result.

[0043] In addition, please combine Figure 3 , the testing device 1000 further includes a processor 301. After the detection is completed, when the detection result output by the detection module 300 is that the lamp cup 100 is qualified, the processor 301 controls the conveyor belt 200 to move along the first transportation direction to drive the lamp cup 100 away from the detection station; when the detection result of the detection module 300 is the first result, that is, the lamp cup 100 is unqualified, the processor 301 controls the conveyor belt 200 to move along the second transportation direction to drive the lamp cup 100 away from the detection station. Among them, the first transportation direction is the direction where the next process is located, and the second transportation direction is the direction where the storage position of the unqualified lamp cup 100 is located.

[0044] The detection method and test device 1000 according to the embodiments of the present application identify and obtain the outer contour of the lamp cup 100 and the centroid of the lamp beads 101 in the image of the lamp cup 100 to be measured, and judge whether the outer contour of the lamp cup 100 to be measured and the centroid of the lamp beads 101 are qualified according to the characteristics of the qualified lamp cup 100 as preset information, so as to achieve the purpose of judging whether the lamp cup 100 to be measured is qualified. Compared with manual detection, detecting the lamp cup 100 by the test device 1000 not only ensures the detection accuracy, but also improves the detection efficiency, and can prevent damage to the lamp cup 100 during the detection process.

[0045] Specifically, please refer Figures 2 to 5 , in some embodiments, step 07: obtaining the detection result of the lamp cup 100 according to the outer contour of the lamp cup 100, the centroid of the lamp beads 101 and the preset information may include the steps:

[0046] 071: fitting the outer contour of the lamp cup 100 into a first shape to be measured, and obtaining a second shape to be measured according to the centroids of multiple lamp beads 101; and

[0047] 072: if the coincidence degree between the first shape to be measured and the first shape is less than the first preset value; or, if the coincidence degree between the second shape to be measured and the second shape is less than the second preset value, the detection result is the first result.

[0048] In some embodiments, the detection module 300 is used to execute step 071 and step 072. That is, the detection module 300 is used to fit the outer contour of the lamp cup 100 into a first shape to be measured, and obtain a second shape to be measured according to the centroids of multiple lamp beads 101; and if the coincidence degree between the first shape to be measured and the first shape is less than the first preset value; or, if the coincidence degree between the second shape to be measured and the second shape is less than the second preset value, the detection result is the first result.

[0049] Specifically, after the detection module 300 identifies and obtains the outer contour of the lamp cup 100 and the centroid of the lamp beads 101, the detection module 300 can fit the outer contour of the lamp cup 100 into a first shape to be measured, and obtain a second shape to be measured according to the centroids of multiple lamp beads 101. Among them, the first shape to be measured is consistent with the outer contour of the lamp cup 100. Since multiple sub-lamp cups 10 are arranged in a ring in the lamp cup 100, multiple lamp beads 101 are also arranged in a ring in the lamp cup 100. Therefore, the detection module 300 can obtain a fitting circle that passes through the centroids of multiple lamp beads 101 according to the centroids of multiple lamp beads 101, and this fitting circle is the second shape to be measured.

[0050] It should be noted that the preset information includes a preset first shape and a second shape. Among them, the first shape is obtained by fitting the outer contour of the qualified lamp cup 100, and the second shape can be obtained according to the centroids of multiple lamp beads 101 of the qualified lamp cup 100.

[0051] Taking Figure 6 as an example, the detection module 300 respectively obtains a first shape to be measured P1 and a second shape to be measured P2, and the preset information includes a first shape P3 and a second shape P4. Among them, the geometric center of the first shape to be measured P1 is O1, and the geometric center of the first shape P3 is O2.

[0052] Next, the detection module 300 can compare whether the coincidence degree between the first shape to be measured P1 and the first shape P3 is less than a first preset value, and compare whether the coincidence degree between the second shape to be measured P2 and the second shape P4 is less than a second preset value. When the coincidence degree between the first shape to be measured P1 and the first shape P3 is less than the first preset value, or the coincidence degree between the second shape to be measured P2 and the second shape P4 is less than the second preset value, the detection result is output as the first result. That is to say, when the coincidence degree between the first shape to be measured P1 and the first shape P3 is less than the first preset value, or the coincidence degree between the second shape to be measured P2 and the second shape P4 is less than the second preset value, the lamp cup 100 to be measured is unqualified.

[0053] More specifically, the detection module 300 can align the geometric center O1 of the first shape to be measured P1 with the geometric center O2 of the first shape P3. After the geometric center O1 and the geometric center O2 are aligned, the detection module 300 can calculate the coincidence degree between the first shape to be measured P1 and the first shape P3, and determine whether the coincidence degree is less than the first preset value to output the corresponding detection result. For example, the detection module 300 calculates that the coincidence degree between the first shape to be measured P1 and the first shape P3 is 80%, and the first preset value is 85%, which means that the coincidence degree between the first shape to be measured P1 and the first shape P3 is less than the first preset value, and the detection result output by the detection module 300 is the first result, that is, the lamp cup 100 is unqualified. Similarly, the coincidence degree between the second shape to be measured P2 and the second shape P4 can also be calculated after aligning the second shape to be measured P2 and the second shape P4, so as to determine whether the coincidence degree is less than the second preset value, which will not be elaborated here.

[0054] It can be understood that the first preset value and the second preset value are respectively the minimum coincidence degree thresholds of the first shape to be measured P1 and the first shape P3, and the minimum coincidence degree threshold of the second shape to be measured P2 and the second shape P4. When the coincidence degree between the first shape to be measured P1 and the first shape P3 is less than the first preset value, it indicates that the coincidence degree between the first shape to be measured P1 and the first shape P3 is relatively low. When the coincidence degree between the second shape to be measured P2 and the second shape P4 is less than the second preset value, it indicates that the coincidence degree between the second shape to be measured P2 and the second shape P4 is relatively low. Therefore, when the coincidence degree between the first shape to be measured P1 and the first shape P3 is less than the first preset value, or the coincidence degree between the second shape to be measured P2 and the second shape P4 is less than the second preset value, the detection result output by the detection module 300 is the first result, that is, the lamp cup 100 is unqualified. Among them, the first preset value and the second preset value can be the same or different, and no limitation is made here.

[0055] In some embodiments, the first result may further include information indicating that the lamp cup 100 is unqualified and the lamp bead 101 is unqualified. Specifically, the detection module 300 can be pre-set with numbers or characters corresponding to different information. For example, when the lamp cup 100 is unqualified, the first result output by the detection module 300 is represented by "1". When the lamp bead 101 is unqualified, the first result output by the detection module 300 is represented by "2". When both the lamp cup 100 and the lamp bead 101 are unqualified, the first result output by the detection module 300 is represented by "3". Thus, when the coincidence degree between the first shape to be measured and the first shape is less than the first preset value, the detection result output by the detection module 300 is "1", that is, the lamp cup 100 is unqualified. When the coincidence degree between the second shape to be measured and the second shape is less than the second preset value, the detection result output by the detection module 300 is "2", that is, the lamp bead 101 is unqualified. When the coincidence degree between the first shape to be measured and the first shape is less than the first preset value, and the coincidence degree between the second shape to be measured and the second shape is less than the second preset value, the detection result output by the detection module 300 is "3", that is, both the lamp cup 100 and the lamp bead 101 are unqualified.

[0056] Thus, the detection module 300 can determine the coincidence degree between the image of the lamp cup 100 to be measured and the image of the qualified lamp cup 100 through the first shape to be measured, the second shape to be measured, the preset first shape and the second shape, and when the coincidence degree is lower than the preset value, output the first result, that is, the lamp cup 100 is unqualified, so as to achieve the purpose of detecting whether the lamp cup 100 to be measured is qualified.

[0057] Specifically, in some embodiments, the first shape to be measured may be obtained first, and the degree of coincidence between the first shape to be measured and the first shape may be obtained. If the degree of coincidence between the first shape to be measured and the first shape is less than the first preset value, it indicates that the lamp cup 100 is unqualified, and the first result may be directly output without obtaining the second shape to be measured. In this way, the detection speed of the lamp cup 100 can be increased. Similarly, in some embodiments, the second shape to be measured may be obtained first, and the degree of coincidence between the second shape to be measured and the second shape may be obtained. If the degree of coincidence between the second shape to be measured and the second shape is less than the second preset value, it indicates that the lamp cup 100 is unqualified, and the first result may be directly output without obtaining the first shape to be measured.

[0058] Please refer to Figure 3 、 Figure 4 and Figure 7 , in certain embodiments, step 07: obtaining the detection result of the lamp cup 100 according to the outer contour of the lamp cup 100, the centroid of the lamp beads 101 and the preset information may further include the steps of:

[0059] 073: obtaining the first geometric center of the first shape to be measured and the second geometric center of the second shape to be measured; and

[0060] 074: if the distance between the first geometric center and the second geometric center is greater than the first preset distance, the detection result is the first result.

[0061] In certain embodiments, the detection module 300 is configured to execute steps 073 and 074. That is, the detection module 300 is configured to obtain the first geometric center of the first shape to be measured and the second geometric center of the second shape to be measured; and if the distance between the first geometric center and the second geometric center is greater than the first preset distance, the detection result is the first result.

[0062] Specifically, after the detection module 300 respectively obtains the first shape to be measured and the second shape to be measured according to the outer contour of the lamp cup 100 and the centroids of the plurality of lamp beads 101. Since, in the process of designing the lamp cup 100, the light emitted by each lamp bead 101 needs to be converged, therefore, the detection module 300 also needs to detect the concentricity between the outer contour of the lamp cup 100 and the plurality of lamp beads 101 to ensure that the light emitted by the plurality of lamp beads 101 can be converged at the center of the lamp cup 100 to the greatest extent.

[0063] Therefore, after the detection module 300 obtains the first shape to be measured and the second shape to be measured, as Figure 8 shown, the first shape to be measured is P5 and the second shape to be measured is P6, and the detection module 300 also needs to obtain the first geometric center O3 of the first shape to be measured P5 and the second geometric center O4 of the second shape to be measured P6.

[0064] Next, the detection module 300 can determine whether the distance between the first geometric center O3 and the second geometric center O4 is greater than a preset distance. When the distance between the first geometric center O3 and the second geometric center O4 is greater than the preset distance, the detection result output is the first result, that is, the lamp cup 100 is unqualified. As Figure 8 shown, the detection module 300 establishes a coordinate system with the intersection point Q of the line passing through the leftmost point of the first shape to be measured P5 and the line passing through the lowermost point of the first shape to be measured P5. Thus, the coordinates of the first geometric center O3 of the first shape to be measured P5 and the coordinates of the second geometric center O4 of the second shape to be measured P6 can be obtained respectively. For example, the coordinates of the first geometric center O3 are (5, 5), and the coordinates of the second geometric center O4 are (5, 5.5). Thus, the distance between the first geometric center O3 and the second geometric center O4 can be obtained The first preset distance is 0.25, that is, the distance L is greater than the first preset distance, so the detection result output by the detection module 300 is the first result, that is, the lamp cup 100 is unqualified.

[0065] In some embodiments, the first result may further include that the concentricity of the lamp bead 101 is unqualified. The detection module 300 can be pre-set with numbers or characters corresponding to the unqualified concentricity of the lamp bead 101. For example, when the detection module 300 detects that the concentricity of the lamp bead 101 is unqualified, the first result output by the detection module 300 is represented by "4". Thus, when the distance between the first geometric center and the second geometric center is greater than the first preset distance, the first result output by the detection module 300 is "4", indicating that the concentricity of the lamp bead 101 is unqualified.

[0066] Please refer to Figure 3 、 Figure 4 、 Figure 9 and Figure 10 , in some embodiments, step 01: Obtain an image of the lamp cup 100 to be measured in the first direction, including the steps of:

[0067] 011: Obtain an initial image of the target area of the lamp cup 100 to be measured in the first direction through the camera 302 located on the axis;

[0068] 012: The camera 302 rotates relative to the axis of the lamp cup 100, and a measured image of the target area is collected every time it rotates a preset angle relative to the axis until the camera 302 rotates relative to the axis of the lamp cup 100 for at least one week to obtain multiple measured images. The target area includes part of the outer contour line and a lamp bead 101.

[0069] Among them, step 03: Identify and obtain the outer contour of the lamp cup 100 and the centroid of the lamp bead 101 in the image, including the steps of:

[0070] 031: Identify the initial outer contour line in the initial image and the initial centroid of the lamp bead 101, and identify the outer contour line and the centroid of the lamp bead 101 in each image to be measured.

[0071] In some embodiments, the detection module 300 is configured to perform step 011, step 012, and step 031. That is, the detection module 300 is configured to obtain an initial image of the target area of the lamp cup 100 to be measured in the first direction through the camera 302 located on the axis; the camera 302 rotates relative to the axis of the lamp cup 100, and an image to be measured of the target area is collected every time it rotates a preset angle relative to the axis until the camera 302 rotates relative to the axis of the lamp cup 100 for at least one full circle to obtain multiple images to be measured, where the target area includes a partial outer contour line and a lamp bead 101; identify the initial outer contour line in the initial image and the initial centroid of the lamp bead 101, and identify the outer contour line and the centroid of the lamp bead 101 in each image to be measured.

[0072] It should be noted that the images to be measured include the first image, the second image, the third image... the Nth image, where N is an integer greater than or equal to 1. When the camera 302 rotates N times the preset angle relative to the axis of the lamp cup 100, the Nth image of the target area is collected and obtained. That is, when the camera 302 rotates one time the preset angle relative to the axis of the lamp cup 100, the first image of the target area is collected and obtained; when the camera 302 rotates two times the preset angle relative to the axis of the lamp cup 100, the second image of the target area is collected and obtained... when the camera 302 rotates N times the preset angle relative to the axis of the lamp cup 100, the Nth image of the target area is collected and obtained.

[0073] Specifically, the testing device 1000 further includes a fixing fixture 700, and the lamp cup 100 is installed on the fixing fixture 700. Specifically, the fixing fixture includes a base 701 and a fixing seat 702 that can rotate axially. The lamp cup 100 is installed on the fixing seat 702. Since the fixing seat 702 can rotate axially, when the lamp cup 100 is installed on the fixing seat 702, the fixing seat 702 can drive the lamp cup 100 to rotate relative to the base 701.

[0074] The detection module 300 further includes a camera 302. The camera 302 can be a Complementary Metal-Oxide-Semiconductor (CMOS) camera, and the sensor 500 can also be a Charge-coupled Device (CCD) camera. Among them, the camera 302 can also rotate axially.

[0075] Please combine Figure 3, since the image of the lamp cup 100 is a rotationally symmetric figure and the lamp cup 100 has an axis that is rotationally centrosymmetric about the center of the image, after obtaining the image of the lamp cup 100 to be measured, the axis of the lamp cup 100 can be obtained according to the outer contour line of the lamp cup 100, that is, the straight line passing through the center of the outer contour line of the lamp cup 100. The characteristic of a rotationally symmetric figure is that after rotating a certain preset angle around the axis of symmetry, it is exactly the same as the figure before rotation. Based on this characteristic, in the following text, the image is collected, processed, and detected by rotation.

[0076] More specifically, please combine Figure 10 , the detection module 300 can control the camera 302 to be located on the axis I, that is, the center of the camera 302 also passes through the axis I. Thus, the detection module 300 can obtain the initial image of the target area of the lamp cup 100 to be measured through the camera 302 in the first direction. Among them, as Figure 11 shown, the initial image X of the target area includes a part of the outer contour line 110 of the lamp cup 100 and a lamp bead 101.

[0077] Next, since both the camera 302 and the lamp cup 100 can rotate relative to the axis, as Figure 10 shown, the test device 1000 can control the camera 302 to rotate along the axis I in the A direction, or the test device 1000 can control the fixed seat 702 to drive the lamp cup 100 to move along the axis I in the B direction. Therefore, after they rotate relative to each other N times at a preset angle so that the camera 302 and the lamp bead 101 rotate one week relative to the axis, N test images of the target area can be collected.

[0078] Among them, N is an integer greater than or equal to 1. Since each target area includes a part of the outer contour line of the lamp bead 101 and a lamp bead 101, after the N test images of the target area obtained by the detection module 300 contain the images of all the lamp beads 101, it means that the camera 302 and the lamp bead 101 have rotated one week relative to the axis. Therefore, the preset angle multiplied by the number of lamp beads 101 should be equal to 360 degrees. For example, when the number of lamp beads 101 in the lamp cup 100 is 4, the preset angle is 90 degrees. Another example, when the number of lamp beads 101 is 5, the preset angle is 72 degrees. Still another example, when the number of lamp beads 101 is 6, the preset angle is 60.

[0079] It should be noted that when controlling the relative rotation of the camera 302 and the lamp bead 101 by a preset angle, it can be to control the rotation of the camera 302 by the preset angle size alone to obtain the image of the corresponding target area, or to control the rotation of the lamp cup 100 by the preset angle size alone to obtain the image of the corresponding target area, or to control the camera 302 and the lamp cup 100 to rotate together until the preset angle size is reached, so as to obtain the image of the target area. For example, if the preset angle is 60 degrees, the testing device 1000 can control the camera 302 to rotate 30 degrees in the A direction along the axis I and control the lamp cup 100 to rotate 30 degrees in the B direction along the axis I, so that the camera 302 and the lamp cup 100 rotate relative to each other by the preset angle size to obtain the image to be tested of the target area.

[0080] Next, when the detection module 300 obtains the outer contour of the lamp cup 100 and the centroid of the lamp bead 101 in the image, the initial outer contour line and the initial centroid of the lamp bead 101 in the initial image can be recognized, and the outer contour line and the centroid of the lamp cup 100 in the above N images to be tested of the target area can be recognized.

[0081] Since the detection module 300 will obtain N images to be tested of the target area respectively, which can be recorded as the first image, the second image to the Nth image respectively. Therefore, the detection module 300 can obtain the first outer contour line and the first centroid of the lamp bead 101 through the first image; the detection module 300 can obtain the second outer contour line and the second centroid of the lamp bead 101 through the second image, until the Nth outer contour line and the Nth centroid are obtained through the Nth image.

[0082] Please refer to Figure 3 、 Figure 4 and Figure 9 In some embodiments, step 07: obtaining the detection result of the lamp cup 100 according to the outer contour of the lamp cup 100, the centroid of the lamp bead 101 and the preset information further includes the steps:

[0083] 075: If the distance between the outer contour line in a to-be-tested image and the initial outer contour line is not within the qualified range interval of the outer contour line, or the distance between the centroid of the lamp bead 101 in a to-be-tested image and the initial centroid is not within the qualified range interval of the centroid of the lamp bead 101, the detection result is the first result.

[0084] In some embodiments, the detection module 300 is used to execute step 075. That is, if the distance between the outer contour line in a to-be-tested image and the initial outer contour line is not within the qualified range interval of the outer contour line, or the distance between the centroid of the lamp bead 101 in a to-be-tested image and the initial centroid is not within the qualified range interval of the centroid of the lamp bead 101, the detection result is the first result.

[0085] Specifically, the preset information may further include the qualified range interval of the outer contour line of the lamp cup 100 and the qualified range interval of the centroid of the lamp bead 101. After the detection module 300 obtains the initial outer contour line and the initial centroid of the lamp bead 101 in the initial image (i.e., the image obtained when the camera 301 and the lamp cup 100 are not rotated), and also obtains the first outer contour line, the second outer contour line up to the Nth outer contour line, and the first centroid, the second centroid up to the Nth centroid corresponding to the N target area images to be measured, the detection module 300 can then determine whether the distance between the outer contour lines (including the first outer contour line, the second outer contour line... the Nth outer contour line) in the N images to be measured and the initial outer contour line is within the qualified range area of the outer contour line, and determine whether the distance between the centroids (including the first centroid, the second centroid... the Nth centroid) in the N images to be measured and the initial centroid is within the qualified range area of the centroid of the lamp bead 101. If the distance between the outer contour line in one of the N images to be measured and the initial outer contour line is not within the qualified range interval of the outer contour line, or if the distance between the centroid of the lamp bead 101 and the initial centroid in one of the N images to be measured is not within the qualified range interval of the centroid of the lamp bead 101, the detection result is the first result.

[0086] For example, assume that the first image, the second image, and the third image are obtained after rotating three times. Identify the first outer contour line and the first centroid of the lamp bead in the first image, the second outer contour line and the second centroid of the lamp bead in the second image, and the third outer contour line and the third centroid of the lamp bead in the third image. If the distance between any one of the first outer contour line, the second outer contour line, and the third outer contour line and the initial outer contour line is not within the qualified range interval of the outer contour line, or if the distance between any one of the first centroid, the second centroid, and the third centroid and the initial centroid is not within the qualified range interval of the centroid of the lamp bead, the detection result is the first result.

[0087] It should be noted that the preset information may further include a proposed center of the circle. The axis of the outer contour of the lamp cup 100 passes through the proposed center of the circle to play a role of positioning and calibration. When obtaining the image of the target area, the camera 302 and the lamp cup 100 rotate relative to the proposed center of the circle.

[0088] Taking the judgment of whether the distance between the initial outer contour line and the first outer contour line is within the qualified range of the outer contour line, and whether the distance between the initial centroid and the first centroid is within the qualified range of the centroid of the lamp bead 101 as an example for illustration. Specifically, please refer to Figure 12 , Figure 12 (a) is the initial image, Figure 12(b) is the first image. Among them, the distance L1 between the initial outer contour line and the first outer contour line can be obtained by comparing point T1 on the initial outer contour line and point T2 at the corresponding position on the first outer contour line. The distance L2 between the initial centroid and the first centroid can be obtained by comparing the geometric center T3 of the bead 101 image in the initial image and the geometric center T4 of the bead 101 image in the first image. And the positions of the fitted center T5 in the initial image and the fitted center T6 in the first image are the same.

[0089] Next, the detection module 300 can determine whether the distance L1 is within the qualified range interval of the outer contour line and whether the distance L2 is within the qualified range interval of the centroid of the bead 101. For example, if the distance L1 is 0.5, the distance L2 is 0.3, the qualified range interval of the outer contour line is (-0.25, 0.25), and the qualified range interval of the centroid is (-0.25, 0.25), then neither the distance L1 nor the distance L2 is within the corresponding qualified range interval, and the result output by the detection module 300 is the first result. Using the above method, it is determined whether the distances between the second to the Nth outer contour lines and the initial outer contour are within the qualified range of the outer contour line, and whether the distances between the second to the Nth centroids and the initial centroid are within the qualified range of the centroid of the bead 101. In this way, it can be determined whether the distances between the outer contour lines and the initial outer contour in each image to be detected (including the first image, the second image... the Nth image) are within the qualified range of the outer contour line, and whether the distances between the centroids of the beads 101 and the initial centroid in each image to be detected (including the first image, the second image... the Nth image) are within the qualified range of the centroid of the bead 101.

[0090] Exemplarily, in some embodiments, each time an image to be detected is acquired, it is determined whether the distance between the outer contour line and the initial outer contour in this image is within the qualified range of the outer contour line, and whether the distance between the centroid of the bead 101 and the initial centroid in this image to be detected is within the qualified range of the centroid of the bead 101. Only when the distance between the outer contour line and the initial outer contour in this image to be detected is within the qualified range of the outer contour line, and the distance between the centroid of the bead 101 and the initial centroid in this image to be detected is within the qualified range of the centroid of the bead 101, will the acquisition continue to rotate to obtain the next image to be detected. In this way, after finding non-conformities, no redundant detections will be performed, thereby further improving the detection efficiency.

[0091] It should be noted that the first result may also include that the concentricity of the lamp bead 101 is unqualified. The detection module 300 can be pre-set with numbers or characters corresponding to the unqualified concentricity of the lamp bead 101. For example, when the detection module 300 detects that the concentricity of the lamp bead 101 is unqualified, the first result output by the detection module 300 is represented by "4". Thus, when the distance between the outer contour line in one of the first image to the Nth image and the initial outer contour line is not within the qualified range area of the outer contour line, or when the distance between the centroid of the lamp bead in one of the first image to the Nth image and the initial centroid is not within the qualified range area of the outer contour line, if the first result output by the detection module 300 is "4", it indicates that the concentricity of the lamp bead 101 is unqualified.

[0092] Please refer to Figure 3 、 Figure 4 and Figure 13 , the detection method of the embodiment of the present application further includes the steps:

[0093] 06: Identify and obtain the contour line of the through hole 20 and the contour line of the motor 30 in the image.

[0094] Among them, step 07: Obtain the detection result of the lamp cup 100 according to the outer contour of the lamp cup 100, the centroid of the lamp bead 101 and the preset information, and further includes the steps:

[0095] 076: Obtain the detection result according to the outer contour of the lamp cup 100, the centroid of the lamp bead 101, the contour line of the through hole 20, the contour line of the motor 30 and the preset information.

[0096] In some embodiments, the detection module 300 is used to execute step 06 and step 076. That is, the detection module 300 is used to identify and obtain the contour line of the through hole 20 and the contour line of the motor 30 in the image; and obtain the detection result according to the outer contour of the lamp cup 100, the centroid of the lamp bead 101, the contour line of the through hole 20, the contour line of the motor 30 and the preset information.

[0097] Specifically, please combine Figure 2 and Figure 3 , a through hole 20 is provided at the center surrounded by a plurality of sub-lamp cups 10, and a motor 30 is installed in the through hole 20. After the detection module 300 obtains the image of the lamp cup 100, the detection module 300 can also identify and obtain the contour line of the through hole 20 and the contour line of the motor 30 in the image of the lamp cup 100. Thus, when the detection module 300 obtains the detection result, it can be based on the outer contour of the lamp cup 100, the centroid of the lamp bead 101, the contour line of the through hole 20, the contour line of the motor 30 and the preset information to obtain the detection result.

[0098] Among them, the detection module 300 obtains the detection results of the outer contour of the lamp cup 100 and the centroid of the lamp bead 101 through preset information, and the implementation manners of the above step 07 and the sub-steps included in step 07 are the same, which will not be elaborated here one by one.

[0099] More specifically, please refer to Figure 3 , Figure 4 and Figure 14 , in some embodiments, step 076: obtaining the detection result according to the outer contour of the lamp cup 100, the centroid of the lamp bead 101, the contour line of the through hole 20, the contour line of the motor 30 and the preset information, including the steps of:

[0100] 0761: fitting the contour of the through hole 20 into a third shape to be measured, and fitting the contour of the motor 30 into a fourth shape to be measured; and

[0101] 0762: if the coincidence degree between the third shape to be measured and the third shape is less than the third preset value, or if the coincidence degree between the fourth shape to be measured and the fourth shape is less than the fourth preset value, the detection result is the first result.

[0102] In some embodiments, the detection module 300 is used to execute step 0761 and step 0762. That is, the detection module 300 is used to fit the contour of the through hole 20 into a third shape to be measured, and fit the contour of the motor 30 into a fourth shape to be measured; and if the coincidence degree between the third shape to be measured and the third shape is less than the third preset value, or if the coincidence degree between the fourth shape to be measured and the fourth shape is less than the fourth preset value, the detection result is the first result.

[0103] Specifically, after the detection module 300 recognizes and obtains the contour of the through hole 20 and the contour of the motor 30, the detection module 300 can fit the contour of the through hole 20 into a third shape to be measured, and fit the contour of the motor 30 into a fourth shape to be measured according to the contour of the motor 30. Among them, the third shape to be measured is consistent with the contour of the through hole 20, and the fourth shape to be measured is consistent with the contour of the motor 30.

[0104] It should be noted that the preset information also includes a preset third shape and a fourth shape. Among them, the third shape is obtained by fitting the contour of the through hole 20 of the qualified lamp cup 100, and the fourth shape is obtained by fitting the contour of the electrode of the qualified lamp cup 100.

[0105] Taking Figure 15 as an example, the detection module 300 respectively obtains a third shape to be measured P5 and a fourth shape to be measured P6, and the preset information includes a third shape P7 and a fourth shape P8. Among them, the geometric center of the third shape to be measured P5 is O5, and the geometric center of the third shape P7 is O6.

[0106] Next, the detection module 300 can compare whether the coincidence degree between the third shape to be measured P5 and the third shape P7 is less than the third preset value, and compare whether the coincidence degree between the fourth shape to be measured P6 and the fourth shape P8 is less than the fourth preset value. When the coincidence degree between the third shape to be measured P5 and the third shape P7 is less than the third preset value, or the coincidence degree between the fourth shape to be measured P6 and the fourth shape P8 is less than the fourth preset value, the detection result is output as the first result.

[0107] More specifically, the detection module 300 can align the geometric center O5 of the third shape to be measured P5 with the geometric center O6 of the third shape P7. After the geometric centers O5 and O6 are aligned, the detection module 300 can calculate the coincidence degree between the third shape to be measured P5 and the third shape P7, and determine whether the coincidence degree is less than the third preset value to output the corresponding detection result. For example, if the detection module 300 calculates that the coincidence degree between the third shape to be measured P5 and the third shape P7 is 80%, and the third preset value is 85%, it means that the coincidence degree between the third shape to be measured P5 and the third shape P7 is less than the third preset value, and the detection result output by the detection module 300 is the first result, that is, the lamp cup 100 is unqualified. Similarly, the coincidence degree between the fourth shape to be measured P6 and the fourth shape P8 can also be calculated after aligning the fourth shape to be measured P6 and the fourth shape P8, so as to determine whether the coincidence degree is less than the fourth preset value, which will not be elaborated here.

[0108] It can be understood that the third preset value and the fourth preset value are respectively the minimum coincidence degree thresholds between the third shape to be measured P5 and the third shape P7, and between the fourth shape to be measured P6 and the fourth shape P8. When the coincidence degree between the third shape to be measured P5 and the third shape P7 is less than the third preset value, it means that the coincidence degree between the third shape to be measured P5 and the third shape P7 is relatively low. When the coincidence degree between the fourth shape to be measured P6 and the fourth shape P8 is less than the fourth preset value, it means that the coincidence degree between the fourth shape to be measured P6 and the fourth shape P8 is relatively low. Therefore, when the coincidence degree between the third shape to be measured P5 and the third shape P7 is less than the third preset value, or the coincidence degree between the fourth shape to be measured P6 and the fourth shape P8 is less than the fourth preset value, the detection result output by the detection module 300 is the first result, that is, the lamp cup 100 is unqualified. It should be noted that the third preset value and the fourth preset value can be the same or different, which will not be elaborated here.

[0109] In some embodiments, the first result may further include information indicating that the through-hole 20 is unqualified or the motor 30 is unqualified. Specifically, the detection module 300 may be pre-set with numbers or characters corresponding to different information. For example, when the through-hole 20 is unqualified, the first result output by the detection module 300 is represented by "6"; when the motor 30 is unqualified, the first result output by the detection module 300 is represented by "7"; when both the through-hole 20 and the motor 30 are unqualified, the first result output by the detection module 300 is represented by "8". Thus, when the coincidence degree between the third shape to be measured and the third shape is less than the third preset value, the detection result output by the detection module 300 is "6", indicating that the through-hole 20 is unqualified; when the coincidence degree between the fourth shape to be measured and the fourth shape is less than the fourth preset value, the detection result output by the detection module 300 is "7", indicating that the motor 30 is unqualified; when the coincidence degree between the third shape to be measured and the third shape is less than the third preset value, and the coincidence degree between the fourth shape to be measured and the fourth shape is less than the fourth preset value, the detection result output by the detection module 300 is "8", indicating that both the through-hole 20 and the motor 30 are unqualified.

[0110] Thus, the detection module 300 can determine the coincidence degree between the image of the to-be-tested lamp cup 100 and the image of the qualified lamp cup 100 based on the first shape to be measured, the second shape to be measured, the preset first shape and second shape, and when the coincidence degree is lower than the preset value, output the first result, that is, the lamp cup 100 is unqualified, so as to achieve the purpose of detecting whether the to-be-tested lamp cup 100 is qualified.

[0111] Please refer to Figure 3 、 Figure 4 and Figure 16 In some embodiments, step 076: Obtain the detection result according to the outer contour of the lamp cup 100, the centroid of the lamp beads 101, the contour line of the through-hole 20, the contour line of the motor 30, and the preset information, further includes the steps:

[0112] 0763: Respectively obtain the first geometric center, the second geometric center, the third geometric center, and the fourth geometric center of the first shape to be measured, the second shape to be measured, the third shape to be measured, and the fourth shape to be measured; and

[0113] 0764: If the distance between any two of the first geometric center, the second geometric center, the third geometric center, and the fourth geometric center is greater than the second preset distance, the detection result is the first result.

[0114] In some embodiments, the detection module 300 is used to perform step 0763 and step 0764. That is, the detection module 300 is used to obtain the first geometric center, the second geometric center, the third geometric center, and the fourth geometric center of the first shape to be measured, the second shape to be measured, the third shape to be measured, and the fourth shape to be measured respectively; and if the distance between any two geometric centers among the first geometric center, the second geometric center, the third geometric center, and the fourth geometric center is greater than the second preset distance, the detection result is the first result.

[0115] Among them, the first shape to be measured is fitted according to the outer contour of the lamp cup 100, and the second shape to be measured is obtained according to the centroid of a plurality of lamp beads 101. The specific obtaining method is the same as the execution method of the above step 071, and will not be elaborated here one by one.

[0116] Specifically, after the detection module 300 obtains the first shape to be measured, the second shape to be measured, the third shape to be measured, and the fourth shape to be measured. The detection module 300 also needs to detect the concentricity of the outer contour of the lamp cup 100, the lamp beads 101, the through holes 20, and the motor 30 to ensure the overall consistency of the lamp cup 100.

[0117] As Figure 17 shown, the first shape to be measured is B1, the second shape to be measured is B2, the third shape to be measured is B3, and the fourth shape to be measured is B4. The detection module 300 will then obtain the first geometric center K1, the second geometric center K2, the third geometric center K3, and the fourth geometric center K4 of the first shape to be measured B1, the second shape to be measured B2, the third shape to be measured B3, and the fourth shape to be measured B4 respectively.

[0118] Next, the detection module 300 can determine whether the distance between any two geometric centers is greater than the second preset distance, and when the distance between any two geometric centers is greater than the second preset distance, output the detection result as the first result, and the lamp cup 100 is unqualified. As Figure 17 shown, the detection module 300 establishes a coordinate system with the intersection point W of the line passing through the leftmost point of the first shape to be measured B1 and the line passing through the lowermost point of the first shape to be measured B1. Thus, the coordinates of the first geometric center K1, the coordinates of the second geometric center K2, the coordinates of the third geometric center K3, and the coordinates of the fourth geometric center K4 can be obtained respectively. For example, the coordinates of the first geometric center K1 are (5, 5), and the coordinates of the second geometric center K2 are (5, 5.5). Thus, the distance L3 between the first geometric center K1 and the second geometric center K2 can be obtained as 0.5, and the second preset distance is 0.25. That is, the distance L3 is greater than the second preset distance, so the detection result output by the detection module 300 is the first result, that is, the lamp cup 100 is unqualified.

[0119] In some embodiments, the first result may further include information indicating that the position of the through hole 20 is unqualified and the assembly of the motor 30 is unqualified. The detection module 300 may be pre-set with numbers or characters corresponding to the unqualified position of the through hole 20 and the unqualified assembly of the motor 30. For example, when the detection module 300 detects that the position of the through hole 20 is unqualified, the first result output by the detection module 300 is represented by "A". When the detection module 300 detects that the assembly of the motor 30 is unqualified, the first result output by the detection module 300 is represented by "B". When the detection module 300 detects that the position of the through hole 20 is unqualified and the assembly of the motor 30 is unqualified, the first result output by the detection module 300 is represented by "C".

[0120] Specifically, when the detection module 300 determines that the distance between the third geometric center K3 and the first geometric center K1 is greater than the second preset distance, the detection module 300 will output a detection result of "A", indicating that the position of the through hole 20 is unqualified. When the detection module 300 determines that the distance between the third geometric center K3 and the fourth geometric center K4 is greater than the second preset distance, the detection module 300 will output a detection result of "B", indicating that the position of the through hole 20 is unqualified.

[0121] It should be noted that when the detection module 300 determines that the distance between any two geometric centers is greater than the preset distance, the detection module 300 will directly output the detection result as the first result and end the detection operation to improve the detection efficiency.

[0122] Please refer to Figure 3 、 Figure 4 and Figure 18 In some embodiments, step 076: obtaining a detection result according to the outer contour of the lamp cup 100, the centroid of the lamp beads 101, the contour line of the through hole 20, the contour line of the motor 30 and preset information, further includes the steps:

[0123] 0765: If the coincidence degree between the first shape to be measured and the first shape is greater than the first preset value, the coincidence degree between the second shape to be measured and the second shape is greater than the second preset value, the coincidence degree between the third shape to be measured and the third shape is greater than the third preset value, the coincidence degree between the fourth shape to be measured and the fourth shape is greater than the fourth preset value, and if the distance between any two of the first geometric center, the second geometric center, the third geometric center and the fourth geometric center is less than the second preset distance, the detection result is the second result, and the second result indicates that the lamp cup 100 is qualified.

[0124] In some embodiments, the detection module 300 is configured to perform step 0765. That is, the detection module 300 is configured to determine that the detection result is the second result indicating that the lamp cup 100 is qualified if the coincidence degree between the third shape to be measured and the third shape is greater than the third preset value, the coincidence degree between the fourth shape to be measured and the fourth shape is greater than the fourth preset value, and the distance between any two of the first geometric center, the second geometric center, the third geometric center, and the fourth geometric center is less than the second preset distance.

[0125] Among them, the detection result further includes a second result indicating that the lamp cup 100 is qualified. When the coincidence degree between the first shape to be measured and the first shape is greater than the first preset value, the coincidence degree between the second shape to be measured and the second shape is greater than the second preset value, the coincidence degree between the third shape to be measured and the third shape is greater than the third preset value, the coincidence degree between the fourth shape to be measured and the fourth shape is greater than the fourth preset value, and the distance between any two of the first geometric center, the second geometric center, the third geometric center, and the fourth geometric center is less than the second preset distance, it indicates that the outer contour of the lamp cup 100 to be measured, the shape fitted by the plurality of lamp beads 101, the contour of the through hole 20, and the contour of the motor 30 are all within the qualified range, and the distances between the geometric centers of the four are also within the qualified range, that is, it indicates that the lamp cup 100 to be measured is a qualified lamp cup, and at this time, the second result is output.

[0126] It should be noted that the specific implementation manners of specifically determining whether the coincidence degree between the first shape to be measured and the first shape is greater than the first preset value, whether the coincidence degree between the second shape to be measured and the second shape is greater than the second preset value, whether the coincidence degree between the third shape to be measured and the third shape is greater than the third preset value, whether the coincidence degree between the fourth shape to be measured and the fourth shape is greater than the fourth preset value, and whether the distance between any two of the first geometric center, the second geometric center, the third geometric center, and the fourth geometric center is less than the second preset distance are the same as the judgment methods described in the above embodiments and will not be elaborated here. The first distance may be the same as or different from the first distance in the above embodiments, and the first preset value, the second preset value, the third preset value, and the fourth preset value may be the same as or different from each other, and no limitation is made here.

[0127] Please refer to Figure 3 、 Figure 4 and Figure 19 , in some embodiments, step 076: obtaining a detection result according to the outer contour of the lamp cup 100, the centroid of the lamp beads 101, the contour line of the through hole 20, the contour line of the motor 30, and preset information further includes the steps of:

[0128] 0766: Selecting a preset number of points to be measured on the contour line of the motor 30 and obtaining the first distance between each point to be measured and the corresponding position on the contour line of the through hole 20; and

[0129] 0767: If the number of the first distances within the qualified distance range is less than the preset value, the detection result is that the assembly of the motor 30 is unqualified.

[0130] In some embodiments, the detection module 300 is configured to perform step 0766 and step 0767. That is, the detection module 300 is configured to select a preset number of points to be measured on the contour line of the motor 30, and obtain the first distance between each point to be measured and the corresponding position on the contour line of the through hole 20; and if the number of the first distances within the qualified distance range is less than the preset value, the detection result is that the assembly of the motor 30 is unqualified.

[0131] Specifically, when detecting whether the assembly of the motor 30 is qualified, the detection module 300 may also select a predetermined number of points to be measured on the contour line of the motor 30, and obtain the first distance between each point to be measured and the corresponding position on the contour line of the through hole 20.

[0132] As Figure 20 shown, the detection module 300 selects 4 points to be measured on the contour line U1 of the motor 30, namely R1, R2, R3 and R4, and the corresponding positions of each point to be measured on the contour line U2 of the through hole 20 are R5, R6, R7 and R8 respectively. Thus, the detection module 300 can respectively obtain the first distance H1 between R1 and R5, the first distance H2 between R2 and R6, the first distance H3 between R3 and R7, and the first distance H4 between R4 and R8, a total of 4 first distances.

[0133] Next, the detection module 300 needs to determine whether these 4 first distances are within the qualified distance range, and determine whether the number within the qualified distance range is less than the preset value, and when the number of the first distances within the qualified distance range is less than the preset value, the detection module 300 outputs a detection result that the assembly of the motor 30 is unqualified. Among them, the qualified distance range and the preset value are both empirical values.

[0134] For example, the detection module 300 determines that the first distance H1 and the second distance H2 are within the qualified distance range, while the third distance H3 and the fourth distance H4 are not within the qualified distance range, and the preset value is 3, which means that the number of the first distances within the qualified distance range is less than the preset value, and the detection module 300 outputs a detection result that the assembly of the motor 30 is unqualified.

[0135] Please refer to Figure 3 、 Figure 4 and Figure 21 , in some embodiments, step 01: Obtain an image of the to-be-tested lamp cup 100 in the first direction, including the steps:

[0136] 013: Obtain an initial image of the target area of the to-be-tested lamp cup 100 in the first direction through the camera 302 located on the axis;

[0137] 014: The camera 302 rotates relative to the axis of the lamp cup 100, and a to-be-tested image of the target area is collected every time it rotates a preset angle relative to the axis until the camera 302 rotates at least one week relative to the axis of the lamp cup 100 to obtain multiple to-be-tested images. The target area includes part of the outer contour line, part of the outer contour line of the through hole 20, part of the outer contour line of the motor 30, and a lamp bead 101.

[0138] Among them, step 03: Identify and obtain the outer contour of the lamp cup 100 and the centroid of the lamp bead 101 in the image, and further includes the steps:

[0139] 032: Identify the initial outer contour line and the initial centroid of the lamp bead 101 in the initial image, and identify the outer contour line and the centroid of the lamp bead 101 in each to-be-tested image.

[0140] Step 06: Identify and obtain the contour line of the through hole 20 and the contour line of the motor 30 in the image, and further includes the steps:

[0141] 061: Identify the initial contour line of the through hole 20 and the initial contour line of the motor 30 in the initial image, and identify the contour line of the through hole 20 and the contour line of the motor 30 in each to-be-tested image.

[0142] In some embodiments, the detection module 300 is used to execute step 013, step 014, step 032, and step 061. That is, the detection module 300 is used to obtain an initial image of the target area of the to-be-tested lamp cup 100 in the first direction through the camera 302 located on the axis; the camera 302 rotates relative to the axis of the lamp cup 100, and a to-be-tested image of the target area is collected every time it rotates a preset angle relative to the axis until the camera 302 rotates at least one week relative to the axis of the lamp cup 100 to obtain multiple to-be-tested images. The target area includes part of the outer contour line and a lamp bead 101; identify the initial outer contour line and the initial centroid of the lamp bead 101 in the initial image, and identify the outer contour line and the centroid of the lamp bead 101 in each to-be-tested image; and identify the initial contour line of the through hole 20 and the initial contour line of the motor 30 in the initial image, and identify the contour line of the through hole 20 and the contour line of the motor 30 in each to-be-tested image.

[0143] Among them, the execution manner of step 013 is the same as that of the above step 011, and the execution manner of step 032 is the same as that of the above step 031, which will not be elaborated here one by one.

[0144] When executing step 014, due to the partial outer contour lines of the target area, the partial outer contour lines of the through holes 20, the partial outer contour lines of the motor 30 and a lamp bead 101, when step 014 is executed in the execution manner of step 012, N images to be tested including partial outer contour lines, partial outer contour lines of the through holes 20, partial outer contour lines of the motor 30 and a lamp bead 101 can be obtained.

[0145] It should be noted that the images to be tested include a first image, a second image, a third image...the Nth image, where N is an integer greater than or equal to 1. When the camera 302 and the lamp cup 100 rotate N times the preset angle relative to the axis, the Nth image of the target area is collected and acquired. That is, when the camera 302 and the lamp cup 100 rotate once the preset angle relative to the axis, the first image of the target area is collected and acquired; when the camera 302 and the lamp cup 100 rotate twice the preset angle relative to the axis, the second image of the target area is collected and acquired...When the camera 302 and the lamp cup 100 rotate N times the preset angle relative to the axis, the Nth image of the target area is collected and acquired.

[0146] Specifically, when the detection module 300 obtains the contour line of the through hole 20 and the contour line of the motor 30 in the image, it can identify the initial contour line of the through hole 20 and the initial contour line of the motor 30 in the initial image, and identify the initial contour line of the through hole 20 and the contour line of the motor 30 in the above N images of the target area.

[0147] Since the detection module 300 will obtain N images of the target area respectively, which can be recorded as the first image, the second image to the Nth image respectively. Therefore, the detection module 300 can obtain the first contour line of the through hole 20 and the first contour line of the motor 30 through the first image; the detection module 300 can obtain the second contour line of the through hole 20 and the second contour line of the motor 30 through the second image, until the Nth contour line of the through hole 20 and the Nth contour line of the motor 30 are obtained through the Nth image.

[0148] For more details, please refer to Figure 3 , Figure 4 and Figure 21 In some embodiments, step 076: obtaining the detection result according to the outer contour of the lamp cup 100, the centroid of the lamp bead 101, the contour line of the through hole 20, the contour line of the motor 30 and the preset information, further includes the steps of:

[0149] 0768: If there is a distance between the contour line of the through hole 20 in a test image and the initial contour line of the through hole 20 that is not within the qualified range interval of the contour line of the through hole 20; or there is a distance between the contour line of the motor 30 in a test image and the initial contour line of the motor 30 that is not within the qualified range interval of the contour line of the motor 30, then the detection result is the first result.

[0150] In some embodiments, the detection module 300 is configured to perform step 0768. That is, the detection module 300 is configured to determine that the detection result is the first result if the distance between the contour line of the through hole 20 in a to-be-detected image and the initial contour line of the through hole 20 is not within the qualified range interval of the contour line of the through hole 20; or if the distance between the contour line of the motor 30 in a to-be-detected image and the initial contour line of the motor 30 is not within the qualified range interval of the contour line of the motor 30.

[0151] Specifically, the preset information further includes the qualified range interval of the contour line of the through hole 20 and the qualified range interval of the contour line of the motor 30. The detection module 300 obtains the initial contour line of the through hole 20 and the initial contour line of the motor 30 in the initial image (i.e., the image obtained when the camera 301 and the lamp cup 100 are not rotated), and also obtains the first contour line, the second contour line, up to the Nth contour line of the through hole 20 in the above N to-be-detected images, and the first contour line, the second contour line, up to the Nth contour line of the motor 30. After that, the detection module 300 can determine whether the distance between the contour line of the through hole 20 in the N to-be-detected images (including the first contour line, the second contour line... the Nth contour line of the through hole 20) and the initial outer contour line of the through hole 20 is within the qualified range interval of the contour line of the through hole 20, and determine whether the distance between the contour line of the motor 30 in the N to-be-detected images (including the first contour line, the second contour line... the Nth contour line of the motor 30) and the initial contour line of the motor 30 is within the qualified range interval of the contour line of the motor 30.

[0152] If, in the N to-be-detected images, there is an image in which the distance between the contour line of the through hole 20 and the initial contour line of the through hole 20 is not within the qualified range interval of the contour line of the through hole; or if, in the N to-be-detected images, there is an image in which the distance between the contour line of the motor 30 and the initial contour line of the motor 30 is not within the qualified range interval of the contour line of the motor, then the detection result is the first result. For example, assume that the first image, the second image, and the third image are obtained after rotating three times. Identify the first contour line of the through hole 20 and the first contour line of the motor 30 in the first image, the second contour line of the through hole 20 and the second contour line of the motor 30 in the second image, and the third contour line of the through hole 20 and the third contour line of the motor 30 in the third image. If the distance between any one of the first contour line, the second contour line, and the third contour line of the through hole 20 and the initial contour line of the through hole 20 is not within the qualified range interval of the contour line of the through hole 20, or if the distance between any one of the first contour line, the second contour line, and the third contour line of the motor 30 and the initial contour line of the motor 30 is not within the qualified range interval of the contour line of the motor 30, then the detection result is the first result.

[0153] It should be noted that the preset information may further include a proposed center of the circle. The axis of the outer contour of the above lamp cup 100 passes through the proposed center of the circle to play a role in positioning and calibration. When acquiring the image of the target area, the camera 302 and the lamp cup 100 rotate relative to the proposed center of the circle.

[0154] Taking whether the distance between the initial contour line of the through hole 20 and the first contour line of the through hole 20 of the through hole 20 is within the qualified range of the contour line of the through hole 20, and whether the distance between the initial contour line of the motor 30 and the first contour line of the motor 30 is within the qualified range of the contour line of the motor 30 as an example for illustration. Specifically, please combine Figure 22 , Figure 22 (a) is the initial image, Figure 22 (b) is the first image. Among them, the distance L4 between the initial contour line of the through hole 20 and the first contour line of the through hole 20 can be obtained by comparing the G1 point on the initial contour line of the through hole 20 and the G2 point at the corresponding position on the first contour line of the through hole 20. The distance L5 between the initial contour line of the motor 30 and the first contour line of the motor 30 can be obtained by comparing the G3 point on the initial contour line of the motor 30 and the G4 point at the corresponding position on the first contour line of the motor 30. And the positions of the fitting center G5 in the initial image and the fitting center G6 in the first image are the same.

[0155] Next, the detection module 300 can then determine whether the distance L4 is within the qualified range interval of the contour line of the through hole 20, and determine whether L5 is within the qualified range interval of the contour line of the motor 30. For example, if the distance L4 is 0.5, the distance L5 is 0.25, the qualified range interval of the contour line of the through hole 20 is (-0.25, 0.25), and the qualified range interval of the contour line of the motor 30 is (-0.3, 0.3), then the distance L5 is not within the corresponding qualified range interval, and the result output by the detection module 300 is the first result. Using the above method to determine whether the distance between the second to Nth contour lines of the through hole 20 and the initial contour line of the through hole 20 is within the qualified range of the contour line of the through hole 20, and whether the distance between the second to Nth contour lines of the motor 30 and the initial contour line of the motor 30 is within the qualified range of the contour line of the motor 30. In this way, it can be determined whether the distance between the contour line of the through hole 20 and the initial contour line of the through hole 20 in each image to be measured (including the first image, the second image... the Nth image) is within the qualified range interval of the contour line of the through hole 20, and whether the distance between the contour line of the motor 30 and the initial contour line of the motor 30 in each image to be measured (including the first image, the second image... the Nth image) is within the qualified range interval of the contour line of the motor 30.

[0156] Exemplarily, in some embodiments, for each acquired image to be measured, it is determined whether the distance between the contour line of the through hole 20 in the image to be measured and the initial contour line of the through hole 20 is within the qualified range of the contour line of the through hole 20, and whether the distance between the contour line of the motor 30 in the image to be measured and the initial contour line of the motor 30 is within the qualified range of the contour line of the motor 30. Only when the distance between the contour line of the through hole 20 in the image to be measured and the initial contour line of the through hole 20 is within the qualified range of the contour line of the through hole 20, and the distance between the contour line of the motor 30 in the image to be measured and the initial contour line of the motor 30 is within the qualified range of the contour line of the motor 30, will the acquisition continue to rotate to obtain the next image to be measured. In this way, after detecting unqualified, unnecessary detections will no longer be performed, thereby further improving the detection efficiency.

[0157] It should be noted that the first result may further include information on the unqualified position of the through hole 20 and the unqualified assembly of the motor 30. The detection module 300 can be pre-set with numbers or characters corresponding to the unqualified position of the through hole 20 and the unqualified assembly of the motor 30. For example, when the detection module 300 detects that the position of the through hole 20 is unqualified, the first result output by the detection module 300 is represented by "X"; when the detection module 300 detects that the assembly of the motor 30 is unqualified, the first result output by the detection module 300 is represented by "Y".

[0158] Thus, when the distance between the contour line of the through hole 20 in one of the first image to the Nth image and the initial contour line of the through hole 20 is not within the qualified range interval of the contour line of the through hole 20, the detection module 300 outputs the detection result as "X", that is, the position of the through hole 20 is unqualified; when the distance between the contour line of the motor 30 in one of the first image to the Nth image and the initial contour line of the motor 30 is not within the qualified range interval of the contour line of the motor 30, the initial result output by the detection module 300 is "Y", indicating that the assembly of the motor 30 is unqualified.

[0159] Please refer to Figure 3 、 Figure 4 and Figure 23 , in some embodiments, step 076: obtaining the detection result according to the outer contour of the lamp cup 100, the centroid of the lamp bead 101, the contour line of the through hole 20, the contour line of the motor 30 and the preset information, further includes the steps:

[0160] 0769: If the distance between the outer contour line in each image to be measured and the initial outer contour line is within the qualified range interval of the outer contour line, the distance between the centroid of the lamp bead 101 and the initial centroid in each image to be measured is within the qualified range interval of the centroid of the lamp bead 101, the distance between the contour line of the through hole 20 and the initial contour line of the through hole 20 in each image to be measured is within the qualified range interval of the contour line of the through hole 20, and the distance between the contour line of the motor 30 and the initial contour line of the motor 30 in each image to be measured is within the qualified range interval of the contour line of the motor 30, then the detection result is the second result, and the second result indicates that the lamp cup is qualified.

[0161] In some embodiments, the detection module 300 is configured to execute step 0769. That is, the detection module 300 is configured to, if the distance between the outer contour line in each image to be measured and the initial outer contour line is within the qualified range interval of the outer contour line, the distance between the centroid of the lamp bead 101 and the initial centroid in each image to be measured is within the qualified range interval of the centroid of the lamp bead 101, the distance between the contour line of the through hole 20 and the initial contour line of the through hole 20 in each image to be measured is within the qualified range interval of the contour line of the through hole 20, and the distance between the contour line of the motor 30 and the initial contour line of the motor 30 in each image to be measured is within the qualified range interval of the contour line of the motor 30, then the detection result is the second result, and the second result indicates that the lamp cup is qualified.

[0162] Specifically, as can be seen from the above, the outer contour line of the lamp cup 100, the centroid of the lamp bead 101, the contour of the through hole 20, and the contour line of the motor 30 all have corresponding qualified range intervals. Therefore, when determining whether the lamp cup 100 is qualified, the distances between the outer contour lines of the lamp cup 100, the centroids of the lamp beads 101, the contours of the through holes 20, and the contour lines of the motors 30 in all images to be measured need to be within the corresponding qualified range intervals, and the detection module 300 can output the detection result as the second result, and the second result is used to indicate that the lamp cup 100 is qualified.

[0163] It should be noted that the specific methods for determining whether the distance between the outer contour line in the image to be measured and the initial outer contour line is within the qualified range interval of the outer contour line, whether the distance between the centroid of the lamp bead 101 and the initial centroid in the image to be measured is within the qualified range interval of the centroid of the lamp bead, whether the distance between the contour line of the through hole 20 and the initial contour line of the through hole 20 in the image to be measured is within the qualified range interval of the contour line of the through hole 20, and whether the distance between the contour line of the motor 30 and the initial contour line of the motor 30 in the image to be measured is within the qualified range interval of the contour line of the motor 30 are the same as the specific methods described in the above embodiments and will not be elaborated here.

[0164] In the description of this specification, the descriptions referring to the terms "certain embodiments", "in one example", "exemplarily", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0165] Any process or method description shown in the flowchart or described in other ways herein can be understood to represent a module, segment or portion of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in an order opposite to that shown or discussed, according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

[0166] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present application.

Claims

1. A detection method for detecting a lamp cup, characterized in that, the lamp cup includes a plurality of sub - lamp cups arranged in a ring, and lamp beads are provided in each of the sub - lamp cups; the detection method includes: acquiring an image of the lamp cup to be measured in a first direction, the first direction being opposite to the light - emitting direction of the lamp cup; identifying and acquiring the outer contour of the lamp cup and the centroid of the lamp beads in the image; acquiring preset information, the preset information being used to characterize the characteristics of a qualified lamp cup; acquiring a detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp beads and the preset information; wherein, the detection result includes a first result for characterizing that the lamp cup is unqualified; the preset information includes a preset first shape and a second shape, and acquiring the detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp beads and the preset information includes: fitting the outer contour of the lamp cup into a first shape to be measured, and obtaining a second shape to be measured according to the centroids of the plurality of lamp beads; if the coincidence degree between the first shape to be measured and the first shape is less than a first preset value; or, if the coincidence degree between the second shape to be measured and the second shape is less than a second preset value, then the detection result is the first result; acquiring the detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp beads and the preset information further includes: acquiring a first geometric center of the first shape to be measured and a second geometric center of the second shape to be measured; if the distance between the first geometric center and the second geometric center is greater than a first preset distance, then the detection result is the first result.

2. The detection method according to claim 1, characterized in that, the image is a rotation - symmetric figure, the lamp cup has an axis passing through the rotation - symmetric center of the image, and acquiring an image of the lamp cup to be measured in a first direction includes: acquiring an initial image of a target area of the lamp cup to be measured in a first direction through a camera located on the axis; the camera rotates relative to the lamp cup with respect to the axis, and collects a to - be - measured image of the target area every time it rotates a preset angle relative to the axis until the camera rotates relative to the lamp cup at least one week with respect to the axis to obtain a plurality of to - be - measured images, the target area includes part of the outer contour line and one lamp bead; identifying and acquiring the outer contour of the lamp cup and the centroid of the lamp beads in the image includes: identifying an initial outer contour line and an initial centroid of the lamp beads in the initial image, and identifying the outer contour line and the centroid of the lamp beads in each to - be - measured image.

3. The detection method according to claim 2, characterized in that, the preset information includes a qualified range interval of the outer contour line and a qualified range interval of the centroid of the lamp beads, and acquiring the detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp beads and the preset information includes: If the distance between the outer contour line in a said image to be measured and the initial outer contour line is not within the qualified range interval of the outer contour line, or if the distance between the centroid of the lamp beads in a said image to be measured and the initial centroid is not within the qualified range interval of the centroid of the lamp beads, then the detection result is the first result.

4. The detection method according to claim 1, wherein, a through hole is provided at the center surrounded by a plurality of said sub-lamp cups, and a motor is installed in the through hole, and the detection method further includes: identifying and obtaining the contour line of the through hole and the contour line of the motor in the image; The obtaining the detection result of the lamp cup according to the outer contour of the lamp cup, the centroid of the lamp beads and the preset information includes: obtaining the detection result according to the outer contour of the lamp cup, the centroid of the lamp beads, the contour line of the through hole, the contour line of the motor and the preset information.

5. The detection method according to claim 4, wherein, the preset information includes a preset third shape and a fourth shape, and the obtaining the detection result according to the outer contour of the lamp cup, the centroid of the lamp beads, the contour line of the through hole, the contour line of the motor and the preset information includes: fitting the contour line of the through hole into a third shape to be measured, and fitting the contour line of the motor into a fourth shape to be measured; if the coincidence degree between the third shape to be measured and the third shape is less than a third preset value, or if the coincidence degree between the fourth shape to be measured and the fourth shape is less than a fourth preset value, then the detection result is the first result.

6. The detection method according to claim 5, wherein, the obtaining the detection result according to the outer contour of the lamp cup, the centroid of the lamp beads, the contour line of the through hole, the contour line of the motor and the preset information further includes: respectively obtaining the first geometric center, the second geometric center, the third geometric center and the fourth geometric center of the first shape to be measured, the second shape to be measured, the third shape to be measured and the fourth shape to be measured, wherein the first shape to be measured is fitted according to the outer contour of the lamp cup, and the second shape to be measured is obtained according to the centroids of a plurality of said lamp beads; if the distance between any two of the first geometric center, the second geometric center, the third geometric center and the fourth geometric center is greater than a second preset distance, then the detection result is the first result.

7. The detection method according to claim 6, wherein, the preset information further includes a first shape and a second shape, the detection result further includes a second result, and the obtaining the detection result according to the outer contour of the lamp cup, the centroid of the lamp beads, the contour line of the through hole, the contour line of the motor and the preset information further includes: If the coincidence degree between the first shape to be measured and the first shape is greater than a first preset value, the coincidence degree between the second shape to be measured and the second shape is greater than a second preset value, the coincidence degree between the third shape to be measured and the third shape is greater than a third preset value, the coincidence degree between the fourth shape to be measured and the fourth shape is greater than a fourth preset value, and if the distance between any two of the first geometric center, the second geometric center, the third geometric center and the fourth geometric center is less than the second preset distance, the detection result is a second result, and the second result indicates that the lamp cup is qualified.

8. The detection method according to claim 4, wherein, the first result further includes unqualified motor assembly, and obtaining the detection result according to the outer contour of the lamp cup, the centroid of the lamp bead, the contour line of the through hole, the contour line of the motor and preset information further includes: selecting a preset number of points to be measured on the contour line of the motor, and obtaining a first distance between each point to be measured and the corresponding position on the contour line of the through hole; if the number of first distances within the qualified distance range is less than the preset value, the detection result is unqualified motor assembly.

9. The detection method according to claim 4, wherein, the image is a rotationally symmetric figure, the lamp cup has an axis passing through the rotation symmetry center of the image, and obtaining the image of the lamp cup to be measured in the first direction includes: obtaining an initial image of a target area of the lamp cup to be measured in the first direction through a camera located on the axis; the camera rotates relative to the lamp cup with respect to the axis, and a measured image of the target area is collected every time it rotates a preset angle relative to the axis until the camera rotates relative to the lamp cup with respect to the axis for at least one week to obtain a plurality of measured images, and the target area includes part of the outer contour line, part of the outer contour line of the through hole, part of the outer contour line of the motor and one lamp bead; identifying and taking the outer contour of the lamp cup and the centroid of the lamp bead in the image includes: identifying the initial outer contour line and the initial centroid of the lamp bead in the initial image, and identifying the outer contour line and the centroid of the lamp bead in each measured image; identifying and obtaining the contour line of the through hole and the contour line of the motor in the image includes: identifying the initial contour line of the through hole and the initial contour line of the motor in the initial image, and identifying the contour line of the through hole and the contour line of the motor in each measured image.

10. The detection method according to claim 9, wherein, the preset information includes a qualified range interval of the contour line of the through hole and a qualified range interval of the contour line of the motor, and obtaining the detection result according to the outer contour of the lamp cup, the centroid of the lamp bead, the contour line of the through hole, the contour line of the motor and preset information further includes: If the distance between the contour line of the through hole in one of the to-be-tested images and the initial contour line of the through hole is not within the qualified range interval of the contour line of the through hole; or if the distance between the contour line of the motor in one of the to-be-tested images and the initial contour line of the motor is not within the qualified range interval of the contour line of the motor, then the detection result is the first result.

11. The detection method according to claim 10, wherein, the detection result further includes a second result, the preset information further includes a qualified range interval of the outer contour line and a qualified range interval of the centroid of the lamp bead, and obtaining the detection result according to the outer contour of the lamp cup, the centroid of the lamp bead, the contour line of the through hole, the contour line of the motor and the preset information further includes: If the distance between the outer contour line in each of the to-be-tested images and the initial outer contour line is within the qualified range interval of the outer contour line, the distance between the centroid of the lamp bead in each of the to-be-tested images and the initial centroid is within the qualified range interval of the centroid of the lamp bead, the distance between the contour line of the through hole in each of the to-be-tested images and the initial contour line of the through hole is within the qualified range interval of the contour line of the through hole, and the distance between the contour line of the motor in each of the to-be-tested images and the initial contour line of the motor is within the qualified range interval of the contour line of the motor, then the detection result is the second result, and the second result indicates that the lamp cup is qualified.

12. A test device for detecting a lamp cup, wherein, it includes: a conveyor belt for driving the lamp cup to move to the detection station; and a detection module for performing the detection method according to any one of claims 1-11 on the lamp cup at the detection station and outputting the detection result.

13. The test device according to claim 12, wherein, it further includes: a lighting device for emitting light towards the lamp cup; and a sensor for detecting whether there is a lamp cup at the detection station; if there is a lamp cup at the detection station, the lighting device is turned on; if the lamp cup leaves the detection station, the lighting device is turned off.

14. The test device according to claim 13, wherein, it further includes: a fixing tooling, the fixing tooling includes a base and a rotatable fixing seat in the axial direction, and the lamp cup is installed on the fixing seat.

Citation Information

Patent Citations

  • Component size detection method and system and terminal equipment

    CN110211110A