Light supplementing equipment detection method and device, electronic equipment and storage medium

By image processing of the lighting images of fill light equipment, the average grayscale value of each square and the grayscale difference value is calculated, the problem of artificial experience and high cost in the detection of fill light equipment in the prior art is solved, and efficient and objective detection results are achieved.

CN120194909APending Publication Date: 2025-06-24ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311779851.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the prior art, the detection of fill-up light equipment depends on human experience, is subjective and has great variability, making it difficult to obtain accurate detection results, and the detection cost is high.

Method used

By acquiring the lighting image of the fill light device, dividing the image into multiple grids, determining the average grayscale value of each grid, and determining the detection result of the fill light device based on the grayscale difference between the average grayscale values ​​of the target grid on the diagonal line.

Benefits of technology

It realizes simple and low-cost performance detection of fill-up equipment, obtains objective and reliable detection results, and overcomes the problems of strong subjectivity, large variability and high detection costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120194909A_ABST
    Figure CN120194909A_ABST
Patent Text Reader

Abstract

The invention provides a light supplementing equipment detection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an illumination image of light supplementing equipment; dividing the illumination image, and determining an average gray value of each of a plurality of grids obtained by division; according to the method, the target checks on the diagonals of the illumination image are determined, and the detection result of the light supplementing equipment is determined based on the gray difference value between the average gray values of the target checks, so that the defects that an existing detection method of the light supplementing equipment is relatively high in subjectivity and variability, an accurate detection result is difficult to obtain and the detection cost is high are overcome; objective and reliable performance detection of the light supplementing equipment is achieved, and the method is simple, rapid, low in cost, extremely high in accuracy and high in practicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular, to a method, device, electronic device, and storage medium for detecting a supplementary light device. Background Art

[0002] In the field of security lighting, as an important lighting device, the optical performance of a supplementary light directly affects the actual use effect. Therefore, how to accurately and effectively test the optical performance of security lighting products has become the focus of attention.

[0003] Currently, the judgment of the optical performance of a supplementary light mainly relies on human experience and is subjectively judged by the human eye. Specifically, the device is set up for real-scene shooting, and then the tester judges whether the supplementary light effect meets the requirements according to experience. This method depends on the professional experience of the tester, and for different products, their application situations vary greatly, and the judgment basis also changes accordingly. The subjectivity is too strong and the variability is too large, making it difficult to obtain an objective and reasonable judgment result. In addition, there is currently a method of using high-precision detection instruments to detect the optical performance of products, but this method is too costly although it has high precision. Summary of the Invention

[0004] The present invention provides a method, device, electronic device, and storage medium for detecting a supplementary light device, which are used to solve the defects in the prior art that the detection of a supplementary light device depends on human experience, has strong subjectivity, large variability, is difficult to obtain accurate detection results, and has high detection costs, and realizes simple and low-cost performance detection of a supplementary light device to obtain objective and reliable detection results.

[0005] The present invention provides a method for detecting a supplementary light device, including:

[0006] Obtaining a lighting image of the supplementary light device;

[0007] Dividing the lighting image and determining the average gray value of each of the multiple squares obtained by the division;

[0008] Determining target squares on the diagonal of the lighting image and determining the detection result of the supplementary light device based on the gray value difference between the average gray values of the target squares.

[0009] According to the method for detecting a supplementary light device provided by the present invention, the target squares include the diagonal squares on the diagonal;

[0010] The determining the detection result of the supplementary light device based on the gray value difference between the average gray values of the target squares includes:

[0011] Determine the detection result of the flashlight effect of the supplementary lighting device based on the gray-scale difference between the average gray-scale values of the diagonal squares;

[0012] Determine the detection result of the supplementary lighting device based on the detection result of the flashlight effect.

[0013] According to a method for detecting a supplementary lighting device provided by the present invention, the target squares include vertex squares at the diagonal vertices, a central square at the intersection of the diagonals, and corner squares on the diagonal at a certain distance from the central square;

[0014] The determining the detection result of the supplementary lighting device based on the gray-scale difference between the average gray-scale values of the target squares includes:

[0015] Determine the vignetting detection result of the supplementary lighting device based on the gray-scale difference between the average gray-scale value of the vertex square and the average gray-scale value of the corner square, and the average gray-scale value of the central square;

[0016] Determine the detection result of the supplementary lighting device based on the vignetting detection result.

[0017] According to a method for detecting a supplementary lighting device provided by the present invention, the determining the detection result of the flashlight effect of the supplementary lighting device based on the gray-scale difference between the average gray-scale values of the diagonal squares includes:

[0018] Determine the set of average gray-scale values of the diagonal based on the average gray-scale values of the diagonal squares;

[0019] Determine the gray-scale value curve corresponding to the diagonal and the slope of each segment in the gray-scale value curve based on the set of average gray-scale values of the diagonal, and the serial number difference of the squares corresponding to the two vertices of each segment is the same;

[0020] Determine the adjacent slope difference based on the slopes of every two adjacent segments;

[0021] Determine the detection result of the flashlight effect of the supplementary lighting device based on the adjacent slope difference.

[0022] According to a method for detecting a supplementary lighting device provided by the present invention, the determining the vignetting detection result of the supplementary lighting device based on the gray-scale difference between the average gray-scale value of the vertex square and the average gray-scale value of the corner square, and the average gray-scale value of the central square includes:

[0023] Determine the corner slope difference based on the gray-scale difference between the average gray-scale value of the vertex square and the average gray-scale value of the corner square, and the average gray-scale value of the central square;

[0024] Determine the vignetting detection effect of the fill light device based on the corner slope difference.

[0025] According to a fill light device detection method provided by the present invention, determining the vignetting detection result of the fill light device based on the gray level difference between the average gray level value of the vertex grid and the average gray level value of the corner grid, and the average gray level value of the central grid, includes:

[0026] The target grid includes the vertex grids at the diagonal vertices and the central grid at the intersection of the diagonals;

[0027] Determining the detection result of the fill light device based on the gray level difference between the average gray level values of the target grids includes:

[0028] Determine the vignetting detection result of the fill light device based on the gray level difference between the average gray level value of the vertex grid and the average gray level value of the central grid;

[0029] Determine the detection result of the fill light device based on the vignetting detection result.

[0030] According to a fill light device detection method provided by the present invention, determining the flashlight effect detection result of the fill light device based on the adjacent slope difference includes:

[0031] If the adjacent slope difference is less than the first threshold, determine that the flashlight effect detection result of the fill light device is qualified;

[0032] Otherwise, determine that the flashlight effect detection result of the fill light device is unqualified;

[0033] Determining the vignetting detection effect of the fill light device based on the corner slope difference includes:

[0034] If the corner slope difference is less than the second threshold, determine that the vignetting detection result of the fill light device is qualified;

[0035] Otherwise, determine that the vignetting detection result of the fill light device is unqualified.

[0036] The present invention also provides a fill light device detection apparatus, including:

[0037] An acquisition unit for acquiring the illumination image of the fill light device

[0038] A division unit for dividing the illumination image and determining the average gray level value of each of the multiple grids obtained by the division;

[0039] The detection unit is used to determine the target squares on the diagonal of the illumination image, and determine the detection result of the fill light device based on the gray level difference between the average gray level values of the target squares.

[0040] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the fill light device detection method described in any one of the above is implemented.

[0041] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the fill light device detection method described in any one of the above is implemented.

[0042] The fill light device detection method, device, electronic device, and storage medium provided by the present invention detect the optical performance through the illumination image of the fill light device, and detect the fill light effect of the fill light device through the gray level difference between the average gray level values of the target squares on the diagonal of the illumination image, so as to obtain the detection result. It overcomes the defects that the current detection method of the fill light device has strong subjectivity, large variability, is difficult to obtain accurate detection results, and has high detection costs, realizes objective and reliable detection of the performance of the fill light device, is not only simple and fast but also low in cost, and has extremely high accuracy and strong practicability. Description of the Drawings

[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0044] Figure 1 is a schematic flow chart of the fill light device detection method provided by the present invention;

[0045] Figure 2 is a schematic diagram of the actual scene shooting of the fill light of the network camera provided by the present invention;

