Camera filtering mode calibration method and device, equipment and medium
By utilizing the polarization characteristics of the polarizer and the image recognition function of the camera, test images are taken for filter calibration, which solves the problem of camera filter switching errors and improves imaging quality and calibration efficiency.
Patent Information
- Application Number
- CN202310183388.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2024-08-23
AI Technical Summary
Existing camera filters are prone to position inversion during the switching process, resulting in poor imaging quality, and lack of fast and accurate calibration methods.
Utilizing the polarization characteristics of the polarizer and the image recognition function of the camera, by controlling the camera to enter different filter modes, shooting preset test images, and calibrating the filter set based on the difference in image brightness to ensure accurate filter switching.
It achieves fast and accurate calibration of camera filters, improves imaging quality, and avoids filter position errors caused by manual operations.
Smart Images

Figure CN118533432A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera calibration, and in particular to a camera filter mode calibration method, device, equipment and medium. Background Art
[0002] Bayonet cameras are widely used in urban traffic roads and are important front-end equipment for smart city construction. During the day, there is sufficient light and there are many diffuse reflections in the environment, which can easily cause overexposure of the image. The polarizer in the camera can filter out the diffuse reflections in the environment to ensure the quality of image capture. At night, the ambient light is dim, and the infrared cutoff filter in the camera needs to be used to allow as much ambient light as possible to enter the image sensor to ensure the brightness of the image capture.
[0003] In the prior art, different filters are usually used to form a filter group, and the filter switching is achieved by moving the filter group. In actual production, manual operation is generally used to ensure that different filters are physically bonded and smooth and there is no light leakage in the middle. However, manual operation is prone to the situation where different filters are placed in reverse positions, which will cause filter switching errors in actual use, resulting in poor camera imaging quality. Therefore, how to achieve accurate calibration of filters in cameras is one of the problems that need to be solved in camera calibration technology. Summary of the invention
[0004] The present invention provides a camera filter mode calibration method, device, equipment and medium, which can use the polarization characteristics of the polarizer and the image recognition function of the camera itself to quickly and accurately calibrate the filter in the camera, thereby ensuring the camera imaging quality.
[0005] According to one aspect of the present invention, a method for calibrating a camera filter mode is provided, the method comprising:
[0006] Controlling the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter set of the camera to be tested, and the filter set includes a first polarizer and an infrared cutoff filter;
[0007] Determine a first test image and a second test image obtained by photographing a preset test pattern in the first filtering mode and the second filtering mode respectively by the camera under test; when photographing the preset test pattern, the camera under test only relies on a preset light source to provide ambient light after passing through a second polarizer, and the illumination of the preset light source reaching an image sensor in the camera under test after sequentially passing through the second polarizer and the first polarizer is less than a preset illumination threshold;
[0008] The filter modes of the filters in the filter set of the camera to be tested are calibrated according to the first test image and the second test image.
[0009] According to another aspect of the present invention, a camera filter mode calibration device is provided, comprising:
[0010] A filter mode entry module, used to control the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter set of the camera to be tested, and the filter set includes a first polarizer and an infrared cutoff filter;
[0011] A test image determination module is used to determine a first test image and a second test image obtained by the camera under test shooting a preset test pattern in the first filtering mode and the second filtering mode respectively; when shooting the preset test pattern, the camera under test only relies on a preset light source to provide ambient light after passing through a second polarizer, and the illumination of the preset light source reaching the image sensor in the camera under test after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold;
[0012] The filter mode calibration module is used to calibrate the filter mode of the filters in the filter set of the camera to be tested according to the first test image and the second test image.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the camera filter mode calibration method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the camera filter mode calibration method described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention controls the camera to be tested to enter the first filter mode and the second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in the filter group of the camera to be tested, and the filter group includes a first polarizer and an infrared cutoff filter; determine the first test image and the second test image obtained by the camera to be tested shooting the preset test pattern in the first filter mode and the second filter mode respectively; when shooting the preset test pattern, the camera to be tested only relies on the preset light source to provide ambient light after passing through the second polarizer, and the illuminance of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than the preset illuminance threshold; the filter mode of the filter in the filter group of the camera to be tested is calibrated according to the first test image and the second test image. This technical solution can use the polarization characteristics of the polarizer and the image recognition function of the camera itself to quickly and accurately calibrate the filter in the camera, thereby ensuring the imaging quality of the camera.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a camera filter mode calibration method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 This is a schematic diagram of a tooling for a test dark box provided according to Embodiment 1 of the present invention;
[0023] Figure 3 is a flow chart of a camera filter mode calibration method provided according to Embodiment 2 of the present invention;
[0024] Figure 4 is a flow chart of a camera filter mode calibration method provided according to Embodiment 3 of the present invention;
[0025] Figure 5 is a structural schematic diagram of a camera filter mode calibration device provided according to a fourth embodiment of the present invention;
[0026] Figure 6 It is a structural schematic diagram of an electronic device for implementing a camera filter mode calibration method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Embodiment 1
[0030] Figure 1 This is a flow chart of a camera filter mode calibration method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of quickly and accurately calibrating the camera filter mode. The method can be executed by a camera filter mode calibration device. The camera filter mode calibration device can be implemented in the form of hardware and / or software. The camera filter mode calibration device can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:
[0031] S110, controlling the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter group of the camera to be tested, and the filter group includes a first polarizer and an infrared cutoff filter.
[0032] Among them, the camera to be tested may refer to a camera waiting for filter mode calibration, such as a bayonet camera. Specifically, a filter group is arranged inside the camera to be tested, and the filter group includes two filters, a first polarizer and an infrared cut-off filter. Among them, the first polarizer has the function of shielding and transmitting the incident light. Usually, linear polarized light in a certain direction can pass through the polarizer, while light with a polarization direction perpendicular to the polarizer cannot pass through the polarizer; the infrared cut-off filter can effectively block infrared light that interferes with the imaging quality, and can allow more light to enter the image sensor, thereby ensuring the image brightness. The filter mode may refer to the method of using a filter to filter the light entering the camera lens, which can be specifically described by the filter type or the ambient light brightness. Exemplarily, the filter mode can be expressed as a polarizer filter mode (using a polarizer for filtering) or an infrared cut-off filter filter mode (using an infrared cut-off filter for filtering), and can also be expressed as a day mode (brighter ambient light) or a night mode (darker ambient light). The first filter mode and the second filter mode may refer to two filter modes in the camera to be tested, respectively corresponding to different filters in the filter set of the camera to be tested. It should be noted that, since the ambient light in the day mode is brighter, a polarizing filter is usually used for filtering to avoid image overexposure, so the day mode matches the polarizing filter mode; while the ambient light in the night mode is darker, an infrared cutoff filter is usually used for filtering to ensure image brightness, so the night mode matches the infrared cutoff filter mode.
[0033] In this embodiment, the camera to be tested is first controlled to enter the first filter mode and the second filter mode respectively through the filter switching mechanism inside the camera to be tested. Among them, the filter switching mechanism can be in two forms: electromagnetic or stepper motor driven. Specifically, the electromagnetic switching mechanism is usually used for network cameras with a small target surface (generally ≤1 / 1.8'). Based on the principle of electromagnetic induction, the current direction of the energized coil is controlled to achieve the adsorption and repulsion action of the switching mechanism. The stepper motor driven switching mechanism is usually used for large-target surface cameras with C / CS interfaces, such as bayonet cameras, high-end gun cameras, etc., which can ensure the accuracy and stability of camera use. Among them, the stepper motor drive can control the motor stroke by the number of motor steps. In order to increase the life of the motor and reduce the number of times the motor hits the wall, a photointerrupter is usually used as feedback of the motor stroke position.
[0034] In this embodiment, optionally, controlling the camera to be tested to enter the first filtering mode and the second filtering mode respectively includes: controlling the filter group to move in the camera to be tested, the filter group being bonded to the filter frame; determining different filter positions in the filter group according to the signal jump result of the photo interrupter; the photo interrupter is located at a preset position of the image sensor in the camera to be tested, and a voltage jump signal is triggered when the photo interrupter is aligned with a preset marker on the filter frame; according to different filter positions in the filter group, controlling the camera to be tested to enter the first filtering mode and the second filtering mode respectively; and entering the corresponding filtering mode when different filters in the filter group arrive in front of the image sensor.
[0035] The preset position can be used to characterize the relative position relationship between the photointerrupter and the image sensor. For example, the photointerrupter can be placed at a preset position near the image sensor. The preset marker can refer to a marker pre-set on the filter frame, which can be used to reflect the position of the filter frame, thereby reflecting the positions of different filters in the filter set. The filter set is bonded to the filter frame. Exemplarily, the preset marker can be a baffle.
[0036] In this embodiment, a stepper motor can be used to drive and cooperate with a photointerrupter to control the camera to be tested to enter the first filter mode and the second filter mode respectively. Specifically, the filter frame is first controlled to move in the camera to be tested by a stepper motor. Since the filter group is bonded to the filter frame, the filter group can be controlled to move in the camera to be tested. During the movement of the filter frame, if the groove of the photointerrupter is not blocked by the preset marker on the filter frame, that is, the photointerrupter is not aligned with the preset marker on the filter frame, the photointerrupter will maintain a low level at this time; if the groove of the photointerrupter is blocked by the preset marker on the filter frame, that is, the photointerrupter is aligned with the preset marker on the filter frame, indicating that the filter frame has reached the position of the photointerrupter, the photointerrupter will jump from a low level to a high level at this time, and at the same time feedback a voltage jump signal, thereby determining the different filter positions in the filter group through the signal jump result of the photointerrupter. Since the photointerrupter is located at a preset position of the image sensor in the camera to be tested, that is, the relative position of the photointerrupter and the image sensor is known, after determining the positions of different filters in the filter group, the different filters in the filter group can be further controlled to reach the positions in front of the image sensor respectively, that is, the camera to be tested is controlled to enter the first filtering mode and the second filtering mode respectively, thereby realizing the switching of different filters in the filter group.
[0037] Through such a setting, the present solution can accurately determine the positions of different filters in the filter group with the help of a stepper motor and a photointerrupter, and then accurately control the camera to be tested to enter the first filtering mode and the second filtering mode respectively, so as to realize accurate switching of filters and ensure the stability of camera use when switching filters.
[0038] S120, determining a first test image and a second test image obtained by the camera under test shooting a preset test pattern in a first filtering mode and a second filtering mode respectively; when shooting the preset test pattern, the camera under test only relies on a preset light source to provide ambient light after passing through a second polarizer, and the illumination of the preset light source reaching the image sensor in the camera under test after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold.
[0039] Among them, the preset test pattern may refer to a preset test drawing, such as a chart drawing. The first test image and the second test image may refer to images obtained by the camera to be tested shooting the preset test pattern in the first filtering mode and the second filtering mode, respectively. The preset light source may refer to a preset luminous light source, such as white light. Optionally, the preset light source uses a surface light source array. Since the surface light source array has good illumination uniformity, the uniformity of the collected image can be guaranteed, which helps to improve the accuracy of the camera filter mode calibration. The second polarizer can be used to polarize the preset light source and provide the only ambient light for the camera to be tested to shoot the preset test pattern, that is, when the camera to be tested shoots the preset test pattern, it only relies on the preset light source to provide ambient light after passing through the second polarizer. The preset illumination threshold may refer to a preset illumination reference value of the image sensor, which can be set according to actual needs.
[0040] In this embodiment, after the camera to be tested is controlled to enter the first filtering mode and the second filtering mode respectively, the preset test pattern can be photographed in the first filtering mode and the second filtering mode respectively, so as to obtain the first test image and the second test image. It should be noted that in order to avoid the influence of ambient light in complex shooting scenes, the camera to be tested can be set to only rely on the preset light source to provide ambient light after passing through the second polarizer when shooting the preset test pattern. In addition, in order to effectively distinguish the first test image from the second test image, the illuminance of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence can be set to be less than the preset illuminance threshold. Specifically, when the camera to be tested uses the first polarizer for filtering, since the illuminance of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is small (less than the preset illuminance threshold), that is, only a small amount of light or even no light reaches the image sensor, so that the image brightness recognized by the image sensor in the polarizer filtering mode is very low or even the image cannot be recognized (the image brightness is 0). When the camera under test uses an infrared cutoff filter for filtering, as much light as possible can enter the image sensor, so that the image brightness recognized by the image sensor in the infrared cutoff filter filtering mode is relatively high. Therefore, the first test image and the second test image can be effectively distinguished by the image brightness difference, and the filter mode of the camera under test can be calibrated accordingly.
[0041] In this embodiment, optionally, the polarization angle difference between the polarization angle of the first polarizer and the polarization angle of the second polarizer satisfies a preset polarization condition, and the preset polarization condition is that the difference between the polarization angle difference and the preset reference angle is less than a preset angle threshold; the preset reference angle is 90 degrees.
[0042] In this embodiment, the polarization angle relationship between the first polarizer and the second polarizer can be set to ensure that the illumination of the preset light source after passing through the second polarizer and the first polarizer in sequence and reaching the image sensor in the camera to be tested is less than the preset illumination threshold. It should be noted that, according to the physical properties of the polarizer, when natural light passes through two polarizers in sequence, and the polarization angles of the two polarizers differ by 90 degrees, the light can only partially pass through the former polarizer, but cannot pass through the latter polarizer, that is, the light cutoff can be achieved by using two polarization angles that differ by 90 degrees. Therefore, when the polarization angle difference between the polarization angle of the first polarizer and the polarization angle of the second polarizer meets the preset polarization condition, that is, the difference between the polarization angle difference and 90 degrees is less than the preset angle threshold, it indicates that the polarization angle difference between the polarization angle of the first polarizer and the polarization angle of the second polarizer is close to 90 degrees. At this time, according to the physical properties of the polarizer, it can be ensured that the illumination of the preset light source after passing through the second polarizer and the first polarizer in sequence and reaching the image sensor in the camera to be tested is less than the preset illumination threshold.
[0043] Through such a setting, by setting the polarization angle relationship between the first polarizer and the second polarizer, the present scheme can effectively ensure that the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than the preset illumination threshold, so that the filtering mode of the camera to be tested can be quickly and accurately calibrated according to the brightness difference of the test image.
[0044] S130, performing filter mode calibration on filters in a filter set of the camera to be tested according to the first test image and the second test image.
[0045] In this embodiment, after determining the first test image and the second test image, the filter mode of the filter in the filter group of the camera to be tested can be further calibrated according to the image difference between the first test image and the second test image, and the calibration result can be saved in the Flash of the camera to be tested. Optionally, the filter mode of the filter in the filter group of the camera to be tested is calibrated according to the first test image and the second test image, including: determining the display state of the preset identification information in the first test image and the second test image; the preset test image includes the preset identification information; and the filter mode of the filter in the filter group of the camera to be tested is calibrated according to the display state of the preset identification information.
[0046] Among them, the preset identification information is set in the preset test image and can be used as the content of image recognition. Exemplarily, the preset identification information can be set to license plate information (such as license plate number). In this embodiment, it is first necessary to determine the display status of the preset identification information in the preset test image in the first test image and the second test image. Among them, the display status may be displayed or not displayed, or it may be different display brightness, which needs to be determined according to the preset illumination threshold. Then, according to the display status of the preset identification information, the filter mode of the filter in the filter group of the camera to be tested is calibrated.
[0047] For example, assume that the preset identification information in the preset test image is A123456, and the polarization angle difference between the first polarizer and the second polarizer is 90 degrees, that is, after the preset light source passes through the second polarizer and the first polarizer in sequence, no light reaches the image sensor. At this time, if A123456 is displayed in the first test image, it indicates that the filter mode corresponding to the first test image is the infrared cutoff filter filter mode (night mode); if A123456 is not displayed in the second test image, it indicates that the filter mode corresponding to the second test image is the polarizer filter mode (day mode).
[0048] Exemplarily, assuming that the preset identification information in the preset test image is A123456, and the polarization angle difference between the first polarizer and the second polarizer is close to 90 degrees, that is, the preset light source passes through the second polarizer and the first polarizer in sequence, and only a small amount of light reaches the image sensor. At this time, if the display brightness of A123456 in the first test image is high, it indicates that the filter mode corresponding to the first test image is the infrared cutoff filter filter mode (night mode); if A123456 is not displayed in the second test image or the display brightness of A123456 is low (basically close to black), it indicates that the filter mode corresponding to the second test image is the polarizer filter mode (day mode).
[0049] Through such a setting, the present solution does not need to specify the bonding positions of different filters in the filter group during camera production and processing. The filter mode of the camera to be tested can be quickly and accurately calibrated according to the display status of the preset identification information in the preset test image, thereby effectively avoiding the situation where the positions of different filters are reversed due to manual operation.
[0050] The technical solution of the embodiment of the present invention controls the camera to be tested to enter the first filter mode and the second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in the filter group of the camera to be tested, and the filter group includes a first polarizer and an infrared cutoff filter; determine the first test image and the second test image obtained by the camera to be tested shooting the preset test pattern in the first filter mode and the second filter mode respectively; when shooting the preset test pattern, the camera to be tested only relies on the preset light source to provide ambient light after passing through the second polarizer, and the illuminance of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than the preset illuminance threshold; the filter mode of the filter in the filter group of the camera to be tested is calibrated according to the first test image and the second test image. This technical solution can use the polarization characteristics of the polarizer and the image recognition function of the camera itself to quickly and accurately calibrate the filter in the camera, thereby ensuring the imaging quality of the camera.
[0051] In this embodiment, optionally, before controlling the camera to be tested to enter the first filtering mode and the second filtering mode respectively, it also includes: controlling the camera to be tested to reach the target position of the test dark box, the preset surface of the test dark box is set as a light board, the light board glass is set as a second polarizer, a preset test pattern is set on the light board, the preset test pattern includes preset identification information, the target position is opposite to the preset test pattern, and the preset light source provided by the light board provides the only ambient light for the test dark box after passing through the light board glass.
[0052] In this embodiment, in order to avoid the influence of ambient light in complex shooting scenes, a simple and ideal test environment can be pre-constructed through a test darkroom, and then the filter mode of the camera to be tested can be calibrated according to the image test results in the test environment. Figure 2 This is a schematic diagram of a test dark box provided in the first embodiment of the present invention. Figure 2 As shown, a light board is provided on the preset surface (left side surface) of the test dark box, wherein the light board glass is provided as a second polarizer, and a preset test pattern is provided on the light board, and the preset test pattern includes preset identification information A123456. The camera to be tested is located at the target position of the test dark box, and the target position is opposite to the preset test pattern, so as to ensure that the camera to be tested can clearly identify the preset identification information in the preset test pattern. The preset light source provided inside the light board provides the only illumination for the test dark box after passing through the light board glass, thereby providing a single ambient light for the test dark box. It should be noted that the font size of the preset identification information in the preset test pattern, the focal length of the lens of the camera to be tested, and the image parameters have been reasonably set in advance according to the size of the test dark box to ensure that the camera to be tested can clearly capture the image showing the preset identification information. In addition, in order to improve the calibration efficiency of the camera, the test dark box can support parallel testing of multiple cameras to be tested.
[0053] Through such a setting, this scheme can provide a simple and ideal test environment for camera filter mode calibration through the test darkroom, avoid the adverse effects of ambient light in complex shooting scenes, and thus ensure the accuracy of camera filter mode calibration.
[0054] Embodiment 2
[0055] Figure 3 This is a flow chart of a camera filter mode calibration method provided in the second embodiment of the present invention. This embodiment is optimized based on the above embodiment.
[0056] like Figure 3 As shown, the method of this embodiment specifically includes the following steps:
[0057] S210, controlling the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter group of the camera to be tested, and the filter group includes a first polarizer and an infrared cutoff filter.
[0058] S220, determining a first test image and a second test image obtained by the camera under test shooting a preset test pattern in a first filtering mode and a second filtering mode respectively; when shooting the preset test pattern, the camera under test only relies on a preset light source to provide ambient light after passing through a second polarizer, and the illumination of the preset light source reaching the image sensor in the camera under test after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold.
[0059] Among them, the specific implementation method of S210-S220 can refer to the detailed description of S110-S120, which will not be repeated here.
[0060] S230, if the preset identification information is displayed in the first test image and the preset identification information is not displayed in the second test image, determine that the first filtering mode is an infrared cutoff filter filtering mode and the second filtering mode is a polarizing filter mode; the preset test image includes the preset identification information.
[0061] When the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold, the image sensor cannot detect the preset identification information.
[0062] In this embodiment, when the illuminance of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is set to be less than the preset illuminance threshold, it can be ensured that the image sensor cannot detect the preset identification information in the preset test image (no light reaches the image sensor, or even if a small amount of light reaches the image sensor, it is not enough to recognize the preset identification information). In this case, the filter mode of the camera to be tested can be quickly and accurately calibrated only by whether the preset identification information can be displayed in the test image. Specifically, if the preset identification information is displayed in the first test image, and the preset identification information is not displayed in the second test image, it can be determined that the first filter mode is the infrared cutoff filter filter mode, and the second filter mode is the polarizer filter mode.
[0063] S240, if the preset identification information is not displayed in the first test image and the preset identification information is displayed in the second test image, determine that the first filtering mode is a polarizer filtering mode and the second filtering mode is an infrared cutoff filter filtering mode; the preset test image includes the preset identification information.
[0064] In this embodiment, on the basis that the image sensor cannot detect the preset identification information in the preset test image when the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than the preset illumination threshold, if the preset identification information is not displayed in the first test image and the preset identification information is displayed in the second test image, it can be determined that the first filtering mode is the polarizer filtering mode, and the second filtering mode is the infrared cutoff filter filtering mode.
[0065] S250, if the preset identification information is displayed in both the first test image and the second test image, it is determined that the first filtering mode and the second filtering mode are both infrared cutoff filter filtering modes, and a first error prompt message is sent; the preset test image includes the preset identification information, and the first error prompt message is used to prompt that the infrared cutoff filter is repeatedly installed in the camera to be tested.
[0066] In this embodiment, due to manual operation errors, there may be a situation where the same type of filters are placed in different filter positions. When ensuring that the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than the preset illumination threshold, the image sensor cannot detect the preset identification information in the preset test image. If the preset identification information is displayed in both the first test image and the second test image, it can be determined that the first filter mode and the second filter mode are both infrared cutoff filter modes, indicating that infrared cutoff filters are repeatedly placed in different filter positions. At this time, the operator can be prompted to repeatedly install the infrared cutoff filter in the camera to be tested by sending a first error prompt information, so that the operator can replace the wrongly placed filter in a timely and accurate manner according to the first error prompt information, and re-calibrate the filter mode for the camera to be tested after the filter is updated. Among them, the error prompt information can include filter position information and its corresponding filter mode calibration information.
[0067] S260, if the preset identification information is not displayed in the first test image and the second test image, it is determined that the first filter mode and the second filter mode are both polarizing filter modes, and a second error prompt message is sent; the preset test image includes the preset identification information, and the second error prompt message is used to prompt that the polarizing film is repeatedly installed in the camera to be tested.
[0068] In this embodiment, on the basis that the image sensor cannot detect the preset identification information in the preset test image when the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than the preset illumination threshold, if the preset identification information is not displayed in the first test image and the second test image, it can be determined that the first filtering mode and the second filtering mode are both polarizer filter filtering modes, indicating that polarizers are repeatedly placed at different filter positions. At this time, the operator can be prompted to repeatedly install the polarizer in the camera to be tested by sending a second error prompt message, so that the operator can promptly and accurately replace the wrongly placed filter according to the second error prompt message, and re-calibrate the filter mode of the camera to be tested after the filter is updated.
[0069] The technical solution of the embodiment of the present invention can utilize the polarization characteristics of the polarizer and the image recognition function of the camera itself to quickly and accurately calibrate the filter mode of the camera to be tested simply by testing whether preset identification information can be displayed in the image, which helps to improve the calibration efficiency of the camera filter mode.
[0070] Embodiment 3
[0071] Figure 4 This is a flow chart of a camera filter mode calibration method provided in Embodiment 3 of the present invention. This embodiment is optimized based on the above embodiments.
[0072] like Figure 4 As shown, the method of this embodiment specifically includes the following steps:
[0073] S310, controlling the camera to be tested to reach the target position of the test dark box; the preset surface of the test dark box is set to a light board, the light board glass is set to a second polarizer, a preset test pattern is set on the light board, the preset test pattern includes preset identification information, the target position is opposite to the preset test pattern, and the preset light source provided by the light board provides the only ambient light for the test dark box after passing through the light board glass.
[0074] S320, controlling the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter group of the camera to be tested, and the filter group includes a first polarizer and an infrared cutoff filter.
[0075] S330, determining a first test image and a second test image obtained by the camera under test shooting a preset test pattern in a first filtering mode and a second filtering mode respectively; when shooting the preset test pattern, the camera under test only relies on a preset light source to provide ambient light after passing through a second polarizer, and the illumination of the preset light source reaching the image sensor in the camera under test after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold.
[0076] S340, if the preset identification information is displayed in the first test image and the preset identification information is not displayed in the second test image, determine that the first filtering mode is an infrared cutoff filter filtering mode and the second filtering mode is a polarizing filter mode; the preset test image includes the preset identification information.
[0077] When the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold, the image sensor cannot detect the preset identification information.
[0078] S350, if the preset identification information is not displayed in the first test image, and the preset identification information is displayed in the second test image, it is determined that the first filtering mode is a polarizer filtering mode, and the second filtering mode is an infrared cutoff filter filtering mode; the preset test image includes the preset identification information.
[0079] S360, if the preset identification information is displayed in both the first test image and the second test image, it is determined that the first filtering mode and the second filtering mode are both infrared cutoff filter filtering modes, and a first error prompt message is sent; the preset test image includes the preset identification information, and the first error prompt message is used to prompt that the infrared cutoff filter is repeatedly installed in the camera to be tested.
[0080] S370, if the preset identification information is not displayed in the first test image and the second test image, it is determined that the first filter mode and the second filter mode are both polarizing filter modes, and a second error prompt message is sent; the preset test image includes the preset identification information, and the second error prompt message is used to prompt that the polarizing film is repeatedly installed in the camera to be tested.
[0081] The technical solution of the embodiment of the present invention can set up an ideal test environment with the help of a test darkroom, effectively avoiding the interference of ambient light in complex shooting scenes, and utilizes the polarization characteristics of the polarizer and the image recognition function of the camera itself. It can quickly and accurately calibrate the filter mode of the camera to be tested simply by whether preset identification information can be displayed in the test image. While ensuring the imaging quality of the camera, the calibration efficiency of the camera filter mode can be improved.
[0082] Embodiment 4
[0083] Figure 5 This is a schematic diagram of the structure of a camera filter mode calibration device provided in the fourth embodiment of the present invention. The device can execute the camera filter mode calibration method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Figure 5 As shown, the device comprises:
[0084] A filter mode entry module 410 is used to control the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter set of the camera to be tested, and the filter set includes a first polarizer and an infrared cutoff filter;
[0085] The test image determination module 420 is used to determine the first test image and the second test image obtained by the camera under test shooting the preset test pattern in the first filtering mode and the second filtering mode respectively; when shooting the preset test pattern, the camera under test only relies on the ambient light provided by the preset light source after passing through the second polarizer, and the illumination of the preset light source reaching the image sensor in the camera under test after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold;
[0086] The filter mode calibration module 430 is used to calibrate the filter mode of the filters in the filter set of the camera to be tested according to the first test image and the second test image.
[0087] Optionally, the light filtering mode entering module 410 is specifically used for:
[0088] Controlling the filter set to move in the camera to be tested, wherein the filter set is bonded to the filter frame;
[0089] Determining the positions of different filters in the filter set according to the signal jump result of the photointerrupter; the photointerrupter is located at a preset position of the image sensor in the camera to be tested, and a voltage jump signal is triggered when the photointerrupter is aligned with a preset marker on the filter frame;
[0090] According to different filter positions in the filter group, the camera to be tested is controlled to enter a first filter mode and a second filter mode respectively; when different filters in the filter group arrive in front of the image sensor, the camera enters a corresponding filter mode.
[0091] Optionally, the filter mode calibration module 430 includes:
[0092] A display state determination unit, used to determine the display state of preset identification information in the first test image and the second test image; the preset test image includes the preset identification information;
[0093] The filter mode calibration unit is used to calibrate the filter mode of the filters in the filter group of the camera to be tested according to the display status of the preset identification information.
[0094] Optionally, the filter mode calibration unit is used to:
[0095] If the preset identification information is displayed in the first test image, and the preset identification information is not displayed in the second test image, determining that the first filtering mode is an infrared cutoff filter filtering mode, and the second filtering mode is a polarizing filter mode;
[0096] If the preset identification information is not displayed in the first test image, and the preset identification information is displayed in the second test image, determining that the first filtering mode is a polarizing filter mode, and the second filtering mode is an infrared cutoff filter mode;
[0097] When the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold, the image sensor cannot detect the preset identification information.
[0098] Optionally, the filter mode calibration unit is further used for:
[0099] If the preset identification information is displayed in both the first test image and the second test image, it is determined that both the first filter mode and the second filter mode are infrared cutoff filter modes, and a first error prompt message is sent; the first error prompt message is used to prompt that the infrared cutoff filter is repeatedly installed in the camera to be tested;
[0100] If the preset identification information is not displayed in the first test image and the second test image, it is determined that the first filter mode and the second filter mode are both polarizing filter modes, and a second error prompt message is sent; the second error prompt message is used to prompt that the polarizing filter is repeatedly installed in the camera to be tested;
[0101] When the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold, the image sensor cannot detect the preset identification information.
[0102] Optionally, the polarization angle difference between the polarization angle of the first polarizer and the polarization angle of the second polarizer satisfies a preset polarization condition, and the preset polarization condition is that the difference between the polarization angle difference and a preset reference angle is less than a preset angle threshold; the preset reference angle is 90 degrees.
[0103] Optionally, the device further comprises:
[0104] A camera positioning module is used to control the camera to be tested to reach a target position of a test dark box before controlling the camera to be tested to enter a first filtering mode and a second filtering mode respectively. The preset surface of the test dark box is set as a light board, and the light board glass is set as a second polarizing plate. A preset test pattern is set on the light board, and the preset test pattern includes preset identification information. The target position is opposite to the preset test pattern. The preset light source provided by the light board provides the only ambient light for the test dark box after passing through the light board glass.
[0105] Optionally, the preset light source adopts a surface light source array.
[0106] A camera filter mode calibration device provided in an embodiment of the present invention can execute a camera filter mode calibration method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method.
[0107] Embodiment 5
[0108] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0109] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0110] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0111] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a calibration method for a camera filter mode.
[0112] In some embodiments, the calibration method of the camera filter pattern may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the calibration method of the camera filter pattern described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the calibration method of the camera filter pattern in any other appropriate manner (e.g., by means of firmware).
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A camera filter mode calibration method, characterized in that: The method comprises: Controlling the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter set of the camera to be tested, and the filter set includes a first polarizer and an infrared cutoff filter; Determine a first test image and a second test image obtained by photographing a preset test pattern in the first filtering mode and the second filtering mode respectively by the camera under test; when photographing the preset test pattern, the camera under test only relies on a preset light source to provide ambient light after passing through a second polarizer, and the illumination of the preset light source reaching an image sensor in the camera under test after sequentially passing through the second polarizer and the first polarizer is less than a preset illumination threshold; The filter modes of the filters in the filter set of the camera to be tested are calibrated according to the first test image and the second test image.
2. The method according to claim 1, characterized in that Controlling the camera under test to enter a first light filtering mode and a second light filtering mode respectively includes: Controlling the filter set to move in the camera to be tested, wherein the filter set is bonded to the filter frame; Determining the positions of different filters in the filter set according to the signal jump result of the photointerrupter; the photointerrupter is located at a preset position of the image sensor in the camera to be tested, and a voltage jump signal is triggered when the photointerrupter is aligned with a preset marker on the filter frame; According to different filter positions in the filter group, the camera to be tested is controlled to enter a first filter mode and a second filter mode respectively; when different filters in the filter group arrive in front of the image sensor, the camera enters a corresponding filter mode.
3. The method according to claim 1, characterized in that Calibrate the filter mode of the filter in the filter set of the camera to be tested according to the first test image and the second test image, including: Determining a display state of preset identification information in the first test image and the second test image; the preset test image includes the preset identification information; The filter modes of the filters in the filter set of the camera to be tested are calibrated according to the display status of the preset identification information.
4. The method according to claim 3, characterized in that The filter mode of the filter in the filter set of the camera to be tested is calibrated according to the display state of the preset identification information, including: If the preset identification information is displayed in the first test image, and the preset identification information is not displayed in the second test image, determining that the first filtering mode is an infrared cutoff filter filtering mode, and the second filtering mode is a polarizing filter mode; If the preset identification information is not displayed in the first test image, and the preset identification information is displayed in the second test image, determining that the first filtering mode is a polarizing filter mode, and the second filtering mode is an infrared cutoff filter mode; When the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold, the image sensor cannot detect the preset identification information.
5. The method according to claim 3, characterized in that: The filter mode of the filter in the filter set of the camera to be tested is calibrated according to the display state of the preset identification information, including: If the preset identification information is displayed in both the first test image and the second test image, it is determined that both the first filter mode and the second filter mode are infrared cutoff filter modes, and a first error prompt message is sent; the first error prompt message is used to prompt that the infrared cutoff filter is repeatedly installed in the camera to be tested; If the preset identification information is not displayed in the first test image and the second test image, it is determined that the first filter mode and the second filter mode are both polarizing filter modes, and a second error prompt message is sent; the second error prompt message is used to prompt that the polarizing filter is repeatedly installed in the camera to be tested; When the illumination of the preset light source reaching the image sensor in the camera to be tested after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold, the image sensor cannot detect the preset identification information.
6. The method according to claim 1, characterized in that The polarization angle difference between the polarization angle of the first polarizer and the polarization angle of the second polarizer meets a preset polarization condition, wherein the preset polarization condition is that the difference between the polarization angle difference and a preset reference angle is less than a preset angle threshold; and the preset reference angle is 90 degrees.
7. The method according to claim 1, characterized in that Before controlling the camera to be tested to enter the first filtering mode and the second filtering mode respectively, the method further includes: The camera to be tested is controlled to reach a target position of a test dark box, wherein a preset surface of the test dark box is set as a light board, and a light board glass is set as a second polarizing plate. A preset test pattern is set on the light board, and the preset test pattern includes preset identification information. The target position is opposite to the preset test pattern, and a preset light source provided by the light board provides the only ambient light for the test dark box after passing through the light board glass.
8. A camera filter mode calibration device, characterized in that: The device comprises: A filter mode entry module, used to control the camera to be tested to enter a first filter mode and a second filter mode respectively; the first filter mode and the second filter mode correspond to different filters in a filter set of the camera to be tested, and the filter set includes a first polarizer and an infrared cutoff filter; A test image determination module is used to determine a first test image and a second test image obtained by the camera under test shooting a preset test pattern in the first filtering mode and the second filtering mode respectively; when shooting the preset test pattern, the camera under test only relies on a preset light source to provide ambient light after passing through a second polarizer, and the illumination of the preset light source reaching the image sensor in the camera under test after passing through the second polarizer and the first polarizer in sequence is less than a preset illumination threshold; The filter mode calibration module is used to calibrate the filter mode of the filters in the filter set of the camera to be tested according to the first test image and the second test image.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the camera filter pattern calibration method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the camera filter mode calibration method according to any one of claims 1 to 7 when executed.
