Device and method for testing light subtraction effect
By providing a lighting subtraction effect testing device and method including lighting equipment, shading parts, light receiving parts, recording parts and processing parts, the problem of lack of quick testing methods in the prior art is solved, and the scientificity and accuracy evaluation of the lighting subtraction effect is achieved.
Patent Information
- Application Number
- CN202411608061.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-04
AI Technical Summary
The lack of quick testing methods for general users in the prior art can facilitate operation, which leads to difficulties in choosing reasonable lamps and lighting methods, and timely testing the rationality of the subtraction effect.
A test device and method for lighting subtraction effects are provided, including lighting equipment, shading parts, light receiving parts, recording parts and processing parts. Through the coordinated work of these components, a complete testing system can be formed, which can effectively test the lighting subtraction effects.
Through indicators such as grayscale contrast and edge pixel frequency, the shadow effect can be quantified from different angles, improving the comprehensiveness and accuracy of the test results, making it simple and easy to operate.
Smart Images

Figure CN119555342A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of light shadows, and in particular to a method for testing light shadow reduction effects. Background Art
[0002] As the proportion of myopia among teenagers continues to increase, the focus on light environment analysis, evaluation, improvement and inspection in learning scenarios is also gradually increasing. Writing shadows will interfere with students' normal reading and writing, cause incorrect writing postures, and thus damage students' physical health. In related technologies, the main direction to solve writing shadows is shadow reduction. At the same time, related descriptions of reducing writing shadows have gradually appeared in the introduction of lighting products in learning scenarios.
[0003] However, in the related art, there is a lack of testing methods for lighting subtraction effects, especially a lack of quick testing methods that are easy for general users to operate, which brings difficulties to the selection and installation of reasonable lamps and lighting methods, and timely verification of the rationality of the subtraction effect, and needs to be improved urgently. Summary of the invention
[0004] The present application provides a testing device and method for the shadow reduction effect of lighting, in order to solve the problem in the related art that there is a lack of quick testing methods for the shadow reduction effect of lighting, which leads to difficulties in selecting and installing reasonable lamps and lighting methods, and timely checking the rationality of the shadow reduction effect.
[0005] A first aspect of the present application provides a testing device for light subtraction effects, comprising: a lighting device and a shielding member; a light receiving member, for forming a light shadow effect corresponding to the distance between the shielding member and the light of the lighting device when the shielding member blocks the light; a recording member, for recording image information corresponding to the light shadow effect; and a processing member, for obtaining grayscale contrast and / or edge pixel frequency based on the image information, and generating a light subtraction effect test result based on the grayscale contrast and / or the edge pixel frequency.
[0006] Through the above technical scheme, the embodiment of the present application includes multiple components such as lighting equipment, shielding components, light receiving components, recording components and processing components, which are combined to form a complete test system. The components work together to effectively test the light subtraction effect. Through indicators such as grayscale contrast and edge pixel frequency, the shadow effect can be quantitatively evaluated from different angles, thereby improving the comprehensiveness and accuracy of the test results.
[0007] Optionally, in one embodiment of the present application, it further includes: a clamper, used to clamp the shielding member so that the distance between the shielding member and the light receiving member reaches a target test distance.
[0008] Through the above technical solution, the embodiment of the present application can use the clamp to make the distance between the shielding member and the light receiving member reach the target test distance, which helps to accurately control the variables in the test and achieve precise positioning, thereby improving the accuracy of the test results.
[0009] Optionally, in one embodiment of the present application, the processing element is specifically used to extract the RGB color number of each pixel of the digital image from the image information to convert it into grayscale data, and calculate the grayscale contrast of the directly illuminated area and the shadow area based on the grayscale data and / or extract the horizontal edge pixels and vertical edge pixels of the image to analyze the frequency of the edge pixels.
[0010] Through the above technical scheme, the embodiment of the present application can accurately quantify the color information in the image by extracting the RGB color number of each pixel of the digital image from the image information and converting it into grayscale data. After conversion into grayscale data, the data processing process can be simplified, and the grayscale contrast can be calculated. At the same time, the horizontal edge pixels and vertical edge pixels of the image are extracted to analyze the edge pixel frequency, and the characteristics of the shadow edge are quantified more accurately, thereby improving the accuracy of the shadow effect evaluation.
[0011] Optionally, in one embodiment of the present application, the surface reflectivity of the light receiving element is uniformly set.
[0012] Through the above technical solution, the embodiment of the present application can set the surface reflectivity of the light receiving element to be uniform, ensuring that when testing the light subtraction effect, the light reflection conditions received by different areas are the same, so that the test results will not be affected by local reflections or shadows caused by the uneven surface of the light receiving element, thereby improving the consistency and reliability of the test data.
[0013] Optionally, in one embodiment of the present application, the shielding member is a long columnar structure.
[0014] Through the above technical solution, the shielding member of the embodiment of the present application is a long cylindrical structure, which can simulate the shape of a writing pen in real life. When conducting a light subtraction effect test, it can more accurately reflect the writing shadow problem that may be encountered in actual use.
[0015] Optionally, in one embodiment of the present application, the light receiving element and the shielding element are arranged in parallel.
[0016] Through the above technical solution, the embodiment of the present application sets the light receiving element and the shielding element in parallel, so that the path of the light during the propagation process is simpler, which helps to reduce the projection perspective deformation of the light during the transmission process, thereby improving the stability and accuracy of the test.
[0017] The second aspect of the present application provides a method for testing light subtraction effects, including: obtaining image information corresponding to the light shadow effect; obtaining grayscale contrast and / or edge pixel frequency based on the image information; and generating a light subtraction effect test result based on the grayscale contrast and / or the edge pixel frequency.
[0018] Through the above technical scheme, the embodiment of the present application can truly reflect the light subtraction effect by obtaining image information corresponding to the light shadow effect, obtain grayscale contrast and / or edge pixel frequency according to the image information, and use multiple indicators to evaluate the light subtraction effect, thereby comprehensively evaluating the light subtraction effect from different angles, thereby improving the comprehensiveness and accuracy of the evaluation effect.
[0019] Optionally, in an embodiment of the present application, before acquiring the image information corresponding to the light shadow effect, the method includes: fixing the shielding member by a clamp so that the distance between the shielding member and the light receiving member reaches a target test distance.
[0020] Through the above technical solution, the embodiment of the present application can use the clamp to make the distance between the shielding member and the light receiving member reach the target test distance, which helps to accurately control the variables in the test and achieve precise positioning, thereby improving the accuracy of the test results.
[0021] Optionally, in one embodiment of the present application, obtaining the grayscale contrast and / or edge pixel frequency based on the image information includes: extracting the RGB color number of each pixel of the digital image from the image information to convert it into grayscale data, and calculating the grayscale contrast of the directly illuminated area and the shadow area based on the grayscale data and / or extracting the horizontal edge pixels and the vertical edge pixels of the image to analyze the edge pixel frequency.
[0022] Through the above technical scheme, the embodiment of the present application can accurately quantify the color information in the image by extracting the RGB color number of each pixel of the digital image from the image information and converting it into grayscale data. After conversion into grayscale data, the data processing process can be simplified, and the grayscale contrast can be calculated. At the same time, the horizontal edge pixels and vertical edge pixels of the image are extracted to analyze the edge pixel frequency, and the characteristics of the shadow edge are quantified more accurately, thereby improving the accuracy of the shadow effect evaluation.
[0023] Optionally, in an embodiment of the present application, before obtaining the image information corresponding to the light shadow effect, it also includes: setting the surface reflectivity of the light receiving element to be uniform.
[0024] Through the above technical solution, the embodiment of the present application can set the surface reflectivity of the light receiving element to be uniform, ensuring that when testing the light subtraction effect, the light reflection conditions received by different areas are the same, so that the test results will not be affected by local reflections or shadows caused by the uneven surface of the light receiving element, thereby improving the consistency and reliability of the test data.
[0025] Optionally, in an embodiment of the present application, before obtaining the image information corresponding to the light shadow effect, the method further includes: setting the light receiving element to be parallel to the shielding element.
[0026] Through the above technical solution, the embodiment of the present application sets the light receiving element and the shielding element in parallel, so that the path of the light during the propagation process is simpler, which helps to reduce the projection perspective deformation of the light during the transmission process, thereby improving the stability and accuracy of the test.
[0027] A third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for testing the light subtraction effect as described in the above embodiment.
[0028] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned testing method for the light subtraction effect.
[0029] The fifth aspect of the present application provides a computer program product, including a computer program, which, when executed, is used to implement the above-mentioned testing method for the light subtraction effect.
[0030] The embodiment of the present application includes a lighting device, a shielding member, a light receiving member, a recording member and a processing member, which are combined into a complete test system. The various components work together, wherein the shielding member and the light receiving member can reach the target test distance through the clamp, and the variables can be accurately controlled to achieve precise positioning, so as to effectively test the light subtraction effect. The surface reflectivity of the light receiving member is uniform, ensuring that the light reflection in different areas is the same, and is not affected by the uneven surface of the light receiving member, thereby ensuring the consistency and reliability of the test data; it is arranged in parallel with the shielding member, so that the light propagation path is simple, the perspective deformation of the projection is reduced, and the test accuracy is improved. The shielding member is a long columnar structure, which can simulate the shape of a writing pen and accurately reflect the writing shadow problem. The recording member is used to record the image information of the light shadow effect, and the processing member extracts the RGB color number of each pixel from the image information and converts it into grayscale data, simplifies the data processing process and calculates the grayscale contrast, and at the same time extracts the horizontal and vertical edge pixels to analyze the edge pixel frequency, quantifies the shadow effect from different angles, such as quantitatively evaluating the shadow effect through grayscale contrast and edge pixel frequency, and improves the comprehensiveness and accuracy of the test results.
[0031] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 It is a structural schematic diagram of a testing device for light subtraction effect provided according to an embodiment of the present application; Figure 2 A schematic diagram of the installation layout of a testing device for light subtraction effect according to an embodiment of the present application; Figure 3 A schematic diagram of a light subtraction effect measurement image according to an embodiment of the present application; Figure 4 A schematic diagram of contrast analysis of a light subtraction effect measurement image according to an embodiment of the present application; Figure 5 A schematic diagram of edge pixel frequency analysis of a light subtraction effect measurement image according to an embodiment of the present application.
[0033] Figure 6 A flow chart of a method for testing light subtraction effect provided according to an embodiment of the present application; Figure 7 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0035] The following describes the testing device and method of the light subtraction effect of the embodiment of the present application with reference to the accompanying drawings. In view of the related art mentioned in the background technology center, due to the lack of quick testing methods for lighting subtraction effects, it is difficult to select and install reasonable lamps and lighting methods, and to timely check the rationality of the subtraction effect. The present application provides a testing device for the light subtraction effect, in which different shadow effects can be generated by the distance between the light receiving part and the shielding part, and the distance variable is controlled to obtain a variety of test data. The recording part is used to accurately record the image information to ensure that the test results are based on accurate original data, and the grayscale contrast and edge pixel frequency are processed by the processing part to generate the test results, and the light silhouette effect is accurately quantified from different angles, so that the test results are scientific and accurate, and the operation process is simple and easy to control. Therefore, the problem that the related art is short of quick testing methods for lighting subtraction effects, which leads to difficulties in selecting and installing reasonable lamps and lighting methods, and timely checking the rationality of the subtraction effect, is solved.
[0036] Specifically, Figure 1 A structural schematic diagram of a light subtraction effect testing device 10 provided in an embodiment of the present application.
[0037] like Figure 1 As shown, the testing device 10 for the light subtraction effect comprises: a lighting device 100, a shielding member 200, a light receiving member 300, a recording member 400 (not marked in the figure) and a processing member 500 (not marked in the figure).
[0038] Specifically, in one embodiment of the present application, the shielding member 200 may be, but is not limited to, a long cylindrical structure. Due to its special shape, when light is irradiated and propagates along the axial direction of the column, the side surface of the column can continuously block the light, so that the shadow is distributed in a band-like manner in a direction perpendicular to the axial direction of the column, thereby causing the shielding member 200 to produce a band-like shadow. This band-like shadow is of great significance in the test of the light subtraction effect, and can cooperate with the light receiving member 300 to provide specific light and shadow conditions for accurately testing the light subtraction effect.
[0039] In the actual implementation process, the position of the shadow area of the shielding member 200 in the frame is controlled, specifically, it is controlled to be 1 / 3 away from the edge of the frame. This position can form a relatively stable and comparable light and shadow layout in the frame. From the perspective of visual effects and data collection, it will not be too close to the center to affect the analysis of the main light-receiving area, nor will it be too close to the edge to be excessively disturbed by the frame boundary effect (such as but not limited to edge light reflection, incomplete shielding, etc.). At the same time, this position is conducive to maintaining consistency in multiple tests, making the test results of different batches or different scenes more comparable.
[0040] The shielding member 200 of the embodiment of the present application is a long columnar structure, and the strip-shaped shadow formed is regular and predictable, which can provide specific light and shadow conditions to cooperate with the light receiving member 300, and is conducive to accurately testing the subtraction effect. The shadow area is located 1 / 3 of the distance from the edge of the viewfinder, which does not visually interfere with the analysis of the main light receiving area, reduces the interference of boundary effects during data collection to ensure accuracy, and can also maintain consistency in multiple tests to make the results more comparable.
[0041] The light receiving member 300 is used to form a light shadow effect corresponding to the distance between the shielding member 200 when the shielding member 200 shields the light of the lighting device 100, such as Figure 2 shown.
[0042] On the one hand, the surface reflectivity of the light receiving element 300 is uniformly set. When light is irradiated onto the surface of the light receiving element 300, due to its uniform reflectivity, the reflection of light on the surface is basically consistent, and no additional grayscale changes will occur due to local differences in the surface. When the recording element 400 records the subtraction effect image, under ideal conditions, the grayscale difference in the image is only caused by uneven light illumination, that is, the light receiving element 300 itself will not introduce grayscale interference factors caused by factors including but not limited to material, shape, surface, etc., thereby providing a reliable basis for accurately analyzing the impact of uneven light illumination on the subtraction effect.
[0043] On the other hand, the area of the light receiving element 300 is sufficient to cover the framing range of the recording element 400. Specifically, when determining the area of the light receiving element 300, the optical parameters of the recording element 400 are fully considered, such as factors including but not limited to the focal length of the lens of the recording element 400, the viewing angle range, etc. If the viewing angle of the framing range of the recording element 400 in the horizontal direction is α degrees and the viewing angle in the vertical direction is β degrees, then the size of the area of the light receiving element 300 in the horizontal and vertical directions is set to be able to fully accommodate the physical area corresponding to this viewing angle range, thereby ensuring that all light changes in the image area recorded by the recording element 400 are related to the light receiving element 300, avoiding the light reception of some areas in the framing range of the recording element 400 due to insufficient area of the light receiving element 300 being affected by other factors (such as including but not limited to interference from ambient light, etc.), thereby ensuring the accuracy and integrity of the recorded subtraction effect image data, and providing a reliable prerequisite for the subsequent analysis of the light subtraction effect based on the image.
[0044] Optionally, in one embodiment of the present application, it further includes: a clamp 600 for clamping the shielding member 200 so that the distance between the shielding member 200 and the light receiving member 300 reaches the target test distance. The distance between the light receiving member 300 and the shielding member 200 is controlled as a control variable. In this embodiment, this distance is set to 5 cm. Because the distance between the light receiving member 300 and the shielding member 200 has a crucial influence on the light subtraction effect, different distances will cause changes in light propagation, scattering, and shadow formation, which in turn affects the final light subtraction effect test results. After multiple pre-experiments and theoretical analysis, the distance of 5 cm can most effectively reflect the relationship between the light subtraction effect and other related parameters (such as but not limited to the characteristics of the shielding member 200, the surface reflectivity of the light receiving member 300, etc.) under the current test system, providing a stable and representative test condition for accurately evaluating the light subtraction effect.
[0045] In actual implementation, the light receiving element 300 and the shielding element 200 are arranged in parallel. From the perspective of optical principles, the parallel arrangement can ensure that the propagation of light between the light receiving element 300 and the shielding element 200 follows a stable and predictable law. For experimental or operational results, this parallel relationship helps to accurately control the shape, size and distribution of the shadow on the light receiving element 300, thereby providing a reliable geometric basis for accurately obtaining the light subtraction effect. Figure 2 As shown, the light receiving element 300 is laid flat on the work desk, and the cylindrical shielding element 200 is suspended in the air parallel to the light receiving element 300, so that when the light is transmitted from the shielding element 200 to the light receiving element 300, the error caused by angle deviation can be minimized to the greatest extent, further improving the accuracy of the light subtraction effect test.
[0046] The surface reflectivity of the light-receiving element 300 in the embodiment of the present application is uniform, and no additional grayscale changes are introduced, providing a reliable basis for analyzing the influence of uneven light illumination on the subtraction effect; the area is sufficient to cover the framing range of the recording element 400 to ensure the accuracy and integrity of the image data; the distance from the shielding element 200 is set to 5 cm. After preliminary experiments and analysis, this distance can effectively reflect the relationship between the light subtraction effect and other parameters; the two are set in parallel, following the law of stable optical propagation, and can accurately control the shape, size and distribution of the shadow, reduce the error caused by angle deviation, and improve the test accuracy.
[0047] The recording element 400 is used to record the image information corresponding to the light shadow effect.
[0048] Specifically, the framing aspect ratio of the recording element 400 is controlled as a control variable and set to (1:1). The reason why the framing aspect ratio is used as a control variable is that when studying and analyzing the lighting and shadow effects, the framing aspect ratio will affect the image composition, the proportional display of the shadow and the light-receiving area, and the final analysis results. Different aspect ratios may cause the image to present different visual effects and data characteristics under the same lighting and shadow conditions. The aspect ratio of 1:1 can provide a relatively balanced and symmetrical image composition. At this ratio, the spatial relationship in the horizontal and vertical directions is relatively equal, which helps to more accurately observe and analyze the distribution characteristics of light shadows in various directions. For example, when analyzing the shape and size of the shadow and its boundary relationship with the surrounding light-receiving area, an aspect ratio of 1:1 can avoid visual misleading caused by differences in the proportions of the length and width directions. Figure 3 As shown, Figure 3 It is a schematic diagram of image information corresponding to the light shadow effect recorded by the recording element 400.
[0049] In the embodiment of the present application, the recording element 400 controls the framing aspect ratio to 1:1. The 1:1 aspect ratio can provide a balanced symmetrical composition, and the horizontal and vertical spatial relationships are equal, which helps to accurately observe and analyze the distribution characteristics of light and shadow in various directions and avoid visual misleading caused by differences in aspect ratios.
[0050] The processing unit 500 is used to obtain grayscale contrast and / or edge pixel frequency according to the image information, and generate a light subtraction effect test result according to the grayscale contrast and / or edge pixel frequency.
[0051] It can be understood that the processing element 500 is a key component of the entire light subtraction effect testing device. It undertakes the important task of processing the image information recorded by the recording element 400. Its function is to extract valuable data from the image through specific algorithms and processing procedures, and analyze and calculate based on these data, and finally generate test results about the light subtraction effect.
[0052] Optionally, in one embodiment of the present application, the processing unit 500 is specifically used to extract the RGB color number of each pixel of the digital image from the image information to convert it into grayscale data, and calculate the grayscale contrast of the directly illuminated area and the shadow area based on the grayscale data and / or extract the horizontal edge pixels and vertical edge pixels of the image to analyze the edge pixel frequency.
[0053] In the actual execution process, the processing unit 500 will first extract the RGB color number of each pixel of the digital image. The digital image is composed of many pixels, and each pixel has unique RGB color information. The processing unit 500 accurately locates each pixel through specific algorithms and programs and obtains its corresponding RGB color number. For example, in a digital image composed of thousands of pixels, the processing unit 500 starts from the first pixel in the upper left corner of the image, and reads the RGB color number of each pixel in order from left to right and from top to bottom to ensure that the complete image color information is obtained. Next, the processing unit 500 will convert the extracted RGB color number of each pixel into grayscale data. The RGB color model represents various colors by mixing different proportions of the three colors of red, green, and blue, while grayscale data is a single brightness representation method. The method of converting RGB color numbers into grayscale data is usually based on a certain mathematical formula, such as the common formula: grayscale value = 0.299×R +0.587×G + 0.114×B, where R, G, and B represent the color number values of red, green, and blue, respectively. This conversion can simplify complex color images into a single grayscale representation, allowing subsequent data analysis to focus more on the brightness information of the image without being disturbed by color information, and is more conducive to extracting features related to light and shadow effects in the image.
[0054] After acquiring the grayscale data, in some cases, the processing unit 500 first needs to accurately identify the directly illuminated area and the shadow area in the digital image. The directly illuminated area is the area in the image that receives sufficient light and thus has a higher grayscale value after being converted into grayscale data; while the shadow area is the area where the light is blocked and correspondingly appears as a lower grayscale value in the grayscale data. Figure 4 As shown in the figure, grayscale contrast is an indicator used to measure the grayscale difference between different areas in an image. In the test of light subtraction effect, it is mainly used to describe the grayscale difference between the directly illuminated area and the shadow area. The calculation method is usually obtained by comparing the average grayscale values of the two areas. The larger the grayscale contrast value, the more obvious the grayscale difference between the two areas; conversely, the closer the contrast is to 1, the more similar the grayscale of the two areas is, which means that the light subtraction effect is better, because the grayscale difference between the shadow area and the directly illuminated area is smaller.
[0055] In other cases, the processing unit 500 extracts the horizontal and vertical edge pixels of the image when processing the image, such as Figure 5As shown, for the extraction of horizontal edge pixels, the processing unit 500 will start from the first row of the image and scan the pixels row by row in the horizontal direction. During the scanning process, the edge pixels are determined by comparing the grayscale value differences between adjacent pixels. For example, if there is a large mutation in the grayscale value of two adjacent pixels, they are determined as horizontal edge pixels. The extraction process of vertical edge pixels is similar, but it starts from the first column of the image and scans the pixels row by row in the vertical direction. The vertical edge pixels are also identified based on the mutation of the grayscale values of adjacent pixels. This process requires the processing unit 500 to accurately detect each pixel to ensure that all horizontal and vertical edge pixels are accurately extracted. After successfully extracting the horizontal and vertical edge pixels of the image, the processing unit 500 will then perform frequency statistics and analysis, and count each type of edge pixels (horizontal and vertical) separately. For example, the number of times the horizontal edge pixels appear is counted and recorded as the horizontal edge pixel frequency; similarly, the number of times the vertical edge pixels appear is counted to obtain the vertical edge pixel frequency. The edge pixel frequency refers to the frequency of the pixels located at the edge of the shadow area and the directly illuminated area in the image. These edge pixels are those pixels whose grayscale values suddenly change between the shadow area and the directly illuminated area. By counting the frequency of edge pixels, we can understand the clarity of the boundary between the shadow area and the directly illuminated area. Under the condition of the same grayscale contrast, the smaller the edge pixel frequency, the smoother the transition between the shadow area and the directly illuminated area, and the better the light subtraction effect.
[0056] In the embodiment of the present application, the processing element 500 can accurately extract the RGB color number and convert it into grayscale data to focus on brightness analysis, accurately calculate the grayscale contrast to determine the subtraction effect, and can also extract edge pixels and count the frequency to evaluate the transition between the shadow and the light-receiving area, thereby effectively generating a light subtraction effect test result.
[0057] According to the testing device for the light shadow reduction effect proposed in the embodiment of the present application, different shadow effects can be generated by the distance between the light receiving element and the shielding element, and the distance variable can be controlled to obtain a variety of test data. The recording element 400 is used to accurately record the image information, ensuring that the test results are based on accurate original data, and through The test results are generated by grayscale contrast and edge pixel frequency, and the light silhouette effect is accurately quantified from different angles, making the test results scientific and accurate, and the operation process is simple and easy to control.
[0058] Next, a method for testing the light subtraction effect according to an embodiment of the present application will be described with reference to the accompanying drawings.
[0059] Figure 6 It is a flow chart of a method for testing the light subtraction effect of an embodiment of the present application.
[0060] like Figure 6As shown, the testing method of the light subtraction effect includes the following steps: In step S601, image information corresponding to the light shadow effect is obtained.
[0061] Optionally, in an embodiment of the present application, before acquiring image information corresponding to the light shadow effect, the method includes: fixing the shielding member by a clamp so that the distance between the shielding member and the light receiving member reaches a target test distance.
[0062] Optionally, in an embodiment of the present application, before acquiring image information corresponding to the light shadow effect, it also includes: setting the surface reflectivity of the light receiving element to be uniform.
[0063] Optionally, in an embodiment of the present application, before acquiring image information corresponding to the light shadow effect, it also includes: setting the light receiving element and the shielding element to be parallel.
[0064] In step S602, grayscale contrast and / or edge pixel frequency are obtained according to the image information.
[0065] Optionally, in one embodiment of the present application, grayscale contrast and / or edge pixel frequency are obtained based on image information, including: extracting the RGB color number of each pixel of the digital image from the image information to convert it into grayscale data, and calculating the grayscale contrast of the directly illuminated area and the shadow area based on the grayscale data and / or extracting the horizontal edge pixels and the vertical edge pixels of the image to analyze the edge pixel frequency.
[0066] In step S603, a light subtraction effect test result is generated according to the grayscale contrast and / or the edge pixel frequency.
[0067] It should be noted that the above explanation of the embodiment of the testing device for light subtraction effect is also applicable to the testing method for light subtraction effect of this embodiment, which will not be described in detail here.
[0068] According to the testing method for the light subtraction effect proposed in the embodiment of the present application, different shadow effects can be generated by the distance between the light receiving element and the shielding element, and the distance variable can be controlled to obtain a variety of test data. The recording element can be used to accurately record the image information to ensure that the test results are based on accurate original data, and the grayscale contrast and edge pixel frequency are performed by the processing element to generate the test results, accurately quantify the light silhouette effect from different angles, so that the test results are scientific and accurate, and the operation process is simple and easy to control.
[0069] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include: A memory 701 , a processor 702 , and a computer program stored in the memory 701 and executable on the processor 702 .
[0070] When the processor 702 executes the program, the testing method for the light subtraction effect provided in the above embodiment is implemented.
[0071] Furthermore, the electronic device further comprises: The communication interface 703 is used for communication between the memory 701 and the processor 702 .
[0072] The memory 701 is used to store computer programs that can be executed on the processor 702 .
[0073] The memory 701 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0074] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0075] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can communicate with each other through an internal interface.
[0076] The processor 702 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0077] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned testing method for the light subtraction effect is implemented.
[0078] An embodiment of the present application also provides a computer program, including a computer program, which implements the above-mentioned testing method for the light subtraction effect when executed by a processor.
[0079] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0080] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0081] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0082] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or N wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0083] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0084] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0085] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0086] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A testing device for light subtraction effect, characterized in that: include: Lighting equipment and shielding; a light receiving member, used for forming a light shadow effect corresponding to the distance between the shielding members when the shielding members shield the light of the lighting device; A recording element, used to record image information corresponding to the light and shadow effect; A processing unit is used to obtain grayscale contrast and / or edge pixel frequency according to the image information, and generate a light subtraction effect test result according to the grayscale contrast and / or the edge pixel frequency.
2. The device according to claim 1, characterized in that Also includes: The clamper is used for clamping the shielding member so that the distance between the shielding member and the light receiving member reaches a target test distance.
3. The device according to claim 1, characterized in that The processing element is specifically used to extract the RGB color number of each pixel of the digital image from the image information to convert it into grayscale data, and calculate the grayscale contrast of the directly illuminated area and the shadow area based on the grayscale data and / or extract the horizontal edge pixels and vertical edge pixels of the image to analyze the frequency of the edge pixels.
4. The device according to claim 1, characterized in that The surface reflectivity of the light receiving element is uniformly set.
5. The device according to claim 1, characterized in that The shielding member is a long columnar structure.
6. The device according to claim 1, characterized in that The light receiving element and the shielding element are arranged in parallel.
7. A method for testing the light subtraction effect, characterized in that: The following steps are involved: Get the image information corresponding to the light shadow effect; Obtaining grayscale contrast and / or edge pixel frequency according to the image information; A light subtraction effect test result is generated according to the grayscale contrast and / or the edge pixel frequency.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for testing the light subtraction effect as claimed in claim 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method for testing the light subtraction effect as claimed in claim 7.
10. A computer program product, comprising a computer program, characterized in that The computer program is executed to implement the method for testing the light subtraction effect as claimed in claim 7.