[0046] Figure 3 is a schematic diagram of the fill light dark corner provided by the present invention;

[0047] Figure 4 is a schematic diagram of the flashlight effect provided by the present invention;

[0048] Figure 5 is a schematic diagram of the illumination image acquisition provided by the present invention;

[0049] Figure 6 is a schematic diagram of the illumination image segmentation process provided by the present invention;

[0050] Figure 7 is one of the example diagrams of the gray value curve of diagonal D1 provided by the present invention;

[0051] Figure 8 is one of the example diagrams of the gray value curve of diagonal D2 provided by the present invention;

[0052] Figure 9 is one of the example diagrams of the illumination image provided by the present invention;

[0053] Figure 10 is the second example diagram of the gray value curve of diagonal D1 provided by the present invention;

[0054] Figure 11 is the second example diagram of the gray value curve of diagonal D2 provided by the present invention;

[0055] Figure 12 is the second example diagram of the illumination image provided by the present invention;

[0056] Figure 13 is the structural schematic diagram of the fill light device detection device provided by the present invention;

[0057] Figure 14 is the structural schematic diagram of the electronic device provided by the present invention. Detailed implementation manners

[0058] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.

[0059] Currently, the confirmation of the optical performance of fill light devices mainly relies on subjective judgment by the human eye or detection by high-end equipment instruments. Among them, the former judges whether the fill light effect meets the actual use through IPC (IP Camera, network camera) fill light real-scene shooting. Figure 2 is the schematic diagram of the IPC fill light real-scene shooting provided by the present invention. As Figure 2 shown, select an environment with basically no ambient light at night. In this environment, after setting up the device at the actual application height and the object distance to be covered, turn on the fill light, start the computer web (World Wide Web) end interface, aim at the front and shoot, and judge whether the illumination at the center and around of the captured image is uniform through experience, and whether there are fill light dark corners or flashlight effects. Figure 3 is the schematic diagram of the fill light dark corner provided by the present invention.Figure 4 This is a schematic diagram of the flashlight effect provided by the present invention. As shown in Figure 3 and Figure 4 shown, it is determined whether these two situations exist in the captured image.

[0060] However, although this method can also complete the judgment of the optical performance of the fill light device, it relies too much on the professional experience of the testers, and for different products, its application situations vary greatly, and the judgment basis also changes accordingly. It is too subjective and variable, and it is impossible to obtain an objective and reliable judgment result. At the same time, there is no white-box testing method to determine the judgment standard of the device.

[0061] In addition, the latter relies on high-precision and high-stability equipment and instruments to detect the official school performance of the fill light device. For example, a full-space distributed photometer can be used for detection. It mainly consists of a near-field detector, a far-field detector, a rotating arm machine table, and two reflecting mirrors. The corresponding working principle is that when the luminous area of the tested lamp is small, the near-field probe can be used. The tested lamp is installed on the rotating shaft, and the rotatable reflecting mirror (M1) and the fixed reflecting mirror (M2) are covered with black flannelette to ensure that the near-field detector can directly receive the light from the tested lamp. Driven by the rotating arm, the near-field detector rotates around the tested lamp, and the light intensity of the tested lamp at various angles in a certain plane can be measured. During the measurement, the tested lamp can rotate around the vertical axis to switch different measurement planes for complete detection.

[0062] Correspondingly, when the luminous area of the tested lamp is large, the far-field detector can be used. The light emitted by the tested lamp in a certain direction is reflected by the rotatable reflecting mirror (M1) to the fixed reflecting mirror (M2), and then reflected by the fixed reflecting mirror and incident on the far-field detector. Among them, the same rigid rotating arm can drive the rotatable reflecting mirror and the near-field detector to rotate around the tested lamp, and the light intensity at various angles of the tested lamp in a certain plane can be measured. And the tested lamp can rotate around the vertical axis to switch different measurement planes, so as to complete the detection.

[0063] This method can measure the total luminous flux of lamps of various sizes with high precision, but its cost is high, and for the judgment of most fill light device application levels, such high precision is not required. Instead, the high cost will deter people.

[0064] Therefore, in order to eliminate the influence of human judgment factors and control the detection cost of the device, designing a low-cost, high-accuracy, and objective and reliable detection method to verify the optical performance of the fill light device has become the top priority at present.

[0065] In view of this, the present invention provides a method for detecting a fill light device, aiming to use the illumination image of the fill light device to detect and determine the optical performance. By calculating the gray difference between the average gray values of the target squares on the diagonal in the illumination image, the fill light effect of the fill light device can be detected, so as to obtain the detection result, realizing objective and reliable detection of the performance of the fill light device. This method is not only simple and fast, but also low-cost and highly accurate, avoiding the problems of strong subjectivity, large variability, difficulty in obtaining accurate detection results, and high detection costs in the current detection methods. It can perform white-box testing on the fill light device without expensive detection equipment. Figure 1 is a schematic flowchart of the method for detecting a fill light device provided by the present invention, as Figure 1 shown, the method includes:

[0066] Step 110, obtaining an illumination image of the fill light device;

[0067] Specifically, before the detection, it is first necessary to determine the detection object, that is, the fill light device to be detected. Here, the fill light device to be detected can be a fill light, such as a photographic light, a white light, an LED (light-emitting diode) light, etc., or a device equipped with a fill light, for example, a photographic device, a security lighting device, a live broadcast device, or other intelligent devices. The embodiments of the present invention do not make specific limitations on this.

[0068] After determining the fill light device, if its optical performance needs to be detected, an intermediate medium, that is, a medium for detecting the optical performance of the fill light device, needs to be obtained. Considering that the fill light device often provides stable illumination in the case of insufficient light or low light intensity to enhance the shooting effect, and the purpose of detecting it is also to determine its fill light / illumination effect, so here the medium for judgment can be determined as the fill light image of the fill light device, that is, the illumination image when it is used for fill light illumination.

[0069] Furthermore, to ensure the accuracy and reliability of the detection result obtained by detecting based on the illumination image, in the embodiments of the present invention, it is necessary to ensure that the light source corresponding to this illumination image is only the fill light, that is, in a scene without ambient light around the darkroom, when the fill light device is turned on, or when the fill light in the fill light device is turned on, the captured image is used as the illumination image of the fill light device.

[0070] Specifically, when the fill light device is an IPC, the process of collecting the illumination image can be, Figure 5 is a schematic diagram when collecting the illumination image provided by the present invention, as Figure 5As shown in the figure, first, the supplementary lighting device can be placed in a darkroom, and the tripod and stabilizer (such as a pan-tilt head) can be set up. Then, the IPC to be tested is placed on the pan-tilt head so that the supplementary light of the IPC faces the white wall directly. Here, the area of the wall needs to be larger than the illumination range of the supplementary light. For example, the wall can be more than 3 meters long and wide. After that, the IPC can be powered on and images can be initially collected. Based on these images, the position of the IPC can be adjusted to ensure the front direction of the IPC and avoid inaccurate detection results caused by tilting. Moreover, when adjusting the position of the IPC, the IPC can be moved to the extreme position of the darkroom while ensuring that the entire picture is the wall, that is, the farther the IPC is from the wall, the better. After adjusting the position of the IPC, the supplementary light can be turned on, the supplementary light brightness can be set to the maximum, the exposure parameters can be set, and then image collection can be carried out to obtain illumination images.

[0071] In addition, it should be noted that the supplementary lighting device can be single or multiple. In the case of multiple supplementary lighting devices, the corresponding illumination images need to be obtained respectively for optical performance detection based on them to verify their optical performance, so as to achieve the purpose of detecting the quality of their supplementary lighting effects and further obtain the detection results of the supplementary lighting device.

[0072] Step 120: Divide the illumination image and determine the average gray value of each of the multiple squares obtained by the division.

[0073] Specifically, after obtaining the illumination image in step 110, this illumination image can be segmented to obtain multiple divided patches. Each patch corresponds to a square, that is, multiple squares can be obtained, and the average gray value of each square among these multiple squares can be determined.

[0074] Here, the average gray value of each square is the average gray value of the patch corresponding to the square. This average gray value can be calculated through the gray values of the pixel points in the patch, that is, first sum the gray values of the pixel points in the patch to obtain the total gray value, and then average this total gray value to obtain the average gray value of the patch / square, that is, divide the total gray value by the total number of pixel points therein to obtain the average gray value.

[0075] It can be understood that after obtaining the illumination image, the illumination image can be processed to divide it into multiple squares, that is, the illumination image can be divided to divide it into multiple squares of the same size. Each square corresponds to a patch, so that multiple squares can be obtained. Specifically here, the illumination image can be divided into squares through an image processing software or other processing algorithms, and it can be divided into n*n squares or n*m squares to obtain multiple divided squares.

[0076] Figure 6It is a schematic diagram of the lighting image segmentation process provided by the present invention. As Figure 6 shown, the lighting image can be divided in the n*n manner and segmented into n*n squares. After that, it is also necessary to determine the average gray value of these n*n squares. Specifically, it can be done as follows: according to the setting of the coordinate system, with the lower left corner of the lighting image as the origin, its x direction and y direction are determined, where x = 0, 1, 2, 3... n - 1, y = 0, 1, 2, 3... n - 1. The average gray value of each square in the lighting image can be represented by A x,y and A x,y is the average value of the gray values of all pixel points in the square. The overall gray value of the lighting image can be represented by S.

[0077]

[0078] Step 130: Determine the target squares on the diagonal of the lighting image, and based on the gray difference between the average gray values of the target squares, determine the detection result of the supplementary lighting device.

[0079] Specifically, in step 120, after obtaining each square in the lighting image and the average gray value of each square, the squares on the diagonal of the lighting image can be determined therefrom and regarded as target squares. Based on the average gray value of the target squares, the detection result of the supplementary lighting device is determined.

[0080] It can be understood that after obtaining the average gray value of each square on the lighting image, the change of the average gray value between each region on the lighting image can be observed based on these multiple average gray values, so that the optical performance of the supplementary lighting device can be determined through the change of the average gray value.

[0081] For example, through the change of the average gray value, the gray change from the center to the edge of the lighting image can be observed, and accordingly the steepness of the average gray value from the center to the edge can be determined. Since the gray value corresponds to the image brightness, the brightness change from the center to the edge in the lighting image can be reflected through the steepness of the average gray value from the center to the edge, and accordingly the supplementary lighting effect of the supplementary lighting device in the central region can be determined.

[0082] For another example, through the change of the average gray value, the steepness of the average gray value in the four corner regions of the lighting image can be determined. The brightness change in the four corner regions of the lighting image can be reflected through the steepness of the average gray value in the four corner regions, and accordingly the supplementary lighting effect of the supplementary lighting device in the four corner regions can be determined.

[0083] Specifically, after obtaining each grid and its average gray value, the target grids on the diagonals (D1 and D2) of the illumination image can be determined from each grid. The target grids here can be all the grids located on the diagonal in the illumination image, or can be some grids. For example, they can be the grids at the diagonal vertices, the grid at the intersection of the two diagonals, the grids on the diagonal at a certain distance from the intersection, etc. The embodiments of the present invention do not make specific limitations on this.

[0084] After that, the optical performance of the supplementary lighting device can be detected according to the average gray value of the target grids, so as to obtain the detection result of the supplementary lighting device. Since the evaluation of the optical performance of the supplementary lighting device needs to be based on the light and dark changes in each area of the illumination image, the light and dark differences between areas, etc., and the light and dark changes, light and dark differences, etc. are essentially reflected by the differences between the average gray values. Therefore, in the embodiments of the present invention, when determining the supplementary lighting effect of the supplementary lighting device, the gray value differences of the target grids on the diagonal can be utilized. Specifically, according to the difference value between the average gray values of the target grids, that is, the gray difference value, the brightness change from the center to the edge and / or the light and dark change at the edge are judged, and accordingly, the supplementary lighting effect of the supplementary lighting device is determined, and its optical performance is verified, so as to obtain its detection result.

[0085] Here, the detection result of the supplementary lighting device can be whether there is something wrong with the supplementary lighting of the supplementary lighting device. For example, whether there is a flashlight effect, whether there is a supplementary lighting dark corner, etc.; it can also be a conclusion directly indicating the optical performance or supplementary lighting effect of the supplementary lighting device. For example, the optical performance of the supplementary lighting device is good / bad, or the supplementary lighting effect of the supplementary lighting device meets / does not meet the application requirements; it can also include both of the above at the same time. The embodiments of the present invention do not make specific limitations on this.

[0086] The supplementary lighting device detection method provided by the present invention detects the optical performance through the illumination image of the supplementary lighting device, and detects the supplementary lighting effect of the supplementary lighting device through the gray difference value between the average gray values of the target grids on the diagonal in the illumination image, so as to obtain the detection result, overcoming the defects that the current detection methods for supplementary lighting devices are highly subjective, have large variability, are difficult to obtain accurate detection results, and have high detection costs, realizing objective and reliable detection of the performance of the supplementary lighting device, which is not only simple and fast but also low-cost, and has extremely high accuracy and strong practicability.

[0087] Based on the above embodiments, the target grids include the diagonal grids on the diagonal;

[0088] In step 130, determining the detection result of the supplementary lighting device based on the gray difference value between the average gray values of the target grids includes:

[0089] Determining the detection result of the flashlight effect of the supplementary lighting device based on the gray difference value between the average gray values of the diagonal grids;

[0090] Based on the detection result of the flashlight effect, determine the detection result of the supplementary lighting device.

[0091] Specifically, in step 130, the process of determining the detection result of the supplementary lighting device according to the gray level difference between the average gray level values of the target squares may specifically include:

[0092] Considering that in the detection process of the optical performance of the supplementary lighting device, a particularly important point is to detect its supplementary lighting effect to confirm whether there is a flashlight effect, that is, to confirm whether the illumination image of the supplementary lighting device shows a flashlight effect. Here, the flashlight effect refers to a phenomenon in which, at a certain object distance, when the supplementary lighting device is turned on, or the supplementary light in the supplementary lighting device is turned on and irradiates the front scene or the receiving object (such as an infinitely large and uniformly white wall with a flat surface), the collected image shows an obvious light and dark stratification phenomenon with a bright central area and a dark peripheral area.

[0093] Based on this, in the embodiment of the present invention, after obtaining the target squares on the diagonal line, the supplementary lighting effect of the supplementary lighting device can be detected according to the average gray level value of this target square to confirm whether there is a flashlight effect in the supplementary lighting. Since the flashlight effect mainly reflects the light and dark difference between the center and the edge of the image, it can be detected by the gray level difference between the average gray level values from the center to the edge. Therefore, here, all the squares on the diagonal line can be directly selected as the target squares to detect the supplementary lighting device accordingly, so as to obtain the detection result from the center to the edge of the illumination image of the supplementary lighting device, that is, the detection result of the flashlight effect of the supplementary lighting device.

[0094] Specifically, the target squares are all the squares on the diagonal line, also known as diagonal squares. Here, the gray level difference between the average gray level values of the diagonal squares can be used to judge the brightness change of the illumination image from the center to the edge, and based on this brightness change, it can be determined whether there is a flashlight effect in the supplementary lighting of the supplementary lighting device, so as to obtain the detection result of the flashlight effect of the supplementary lighting device.

[0095] That is, the gray level difference between the average gray level values of the diagonal squares can be used to observe the gray level change in the illumination image from the center to the edge, so as to correspondingly determine the steepness degree of the average gray level value of the illumination image from the center to the edge. Based on this, it can be determined whether there is a flashlight effect in the supplementary lighting of the supplementary lighting device, that is, whether there is uneven light, bright in the middle and dark around, and obvious light and dark stratification, so as to obtain the detection result of the flashlight effect of the supplementary lighting device.

[0096] After that, based on the flashlight effect detection result of the fill light device, the detection result of the fill light device can be determined. That is, it can be determined whether there is a flashlight effect in the fill light of the fill light device according to the flashlight effect detection result of the fill light device, and the fill light result of the fill light device can be determined. Since the flashlight effect is likely to cause problems such as vignetting and uneven light, once the flashlight effect appears, it indicates that its fill light effect is not good. Therefore, it can be confirmed that its detection result is that the optical performance of the fill light device is poor, or the fill light effect of the fill light device does not meet the application requirements. Correspondingly, when the flashlight effect does not appear, it indicates that its fill light is qualified. At this time, it can be confirmed that its detection result is that the optical performance of the fill light device is good, or the fill light effect of the fill light device meets the application requirements.

[0097] Based on the above embodiments, the target squares include the vertex squares at the diagonal vertices, the central square at the intersection of the diagonals, and the corner squares at a certain distance from the central square on the diagonal.

[0098] In step 130, determining the detection result of the fill light device based on the gray level difference between the average gray level values of the target squares includes:

[0099] Based on the gray level difference between the average gray level value of the vertex square and the average gray level value of the corner square, and the average gray level value of the central square, determine the vignetting detection result of the fill light device.

[0100] Based on the vignetting detection result, determine the detection result of the fill light device.

[0101] Specifically, in step 130, the process of determining the detection result of the fill light device according to the gray level difference between the average gray level values of the target squares may specifically include:

[0102] Considering that in the detection process of the optical performance of the fill light device, in addition to the detection of the flashlight effect, there is also a very important point, that is, to confirm whether there is a vignetting problem in the fill light, that is, to confirm whether there is a vignetting problem in the illumination image of the fill light device. The vignetting problem here refers to the situation where the four corners of the illumination image are dark.

[0103] Based on this, in the embodiments of the present invention, after obtaining the target squares on the diagonal, the fill light effect of the fill light device can be detected according to the average gray level values of these target squares to confirm whether there is a vignetting problem in its fill light. Since the vignetting problem mainly reflects the brightness change in the four corner areas of the image, it can be detected by the gray level difference between the average gray level values of the squares in the four corner areas. Therefore, here, the squares at the vertices on the diagonal, the square at the intersection of the two diagonals, and the squares at a certain distance from the intersection on the diagonal can be selected together as the target squares to detect the fill light device accordingly, so as to obtain the detection result of the four corner areas in the illumination image of the fill light device, that is, whether there is a vignetting problem.

[0104] Specifically, the target squares here include the squares at the vertices on the diagonal, i.e., the vertex squares, the squares at the intersection of the diagonals, i.e., the central square, and the squares on the diagonal at a certain distance from the central square, i.e., the corner squares. Based on the gray-scale difference between the average gray-scale values of the target squares, when detecting the fill-light device, on the basis of the average gray-scale value of the central square, combined with the gray-scale difference between the average gray-scale values of the vertex squares and the corner squares, the brightness change of the four corners of the illumination image can be judged, and based on this brightness change, it can be determined whether there is a vignetting problem with the fill-light of the fill-light device, so as to obtain the vignetting detection result of the fill-light device.

[0105] Here, the corner squares can be the squares adjacent to the central square on the diagonal or non-adjacent squares. For example, squares spaced 2 or 3 squares from the central square. The embodiments of the present invention do not make specific limitations in this regard. However, preferably, in the embodiments of the present invention, the corner squares can be determined as the squares adjacent to the central square, so that while ensuring the detection efficiency, the detection accuracy of the fill-light device can be improved.

[0106] That is, the gray-scale difference between the average gray-scale values of the vertex squares and the corner squares, and the average gray-scale value of the central square can be used to determine the relationship between the two. The relationship here can be measured by ratios, differences, etc., and then based on this relationship, the gray-scale change in the four corners of the illumination image can be determined, so as to correspondingly determine the steepness of the drop in the average gray-scale value in the four corners of the illumination image, and based on this, it can be determined whether there is a vignetting problem with the fill-light of the fill-light device, that is, whether there is darkness in the four corners, so as to obtain the vignetting detection result of the fill-light device.

[0107] After that, based on this vignetting detection result, the detection result of the fill-light device can be determined. That is, based on whether there is a vignetting problem with the fill-light of the fill-light device reflected by the vignetting detection result of the fill-light device, the detection result of the fill-light device can be determined. Specifically, when there is a vignetting problem, it means that its fill-light effect is not good. Therefore, it can be confirmed that its detection result is that the optical performance of the fill-light device is poor, or the fill-light effect of the fill-light device does not meet the application requirements. Correspondingly, when there is no vignetting problem, it means that its fill-light is qualified. At this time, it can be confirmed that its detection result is that the optical performance of the fill-light device is good, or the fill-light effect of the fill-light device meets the application requirements.

[0108] Based on the above embodiments, determining the flashlight effect detection result of the fill-light device based on the gray-scale difference between the average gray-scale values of the diagonal squares includes:

[0109] Based on the average gray-scale values of the diagonal squares, determine the set of average gray-scale values of the diagonals;

[0110] Based on the set of average gray values of the diagonal, determine the gray value curve corresponding to the diagonal and the slopes of each segment in the gray value curve, and the difference in the sequence numbers of the squares corresponding to the two vertices of each segment is consistent;

[0111] Based on the slopes of every two adjacent segments respectively, determine the difference between adjacent slopes;

[0112] Based on the difference between adjacent slopes, determine the detection result of the flashlight effect of the fill light device.

[0113] Specifically, the process of determining the detection result of the flashlight effect of the fill light device according to the gray value difference between the average gray values of the diagonal squares may specifically include:

[0114] First, according to all the squares on the diagonal of the illumination image, that is, the diagonal squares on the diagonal, determine the set of squares corresponding to the diagonal, and according to the average gray values of each diagonal square in the set of squares, determine the set of gray values of the average gray values of all the squares on the diagonal, that is, the set of average gray values of the diagonal. Here, the set of average gray values of diagonal D1 can be expressed as D1 = [A 0,n-1 A 1,n-2 …A n-2,1 A n-1,0 , and the set of average gray values of diagonal D2 can be expressed as D2 = [A 0,0 A 1,1 …A n-2,n-2 A n-1,n-1 .

[0115] Subsequently, according to the set of average gray values of the diagonal, draw the curve of the average gray values of the diagonal squares on the diagonal, that is, use the set of average gray values of diagonal D1 and diagonal D2 to draw the average gray value curve of diagonal D1 and the average gray value curve of diagonal D2 respectively, so as to obtain the gray value curves corresponding to the two diagonals respectively.

[0116] Next, each segment can be determined through the gray value curve of the diagonal; the segment here can be the curve segment between two adjacent points in the gray value curve. For example, the curve segment between A 0,n-1 and A 1,n-2 in the gray value curve of diagonal D1, or the curve segment between A n-2,n-2 and A n-1,n-1 in the gray value curve of diagonal D2; the segment can also be the curve segment between two non-adjacent points in the gray value curve. For example, the curve segment between A 0,n-1 and A 2,n-3 in the gray value curve of diagonal D1, or the curve segment between A n-3,n-3 and A n-1,n-1 in the gray value curve of diagonal D2. The embodiments of the present invention do not make specific limitations on this.

[0117] However, whether it is the curve segment between two adjacent points or the curve segment between two non - adjacent points, in the embodiments of the present invention, when determining each segment accordingly, it is necessary to ensure that the grids separated by the two vertices of each segment are the same, that is, the difference in the serial numbers of the grids corresponding to the two vertices of each segment is the same; for example, when the first segment is the curve segment between A 0,n-1 and A 1,n-2 , the serial number difference can be determined to be 1, that is, the curve segment between two adjacent points is selected as each segment. Therefore, the next segment can be determined to be the curve segment between A 1,n-2 and A 2,n-3 . By analogy, each segment can be determined from the gray - scale value curve.

[0118] Another example, when the first segment is the curve segment between A 0,n-1 and A 2,n-3 , the serial number difference can be determined to be 2, that is, the curve segment between two non - adjacent points with a serial number difference of 2 is selected as each segment. Therefore, the next segment can be determined to be the curve segment between A 2,n-3 and A 4,n-5 . By analogy, each segment can be determined from the gray - scale value curve; correspondingly, when the first segment is the curve segment between A 1,n-2 and A 3,n-4 , the next segment can be determined to be the curve segment between A 3,n-4 and A 5,n-6 .

[0119] Preferably, to ensure the accuracy of the optical performance detection of the supplementary lighting device, in the embodiments of the present invention, the serial number difference is determined to be 1, that is, the curve segment between two adjacent points is selected as the segment, and thus multiple segments corresponding to the gray - scale value curve are determined.

[0120] Further, after determining each segment in the gray - scale value curve, it is also necessary to calculate the slope of each segment. Since the segments selected in the actual detection process are usually the curve segments between two adjacent points in the gray - scale value curve, and the average gray - scale value change between two adjacent points is usually small, and the curve segment between them can be approximated as a straight - line segment. Based on this, in the embodiments of the present invention, to simplify the calculation process and ensure the accuracy of the detection result, when calculating the slope of each segment, it can be regarded as a straight line, and the slope of each segment is obtained by the slope calculation method of the straight line, that is, through the average gray - scale value of the grids corresponding to the two vertices of each segment and the difference in the serial numbers of the grids corresponding to the two vertices of each segment, the slope of each segment is calculated.

[0121] Here, the calculation formula for the slope of each segment can be expressed as:

[0122]

[0123]

[0124] Among them, K 1x is the slope of the segment corresponding to A in the gray value curve of diagonal D1 x,n-1-x and A x+L,n-1-x-L ; K 2x is the slope of the segment corresponding to A in the gray value curve of diagonal D2 x,x and A x+L,x+L , and L is the difference in the serial numbers of the squares corresponding to the two vertices of the segment.

[0125] After obtaining the slopes of each segment, the difference between the slopes of adjacent segments, that is, the adjacent slope difference, can be determined accordingly. The adjacent slope difference here can reflect the change in the slopes of adjacent segments, and the slopes of each segment are calculated based on the average gray value. Therefore, the adjacent slope difference here essentially reflects the gray value difference between the average gray values of the squares.

[0126] Specifically, here, two adjacent segments can be determined from each segment. The adjacent segments here refer to two segments that have a common vertex and can be connected, that is, two connected segments are determined from each segment to form a segment group, and the slope difference is calculated according to the slopes of the two segments in each segment group, so as to obtain the adjacent slope difference of each segment group. Here, the adjacent slope difference of each group can be calculated by the following formula:

[0127]

[0128]

[0129] Among them, ΔK 1x is the adjacent slope difference between the segment corresponding to A in the gray value curve of diagonal D1 x,n-1-x and A x+L,n-1-x-L and the segment corresponding to A x+L,n-1-x-L and A x+2L,n-1-x-2L ; ΔK 2x is the adjacent slope difference between the segment corresponding to A in the gray value curve of diagonal D2 x,x and A x+L,x+L and the segment corresponding to A x+L,x+L and A x+2L,x+2L , and L is the difference in the serial numbers of the squares corresponding to the two vertices of the segment.

[0130] After that, the flashlight effect detection result of the supplementary lighting device can be determined according to the difference in adjacent slopes, that is, the change in gray level from the center to the edge in the illumination image can be observed through the difference in adjacent slopes between every two adjacent segments, so as to correspondingly determine the steepness of the average gray level value of the illumination image from the center to the edge. Based on this, it can be determined whether there is a flashlight effect in the supplementary lighting of the supplementary lighting device, that is, whether there is uneven light, bright in the middle and dark around. Thus, the supplementary lighting effect of the supplementary lighting device in the central area can be obtained, that is, the flashlight effect detection result of the supplementary lighting device.

[0131] Based on the above embodiments, based on the gray level difference between the average gray level value of the vertex grid and the average gray level value of the corner grid, and the average gray level value of the central grid, determine the vignetting detection result of the supplementary lighting device, including:

[0132] Based on the gray level difference between the average gray level value of the vertex grid and the average gray level value of the corner grid, and the average gray level value of the central grid, determine the corner slope difference;

[0133] Based on the corner slope difference, determine the vignetting detection effect of the supplementary lighting device.

[0134] Specifically, the process of determining the vignetting detection result of the supplementary lighting device according to the gray level difference between the average gray level value of the vertex grid and the average gray level value of the corner grid, and the average gray level value of the central grid can specifically include:

[0135] First, according to the gray level difference between the average gray level value of the vertex grid and the average gray level value of the corner grid, and the average gray level value of the central grid, the slope difference in the four corner regions of the illumination image, that is, the corner slope difference, can be calculated. Specifically, here, by the average gray level value of the corner grid on the diagonal line and the average gray level value of the vertex grid closest to the corner grid on the diagonal line, calculate the gray level difference between the two. Based on this gray level difference and the average gray level value of the central grid, calculate the corner slope difference corresponding to the corner grid. Repeating the calculation process can calculate the corner slope difference corresponding to each corner grid; here, the corner slope difference can reflect the steepness of the average gray level value of the corner grid and the corresponding vertex grid in the corner region corresponding to the illumination image.

[0136] Here, when n is odd, the corner slope difference can be calculated by the following formula:

[0137]

[0138]

[0139] Among them, ΔK2 and ΔK3 are respectively the corner grids on the diagonal line D1 and the corner grid The corresponding corner slope difference; is the corner grid Average gray value, A 0,n-1 is the corner grid The average gray value of the corresponding vertex grid (0, n - 1), is the corner grid The average gray value of A n-1,0 is the corner grid The average gray value of the corresponding vertex grid (n - 1, 0). is the central grid The average gray value of it.

[0140] ΔK1 and ΔK4 are respectively the corner grid on the diagonal D2 and the corner grid The corresponding corner slope difference; is the corner grid The average gray value of A n-1,n-1 is the corner grid The average gray value of the corresponding vertex grid (n - 1, n - 1), is the corner grid The average gray value of A 0,0 is the corner grid The average gray value of the corresponding vertex grid (0, 0).

[0141] When n is an even number, the corner slope difference can be calculated by the following formula:

[0142]

[0143]

[0144]

[0145] where ΔK2 and ΔK3 are respectively the corner grid on the diagonal D1 and the corner grid The corresponding corner slope difference; is the corner grid Average gray value, A 0,n-1 is the corner grid The average gray value of the corresponding vertex grid (0, n - 1), is the corner grid The average gray value of A n-1,0 is the corner grid The average gray value of the corresponding vertex grid (n - 1, 0). A m,m is the average gray value of the central grid.

[0146] ΔK1 and ΔK4 are the corner squares on the diagonal D2 and the corner squares corresponding to the difference in corner slopes; is the average gray value of the corner square A n-1,n-1 is the average gray value of the vertex square (n - 1, n - 1) corresponding to the corner square is the average gray value of the corner square A 0,0 is the average gray value of the vertex square (0, 0) corresponding to the corner square

[0147] Subsequently, based on the difference in corner slopes, the vignetting detection effect of the fill light device can be determined, that is, the change in brightness of the four corner regions in the illumination image can be determined by the difference in slopes corresponding to each corner square on the diagonal of the illumination image, so as to correspondingly determine the steepness of the drop in the average gray value in the four corner regions of the illumination image, and based on this, it can be determined whether there is a vignetting problem in the fill light of the fill light device, that is, whether there is a situation of darkness in the four corners, so as to obtain the vignetting detection result of the fill light device.

[0148] Based on the above embodiments, the target squares include the vertex squares at the diagonal vertices and the central square at the diagonal intersection point;

[0149] Based on the gray difference between the average gray values of the target squares, the detection result of the fill light device is determined, including:

[0150] Based on the gray difference between the average gray value of the vertex square and the average gray value of the central square, the vignetting detection result of the fill light device is determined;

[0151] Based on the vignetting detection result, the detection result of the fill light device is determined.

[0152] Specifically, in step 130, the process of determining the detection result of the fill light device according to the gray difference between the average gray values of the target squares may specifically include:

[0153] ​​During the detection process of the optical performance of the fill light device, in addition to the detection of the flashlight effect, vignetting detection can also be performed to confirm whether there is a vignetting problem in the illumination image of the fill light device. Based on this, in the embodiments of the present invention, after obtaining the target squares on the diagonal line, the fill light effect of the fill light device can be detected based on the average gray value of the target squares to confirm whether there is a vignetting problem in its fill light. Since the vignetting problem mainly reflects the brightness change in the four corner regions of the image, it can be detected by the gray difference between the average gray values of the squares in the four corner regions. Therefore, here, the squares at the vertices of the diagonal line and the square at the intersection of the two diagonal lines can be selected together as the target squares, and the fill light device can be detected accordingly to obtain the vignetting detection result of the fill light device.

[0154] Specifically, the target squares here include the squares at the vertices of the diagonal line, that is, the vertex squares, and the square at the intersection of the diagonal lines, that is, the center square. When detecting the fill light device based on the gray difference between the average gray values of the target squares, the gray difference between the average gray values of the center square and the vertex squares can be used to judge the brightness change in the four corner regions of the illumination image, and based on this brightness change, it can be determined whether there is a vignetting problem in the fill light of the fill light device, so as to obtain the vignetting detection result of the fill light device.

[0155] That is, the ratio of the average gray values of the vertex square and the center square can be determined by the gray difference between the average gray values of the vertex square and the center square. Here, specifically, based on the gray difference between the average gray values of the vertex square and the center square, combined with the average gray value of the center square, the ratio of the average gray values of the vertex square and the center square can be calculated. Based on this ratio, the brightness change in the four corner regions of the illumination image can be determined, so as to judge whether there is a vignetting problem in the fill light of the fill light device, that is, whether there is a situation of darkness in the four corners, and further obtain the vignetting detection result of the fill light device.

[0156] After that, the detection result of the fill light device can be determined based on this vignetting detection result, that is, the detection result of the fill light device can be determined according to whether there is a vignetting problem in the fill light of the fill light device reflected by the vignetting detection result of the fill light device. Specifically, when there is a vignetting problem, it means that its fill light effect is not good. Therefore, it can be confirmed that its detection result is that the optical performance of the fill light device is poor, or the fill light effect of the fill light device does not meet the application requirements. Correspondingly, when there is no vignetting problem, it means that its fill light is qualified. At this time, it can be confirmed that its detection result is that the optical performance of the fill light device is good, or the fill light effect of the fill light device meets the application requirements.

[0157] Based on the above embodiments, determining the flashlight effect detection result of the fill light device based on the adjacent slope difference includes:

[0158] If the difference between adjacent slopes is less than the first threshold, it is determined that the flashlight effect detection result of the supplementary lighting device is qualified;

[0159] Otherwise, it is determined that the flashlight effect detection result of the supplementary lighting device is unqualified;

[0160] Based on the difference between corner slopes, determine the vignetting detection effect of the supplementary lighting device, including:

[0161] If the difference between corner slopes is less than the second threshold, it is determined that the vignetting detection result of the supplementary lighting device is qualified;

[0162] Otherwise, it is determined that the vignetting detection result of the supplementary lighting device is unqualified.

[0163] Specifically, the process of determining the flashlight effect detection result of the supplementary lighting device according to the difference between adjacent slopes may specifically include:

[0164] When the difference between adjacent slopes is less than the slope threshold, it can be determined that there is no flashlight effect in the supplementary lighting of the supplementary lighting device. Therefore, it can be determined that the flashlight effect detection result of the supplementary lighting device at this time is qualified.

[0165] Correspondingly, when the difference between adjacent slopes is greater than or equal to the slope threshold, it can be determined that there is a flashlight effect in the supplementary lighting of the supplementary lighting device. Therefore, it can be determined that the flashlight effect detection result of the supplementary lighting device at this time is unqualified.

[0166] Here, the slope threshold is a threshold preset for determining whether there is a flashlight effect in the supplementary lighting, which can be obtained through a large number of experimental calculations. Specifically, in the embodiments of the present invention, through verification of a large number of products, the slope threshold is determined to be the standard threshold 5, that is, when any one of ΔK 1x and ΔK 2x is greater than or equal to 5, or both are greater than or equal to 5, it can be determined that there is a flashlight effect. On the contrary, when both are less than 5, it is determined that there is no flashlight effect.

[0167] In addition, for the sake of distinction, the slope threshold for determining the flashlight effect is called the first threshold; correspondingly, the slope threshold for determining the vignetting problem can be called the second threshold.

[0168] Therefore, the process of determining the vignetting detection effect of the supplementary lighting device according to the difference between corner slopes may include:

[0169] When the difference between corner slopes is less than the second threshold, it can be determined that there is no vignetting problem in the supplementary lighting of the supplementary lighting device. Therefore, it can be determined that the vignetting detection result of the supplementary lighting device at this time is qualified.

[0170] Correspondingly, when the corner point slope difference is greater than or equal to the second threshold, it can be determined that there is a vignetting problem with the supplementary lighting device of the supplementary light. Therefore, it can be determined that the vignetting detection result of the supplementary lighting device at this time is unqualified.

[0171] Here, the second threshold is a preset threshold for determining whether there is a vignetting problem with the supplementary light, and it can also be obtained through a large number of experimental calculations. Specifically, in the embodiments of the present invention, through the verification of a large number of products, the second threshold is determined to be 0.9, that is, as long as any one of ΔK2, ΔK3, ΔK1, and ΔK4 is greater than or equal to 0.9, it can be determined that there is a vignetting problem. On the contrary, when all four are less than 0.9, it can be determined that there is no vignetting problem.

[0172] In addition, it is worth noting that after obtaining the flashlight effect detection result and the vignetting detection result of the supplementary lighting device, in addition to being able to determine the detection result of the supplementary lighting device according to the flashlight effect detection result of the supplementary lighting device, or determine the detection result of the supplementary lighting device according to the vignetting detection result of the supplementary lighting device, it is also possible to combine the flashlight effect detection result and the vignetting detection result of the supplementary lighting device to comprehensively determine the detection result of the supplementary lighting device, that is, comprehensively consider its flashlight effect detection result and vignetting detection result to determine the final detection result.

[0173] Specifically, it can be that when any one of the flashlight effect detection result and the vignetting detection result is unqualified, or both are unqualified, that is, there is a flashlight effect and / or vignetting problem with the supplementary light, it can be determined that the detection result of the supplementary lighting device is unqualified, corresponding to the poor optical performance of the supplementary lighting device, or the supplementary lighting effect of the supplementary lighting device does not meet the application requirements. Correspondingly, when both the flashlight effect detection result and the vignetting detection result are qualified, that is, there is no flashlight effect and vignetting problem with the supplementary light, it can be determined that the detection result of the supplementary lighting device is qualified, corresponding to the good optical performance of the supplementary lighting device, or the supplementary lighting effect of the supplementary lighting device meets the application requirements.

[0174] The following takes the first IPC as an example to illustrate the detection process of the optical performance:

[0175] First, the first IPC needs to be placed in a dark room, and the tripod and pan-tilt are set up. Then, the first IPC is placed on the pan-tilt, and its supplementary light is facing the white wall with a length and width greater than 3 meters. Then, the first IPC can be connected to the computer and powered on, and images are collected to adjust the position of the pan-tilt, so as to achieve the purpose of adjusting the position of the first IPC. This process is to avoid the inclination of the first IPC affecting the detection result. In this process, on the premise that the picture is all the wall, the farther the first IPC is from the wall, the better.

[0176] Subsequently, the fill light can be turned on and the fill light brightness can be set to the maximum. After setting the exposure parameters, image acquisition can be performed to obtain an illumination image. The illumination image can be imported into image processing software for segmentation. It can be divided into 45*45 grids. According to the coordinate principle, the lower left corner of the illumination image can be taken as the origin, and the illumination image can be divided into two directions, x and y. Among them, x = 0, 1, 2, 3…44, y = 0, 1, 2, 3…44. The average gray value of each grid in the illumination image can be represented by A x,y and x,y A is the average of the gray values of all pixel points in the grid.

[0177] Subsequently, all the grids on two diagonals (D1 and D2) in the illumination image can be taken, that is, the diagonal grids. According to the average gray values of the diagonal grids, the average gray value sets of diagonals D1 and D2 can be determined, which can be expressed as D1 = [A 0,44 A 1,43 …A 43,1 A 44,0 , D2 = [A 0,0 A 1,1 …A 43,43 A 44,44 ; and the gray value curve can be determined accordingly. Figure 7 is one of the example diagrams of the gray value curve of diagonal D1 provided by the present invention. Figure 8 is one of the example diagrams of the gray value curve of diagonal D2 provided by the present invention. As shown in Figure 7 and Figure 8 , according to the average gray value sets of diagonals (D1 and D2), the gray value curves corresponding to diagonals D1 and D2 can be plotted respectively.

[0178] After that, the slope of each segment in the gray value curve can be calculated. Here, the difference in the serial numbers of the grids corresponding to the two vertices of each segment is the same; specifically, it can be calculated through the formula and L = 1 to calculate the slope of each segment, and the difference between adjacent slopes can be calculated according to the slopes of every two adjacent segments. And according to the difference between adjacent slopes and the first threshold, it can be determined whether there is a flashlight effect, so as to obtain the flashlight effect detection result of the first IPC.

[0179] Here, the calculation formula for the difference between adjacent slopes is:

[0180]

[0181]

[0182] After calculation, it can be obtained that ΔK 1x is at most 1.14, ΔK2x The maximum is 1.15, and both are less than 5. Therefore, it can be determined that the flashlight effect detection result of the first IPC is qualified. Figure 9 It is one of the example diagrams of the illumination image provided by the present invention. As Figure 9 shown, when ΔK 1x and ΔK 2x are both 5, it can be determined that the illumination image has no flashlight effect.

[0183] At the same time, the central square at the intersection of the diagonals D1 and D2 can be determined, and the average gray value of the central square is calculated to be 189.55. Then, the vertex squares at the vertices of the diagonals D1 and D2 are selected, and their average gray values are determined, which are A 44,44 , A 0,44 , A 44,0 and A 0,0 respectively. At the same time, the squares adjacent to the central square on the diagonal are selected as corner squares, and their average gray values are determined, which are A 23,23 , A 21,23 , A 23,21 and A 21,21 respectively. Based on the average gray values of the corner squares, the vertex squares, and the central square, the corner slope differences can be calculated, which are ΔK1 = 0.82, ΔK2 = 0.83, ΔK3 = 0.81, and ΔK4 = 0.83 respectively. By comparing with the second threshold, it can be determined that ΔK1, ΔK2, ΔK3, and ΔK4 are all less than 0.9. Therefore, it can be determined that the vignetting detection result of the first IPC is qualified. Refer to Figure 9 It can be seen that when ΔK1 to ΔK4 are all less than 0.9, there is no vignetting problem in the illumination image.

[0184] Finally, the detection result of the first IPC can be determined according to the flashlight effect detection result and / or the vignetting detection result of the first IPC. Since the flashlight effect detection result and the vignetting detection result of the first IPC are both qualified, it can be determined that the detection result of the first IPC is qualified, corresponding to poor optical performance of the first IPC or the supplementary light effect not meeting the application requirements.

[0185] The following takes the second IPC as an example to illustrate the detection process of the optical performance:

[0186] First, the second IPC needs to be placed in a dark room, and the tripod and pan-tilt are set up. Then, the second IPC is placed on the pan-tilt, and its fill light is facing a white wall with a length and width greater than 3 meters. Then, the second IPC can be connected to the computer and powered on, and images can be collected to adjust the position of the pan-tilt, thereby achieving the purpose of adjusting the position of the second IPC. This process is to avoid the tilt of the second IPC affecting the detection results. In this process, while ensuring that the picture is all of the wall, the farther the second IPC is from the wall, the better.

[0187] Then, the fill light can be turned on and the fill light brightness can be set to the highest. After the exposure parameters are set, image acquisition can be performed to obtain the illumination image; the illumination image can be imported into the image processing software to segment it into 45*45 squares, and according to the coordinate principle, the lower left corner of the illumination image can be used as the origin to divide the illumination image into two directions, x and y, where x = 0, 1, 2, 3...44 and y = 0, 1, 2, 3...44. The average gray value of each square in the illumination image can be obtained by A x,y To express, A x,y is the average grayscale value of all pixels in the grid.

[0188] Then, all the squares on the two diagonals (D1 and D2) in the illumination image, i.e., the diagonal squares, can be taken, and the average grayscale value set of the diagonals D1 and D2 can be determined according to the average grayscale value of the diagonal squares, which can be expressed as D1 = [A 0,44 A 1,43 …A 43,1 A 44,0 ],D2=[A 0,0 A 1,1 …A 43,43 A 44,44 ]; and the gray value curve can be determined accordingly, Figure 10 This is the second example of the gray value curve of the diagonal line D1 provided by the present invention. Figure 11 This is a second example of a grayscale value curve of the diagonal line D2 provided by the present invention. Figure 10 and Figure 11 As shown, according to the average gray value set of the diagonal lines (D1 and D2), the gray value curves corresponding to the diagonal lines D1 and D2 can be drawn.

[0189] After that, the slope of each segment in the gray value curve can be calculated. Here, the difference in the number of squares corresponding to the two vertices of each segment is consistent. The specific formula can be and When L = 1, calculate the slope of each segment, and based on the slopes of every two adjacent segments, calculate the difference between adjacent slopes. Then, based on the difference between adjacent slopes and the first threshold, determine whether there is a flashlight effect, thereby obtaining the detection result of the flashlight effect for the second IPC.

[0190] Here, the calculation formula for the difference between adjacent slopes is:

[0191]

[0192]

[0193] Through calculation, ΔK can be obtained 1x The maximum is 1.91, and ΔK 2x The maximum is 2.65, and both are less than 5. Therefore, it can be determined that the detection result of the flashlight effect for the second IPC is qualified. Figure 12 This is the second example diagram of the lighting image provided by the present invention. As Figure 12 shown, when ΔK 1x and ΔK 2x are both 5, it can be determined that there is no flashlight effect in the lighting image.

[0194] At the same time, the central square at the intersection of the diagonals D1 and D2 can be determined, and the average gray value of the central square is calculated to be 145.97. Then, select the vertex squares at the vertices of the diagonals D1 and D2 and determine their average gray values, which are A 44,44 , A 0,44 , A 44,0 and A 0,0 respectively. At the same time, select the squares adjacent to the central square on the diagonal as the corner squares and determine their average gray values, which are A 23,23 , A 21,23 , A 23,21 and A 21,21 respectively. Based on the average gray values of the corner squares, the vertex squares, and the central square, the difference in corner slopes can be calculated, which are ΔK1 = 0.95, ΔK2 = 0.93, ΔK3 = 0.95, and ΔK4 = 0.92 respectively. By comparing with the second threshold, it can be determined that ΔK1, ΔK2, ΔK3, and ΔK4 are all greater than 0.9. Therefore, it can be determined that the vignetting detection result for the second IPC is unqualified. Refer to Figure 12 It can be seen that when ΔK1 to ΔK4 are greater than 0.9, there is a vignetting problem in the lighting image.

[0195] Finally, the detection result of the second IPC can be determined according to the flashlight effect detection result and / or vignetting detection result of the second IPC. Since the flashlight effect detection result of the second IPC is qualified and the vignetting detection result is unqualified, when the final detection result is determined according to the flashlight effect detection result, the final detection result can be determined to be qualified. On the contrary, when the final detection result is determined according to the vignetting detection result, the final detection result can be determined to be unqualified; when the final detection result is determined by combining the flashlight effect detection result and the vignetting detection result, because there is fill light vignetting, the final detection result can be determined to be unqualified.

[0196] The fill light device detection apparatus provided by the present invention will be described below. The fill light device detection apparatus described below can be mutually corresponding and referred to the fill light device detection method described above.

[0197] Figure 13 is a schematic structural diagram of the fill light device detection apparatus provided by the present invention, as Figure 13 shown, the apparatus includes:

[0198] An acquisition unit 1310, configured to acquire an illumination image of the fill light device

[0199] A division unit 1320, configured to divide the illumination image and determine the average gray value of each of the multiple squares obtained by the division;

[0200] A detection unit 1330, configured to determine target squares on the diagonal of the illumination image and determine the detection result of the fill light device based on the gray value difference between the average gray values of the target squares.

[0201] The fill light device detection apparatus provided by the present invention detects the optical performance through the illumination image of the fill light device, and detects the fill light effect of the fill light device by the gray value difference between the average gray values of the target squares on the diagonal of the illumination image, so as to obtain the detection result, overcoming the defects that the current detection method of the fill light device has strong subjectivity, large variability, difficult to obtain accurate detection results, and high detection cost, realizing objective and reliable detection of the performance of the fill light device, which is not only simple and fast but also low-cost, and has extremely high accuracy and strong practicability.

[0202] Based on the above embodiment, the target squares include the diagonal squares on the diagonal;

[0203] The detection unit 1330 is configured to:

[0204] Determine the flashlight effect detection result of the fill light device based on the gray value difference between the average gray values of the diagonal squares;

[0205] Based on the detection result of the flashlight effect, determine the detection result of the fill light device.

[0206] Based on the above embodiments, the target squares include the vertex squares at the diagonal vertices, the central square at the intersection of the diagonals, and the corner squares at a certain distance from the central square on the diagonals;

[0207] The detection unit 1330 is used for:

[0208] Based on the gray level difference between the average gray level value of the vertex square and the average gray level value of the corner square, and the average gray level value of the central square, determine the vignetting detection result of the fill light device;

[0209] Based on the vignetting detection result, determine the detection result of the fill light device.

[0210] Based on the above embodiments, the detection unit 1330 is used for:

[0211] Based on the average gray level value of the diagonal squares, determine the set of average gray level values of the diagonals;

[0212] Based on the set of average gray level values of the diagonals, determine the gray level value curve corresponding to the diagonal, and the slopes of each segment in the gray level value curve, and the difference in the serial numbers of the squares corresponding to the two vertices of each segment is consistent;

[0213] Based on the slopes of every two adjacent segments respectively, determine the adjacent slope difference;

[0214] Based on the adjacent slope difference, determine the flashlight effect detection result of the fill light device.

[0215] Based on the above embodiments, the detection unit 1330 is used for:

[0216] Based on the gray level difference between the average gray level value of the vertex square and the average gray level value of the corner square, and the average gray level value of the central square, determine the corner slope difference;

[0217] Based on the corner slope difference, determine the vignetting detection effect of the fill light device.

[0218] Based on the above embodiments, the target squares include the vertex squares at the diagonal vertices, and the central square at the intersection of the diagonals;

[0219] The detection unit 1330 is used for:

[0220] Based on the gray level difference between the average gray level value of the vertex square and the average gray level value of the central square, determine the vignetting detection result of the fill light device;

[0221] Based on the vignetting detection result, determine the detection result of the fill light device.

[0222] Based on the above embodiments, the detection unit 1330 is configured to:

[0223] If the difference between adjacent slopes is less than the first threshold, determine that the flashlight effect detection result of the fill light device is qualified;

[0224] Otherwise, determine that the flashlight effect detection result of the fill light device is unqualified;

[0225] If the difference between the corner slopes is less than the second threshold, determine that the vignetting detection result of the fill light device is qualified;

[0226] Otherwise, determine that the vignetting detection result of the fill light device is unqualified.

[0227] Figure 14 An example of a schematic physical structure diagram of an electronic device is shown as Figure 14 shown. The electronic device may include: a processor 1410, a communication interface 1420, a memory 1430, and a communication bus 1440. Among them, the processor 1410, the communication interface 1420, and the memory 1430 communicate with each other through the communication bus 1440. The processor 1410 can call the logical instructions in the memory 1430 to execute the fill light device detection method, and the method includes: obtaining an illumination image of the fill light device; dividing the illumination image and determining the average gray value of each of the multiple grids obtained by the division; determining a target grid on the diagonal of the illumination image, and based on the gray difference between the average gray values of the target grids, determining the detection result of the fill light device.

[0228] In addition, when the logical instructions in the above-mentioned memory 1430 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0229] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the fill light device detection method provided by each of the above methods. The method includes: obtaining an illumination image of the fill light device; dividing the illumination image and determining the average gray value of each of the multiple squares obtained by the division; determining target squares on the diagonal of the illumination image, and determining the detection result of the fill light device based on the gray difference between the average gray values of the target squares.

[0230] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the fill light device detection method provided by each of the above methods. The method includes: obtaining an illumination image of the fill light device; dividing the illumination image and determining the average gray value of each of the multiple squares obtained by the division; determining target squares on the diagonal of the illumination image, and determining the detection result of the fill light device based on the gray difference between the average gray values of the target squares.

[0231] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0232] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for detecting a supplementary lighting device, characterized in that, Including: Obtaining an illumination image of a fill light device; Dividing the illumination image and determining the average gray value of each of the multiple squares obtained by the division; Determining target squares on the diagonal of the illumination image and determining a detection result of the fill light device based on a gray difference between the average gray values of the target squares.

2. The light supplementing device detection method according to claim 1, characterized in that The target squares include diagonal squares on the diagonal; The determining the detection result of the fill light device based on the gray difference between the average gray values of the target squares includes: Determining a flashlight effect detection result of the fill light device based on the gray difference between the average gray values of the diagonal squares; Determining the detection result of the fill light device based on the flashlight effect detection result.

3. The method for detecting a supplementary lighting device according to claim 1, wherein The target squares include vertex squares at the diagonal vertices, a central square at the intersection of the diagonals, and corner squares on the diagonal at a certain distance from the central square; The determining the detection result of the fill light device based on the gray difference between the average gray values of the target squares includes: Determining a vignetting detection result of the fill light device based on the gray difference between the average gray value of the vertex square and the average gray value of the corner square, and the average gray value of the central square; Determining the detection result of the fill light device based on the vignetting detection result.

4. The light supplementing device detection method according to claim 2, wherein The determining the flashlight effect detection result of the fill light device based on the gray difference between the average gray values of the diagonal squares includes: Determining an average gray value set of the diagonal based on the average gray values of the diagonal squares; Determining a gray value curve corresponding to the diagonal and slopes of each segment in the gray value curve, and the serial number difference of the squares corresponding to the two vertices of each segment is the same; Determining an adjacent slope difference based on the slopes of each two adjacent segments; Determining the flashlight effect detection result of the fill light device based on the adjacent slope difference.

5. The light supplementing device detection method according to claim 3, wherein The determining the vignetting detection result of the fill light device based on the gray difference between the average gray value of the vertex square and the average gray value of the corner square, and the average gray value of the central square includes: Determining a corner slope difference based on the gray difference between the average gray value of the vertex square and the average gray value of the corner square, and the average gray value of the central square; Determining the vignetting detection effect of the fill light device based on the corner slope difference.

6. The method for detecting a supplementary light device according to claim 1, wherein The target squares include vertex squares at the diagonal vertices and a central square at the intersection of the diagonals; The determining the detection result of the fill light device based on the gray difference between the average gray values of the target squares includes: Determining a vignetting detection result of the fill light device based on the gray difference between the average gray value of the vertex square and the average gray value of the central square; Determining the detection result of the fill light device based on the vignetting detection result.

7. The light supplementing device detection method according to claim 4 or 5, characterized in that, Determining the flashlight effect detection result of the fill light device based on the adjacent slope difference includes: If the difference between the adjacent slopes is less than the first threshold, determine that the flashlight effect detection result of the supplementary lighting device is qualified; Otherwise, determine that the flashlight effect detection result of the supplementary lighting device is unqualified; Based on the corner slope difference, determine the vignetting detection effect of the supplementary lighting device, including: If the corner slope difference is less than the second threshold, determine that the vignetting detection result of the supplementary lighting device is qualified; Otherwise, determine that the vignetting detection result of the supplementary lighting device is unqualified.

8. A supplementary light device detection apparatus, characterized in that, Including: An acquisition unit for acquiring the illumination image of the supplementary lighting device A division unit for dividing the illumination image and determining the average gray value of each of the multiple grids obtained by the division; A detection unit for determining the target grids on the diagonal of the illumination image and determining the detection result of the supplementary lighting device based on the gray difference between the average gray values of the target grids.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the supplementary lighting device detection method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the supplementary lighting device detection method according to any one of claims 1 to 7.