Exposure time calibration method and apparatus, and device and storage medium
By taking the grayscale value of the target object, the exposure time is adjusted according to the change of the grayscale value, and the problem in the prior art is difficult to accurately calibrate the deviation between the camera exposure time and the light source lighting time, and the accuracy and stability of the calibration are improved.
Patent Information
- Application Number
- PCT/CN2024/141010
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-21
- Filing Date
- 2024-12-20
- Publication Date
- 2025-06-26
AI Technical Summary
The prior art is difficult to accurately calibrate the deviation between camera exposure time and light source lighting time, especially in the order of milliseconds or even microseconds, and manual calibration is difficult to ensure accuracy.
By taking the target object to obtain the grayscale value of its image, adjust the exposure start time, exposure end time, light source opening time and light source closing time according to the change of grayscale value, and obtain the calibration grayscale value change curve, thereby determining the calibration exposure time.
The accuracy of exposure time calibration is improved, and the exposure time is calibrated based on the grayscale value of the grayscale value to ensure the stability and accuracy of the calibration results.
Smart Images

Figure CN2024141010_26062025_PF_FP_ABST
Abstract
Description
Exposure time calibration method, device, equipment and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 21, 2023, with application number 202311770051.8 and invention name “A method, device, equipment and storage medium for exposure time calibration”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of image processing technology, and in particular to an exposure time calibration method, device, equipment and storage medium. Background Art
[0003] Exposure time refers to the length of time a camera or camcorder's light sensor is exposed to light, typically measured in seconds. Longer exposure times allow the sensor to receive more light, which is generally suitable for low-light conditions. Shorter exposure times, on the other hand, allow the sensor to receive less light, which is generally suitable for brighter lighting conditions.
[0004] In practical applications, exposure efficiency must be achieved within the light source's on-time. Therefore, the deviation between the exposure time and the light source's on-time is required. However, since exposure time is measured in milliseconds or even microseconds, manually calibrating the deviation between the exposure time and the light source's on-time is difficult to guarantee. Summary of the Invention
[0005] Based on the above problems, the present application provides an exposure time calibration method, device, equipment and storage medium.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] First aspect: This application provides an exposure time calibration method, comprising:
[0008] photographing a target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining a grayscale value of an image corresponding to the target object;
[0009] adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to a change in the grayscale value of the image to obtain a calibrated grayscale value change curve;
[0010] According to the calibrated grayscale value variation curve, a calibrated exposure start time and a calibrated exposure end time are determined within a time period in which the grayscale value of the image remains unchanged.
[0011] In one possible implementation, adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to a change in the grayscale value of the image to obtain a calibrated grayscale value change curve includes:
[0012] According to the grayscale value of the image, the exposure start time, the exposure end time, the light source turn-on time and the light source turn-off time are adjusted to respectively make the exposure period before the light source lighting period, the exposure period within the light source lighting period, and the exposure period after the light source lighting period, and obtain a calibrated grayscale value change curve, the exposure period is the period between the exposure start time and the exposure end time, and the light source lighting period is the period between the light source turn-on time and the light source turn-off time.
[0013] In one possible implementation, before photographing the target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining the grayscale value of the image corresponding to the target object, the method further includes:
[0014] Determining a region of interest of the photographed target object;
[0015] The step of photographing a target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining a grayscale value of an image corresponding to the target object includes:
[0016] Shooting the target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining a grayscale value of the image corresponding to the region of interest;
[0017] The step of adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the grayscale value of the image to obtain a calibrated grayscale value change curve includes:
[0018] According to the change of the grayscale value of the image corresponding to the region of interest, the exposure start time, the exposure end time, the light source on time and the light source off time are adjusted to obtain a calibrated grayscale value change curve.
[0019] In a possible implementation, determining the region of interest of the photographed target object includes:
[0020] A flat area corresponding to the photographed target object is determined as the region of interest.
[0021] In a possible implementation manner, before determining the region of interest of the photographed target object, the method further includes:
[0022] According to the clarity of the photographed target object, the height of the camera z-axis is adjusted to obtain a clear photographed target object;
[0023] The determining of the region of interest of the photographed target object includes:
[0024] Determine a region of interest of the clear photographed target object.
[0025] In one possible implementation, after adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change in the grayscale value of the image to obtain a calibrated grayscale value change curve, the method further includes:
[0026] The starting point of the grayscale value change curve after calibration is determined as the light source turning-on time after calibration, and the ending point of the grayscale value change curve after calibration is determined as the light source turning-off time after calibration.
[0027] In a possible implementation, the duration between the light source turning on time and the light source turning off time is 1.3 times the duration between the exposure start time and the exposure end time.
[0028] Second aspect: The present application provides an exposure time calibration device, comprising:
[0029] a photographing unit, an adjusting unit, and a determining unit;
[0030] The shooting unit is used to shoot a target object according to the exposure start time, the exposure end time, the light source on time and the light source off time, and obtain the grayscale value of the image corresponding to the target object;
[0031] The adjustment unit is configured to adjust the exposure start time, the exposure end time, the light source on time, and the light source off time according to a change in the grayscale value of the image, to obtain a calibrated grayscale value change curve;
[0032] The determining unit is configured to determine a calibrated exposure start time and a calibrated exposure end time within a time period in which the grayscale value of the image remains unchanged according to the calibrated grayscale value change curve.
[0033] In a possible implementation, the adjusting unit is specifically configured to:
[0034] According to the grayscale value of the image, the exposure start time, the exposure end time, the light source turn-on time and the light source turn-off time are adjusted to respectively make the exposure period before the light source lighting period, the exposure period within the light source lighting period, and the exposure period after the light source lighting period, and obtain a calibrated grayscale value change curve, the exposure period is the period between the exposure start time and the exposure end time, and the light source lighting period is the period between the light source turn-on time and the light source turn-off time.
[0035] In a possible implementation, the apparatus further includes: a region of interest determining unit;
[0036] The region of interest determining unit is configured to determine the region of interest of the photographed target object;
[0037] The shooting unit is specifically configured to shoot the target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtain the grayscale value of the image corresponding to the region of interest;
[0038] The adjustment unit is specifically used to adjust the exposure start time, the exposure end time, the light source on time and the light source off time according to the change of the grayscale value of the image corresponding to the region of interest, so as to obtain a calibrated grayscale value change curve.
[0039] In a possible implementation, the region of interest determining unit is specifically configured to:
[0040] A flat area corresponding to the photographed target object is determined as the region of interest.
[0041] In a possible implementation, the device further includes: a clarity adjustment unit;
[0042] The clarity adjustment unit is used to adjust the height of the camera z-axis according to the clarity of the photographed target object to obtain a clear photographed target object;
[0043] The region of interest determining unit is specifically configured to determine the region of interest of the clear photographed target object.
[0044] In a possible implementation, the device further includes: a light source switch determination unit;
[0045] The light source switch determination unit is configured to determine the starting point of the calibrated gray value change curve as the calibrated light source on time, and determine the ending point of the calibrated gray value change curve as the calibrated light source off time.
[0046] In a possible implementation, the duration between the light source turning on time and the light source turning off time is 1.3 times the duration between the exposure start time and the exposure end time.
[0047] A third aspect: The present application provides an electronic device, the electronic device comprising: a processor and a memory;
[0048] The memory is used to store program code and transmit the program code to the processor;
[0049] The processor is configured to execute the steps of the exposure time calibration method described above according to the instructions in the program code.
[0050] Fourth aspect: The present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the exposure time calibration method as described above are implemented.
[0051] Compared with the prior art, this application has the following beneficial effects:
[0052] The present application provides an exposure time calibration method, apparatus, device, and storage medium. The method comprises capturing a target object based on an exposure start time, exposure end time, light source on time, and light source off time, obtaining a grayscale value of an image corresponding to the target object; adjusting the exposure start time, exposure end time, light source on time, and light source off time based on changes in the grayscale value of the image to obtain a calibrated grayscale value change curve; and determining a calibrated exposure start time and a calibrated exposure end time based on the calibrated grayscale value change curve within a time period in which the grayscale value of the image remains constant. In the present application, the measurement of time is converted into a measurement of the grayscale value of the image, and the exposure time is calibrated based on the grayscale value of the image, thereby improving the accuracy of the calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0054] FIG1 is a flow chart of an exposure time calibration method provided in an embodiment of the present application;
[0055] FIG2 is a schematic diagram of a flat area provided in an embodiment of the present application;
[0056] FIG3 is a schematic diagram showing the relative relationship between exposure time and light source lighting time according to an embodiment of the present application;
[0057] FIG4 is a schematic diagram of a grayscale value change curve provided in an embodiment of the present application;
[0058] FIG5 is a schematic structural diagram of an exposure time calibration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] As described above, how to improve the accuracy of calibrating exposure time has become a technical problem that needs to be urgently solved by those skilled in the art.
[0060] In photography applications, to improve exposure efficiency, exposure must occur within the light source's on-time. Therefore, it's necessary to determine the deviation between the exposure time and the camera's exposure time. However, this deviation is difficult to determine. Furthermore, since exposure time is measured in milliseconds or even microseconds, manually calibrating the deviation is difficult to ensure accuracy.
[0061] Based on this, the present application provides an exposure time calibration method. The method comprises photographing a target object based on an exposure start time, an exposure end time, a light source on time, and a light source off time, and obtaining the grayscale value of the image corresponding to the target object. The method then adjusts the exposure start time, the exposure end time, the light source on time, and the light source off time according to changes in the grayscale value of the image to obtain a calibrated grayscale value change curve. Based on the calibrated grayscale value change curve, the calibrated exposure start time and the calibrated exposure end time are determined within a time period in which the grayscale value of the image remains unchanged. In the present application, the measurement of time is converted into the measurement of the grayscale value of the image, and the exposure time is calibrated based on the grayscale value of the image, thereby improving the accuracy of the calibration.
[0062] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 those skilled in the art without creative work are within the scope of protection of this application.
[0063] Refer to FIG1 , which is a flow chart of an exposure time calibration method provided in an embodiment of the present application, including S101 - S103 .
[0064] S101 , photographing a target object according to an exposure start time, an exposure end time, a light source on time, and a light source off time, and obtaining a grayscale value of an image corresponding to the target object.
[0065] The grayscale value of an image refers to the brightness of each pixel in the image, typically expressed as an integer between 0 and 255. In a grayscale image, the grayscale value of each pixel represents the brightness of that pixel. A larger grayscale value indicates a higher brightness, while a smaller grayscale value indicates a lower brightness. For example, a grayscale value of 0 represents black, and a grayscale value of 255 represents white. Grayscale values between 0 and 255 represent different grayscale levels.
[0066] In one possible implementation, the target object is photographed according to the exposure start time, exposure end time, light source on time, and light source off time. Before obtaining the grayscale value of the image corresponding to the target object, the region of interest (ROI) of the target object can be determined first.
[0067] After determining the region of interest of the target object, the target object can be photographed based on the exposure start time, exposure end time, light source on time, and light source off time, to obtain the grayscale value of the image corresponding to the region of interest. Subsequently, the exposure start time, exposure end time, light source on time, and light source off time can be adjusted based on changes in the grayscale value of the image corresponding to the region of interest to obtain a calibrated grayscale value change curve.
[0068] In the embodiment of the present application, the exposure time can be calibrated according to the change of the grayscale value of the image corresponding to the region of interest, without having to calibrate the exposure time with reference to the grayscale value of the entire image, which can effectively improve the calibration efficiency.
[0069] Exemplarily, since the grayscale values of the pixels in the flat area corresponding to the target object are consistent, the flat area corresponding to the target object can be determined as the region of interest.
[0070] As shown in Figure 2, this figure is a schematic diagram of a flat area provided by an embodiment of the present application. In the figure, the upper figure is a planar image, and the lower figure is the corresponding stereoscopic image, where Regions 1-1, 1-2, 1-3, 1-4, and 1-5 are all flat areas, and the grayscale values of the pixels in each flat area are the same. Using the grayscale value changes of the pixels in the flat area as a reference, the exposure start time, the exposure end time, the light source on time, and the light source off time are adjusted to obtain a calibrated grayscale value change curve.
[0071] The change in the grayscale value of the pixels in the flat area is caused by the different overlap durations between the exposure period and the light source lighting period. Therefore, the relationship between the exposure period and the light source lighting period can be determined based on the change in the grayscale value of the pixels in the flat area. For example, as the overlap between the exposure period and the light source lighting period increases, the grayscale value of the pixels in the flat area increases accordingly; when the exposure period and the light source lighting period completely overlap, the grayscale value of the pixels in the flat area reaches its maximum value; and as the overlap between the exposure period and the light source lighting period decreases, the grayscale value of the pixels in the flat area decreases accordingly.
[0072] For example, since the black area changes less with the light source and the change is not obvious, when determining the region of interest in the image shown in Figure 2, the white region 1-1 can be selected as the region of interest compared to the black regions 1-2, 1-3, 1-4, and 1-5.
[0073] In one possible implementation, before determining the ROI of the target object, the camera's z-axis height can be adjusted based on the clarity of the target object to obtain a clear view of the target object. After obtaining a clear view of the target object, the ROI of the clear target object can be determined. This can improve the accuracy of exposure time calibration to a certain extent.
[0074] S102 : adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the grayscale value of the image to obtain a calibrated grayscale value change curve.
[0075] In one possible implementation, the exposure start time, the exposure end time, the light source turn-on time, and the light source turn-off time are adjusted according to the grayscale value of the image, so that the exposure period is before the light source lighting period, the exposure period is within the light source lighting period, and the exposure period is after the light source lighting period, and a calibrated grayscale value change curve is obtained, where the exposure period is the period between the exposure start time and the exposure end time, and the light source lighting period is the period between the light source turn-on time and the light source turn-off time.
[0076] As shown in Figure 3, this figure is a schematic diagram of the relative relationship between exposure time and light source lighting time provided in an embodiment of the present application. Here, tCi0 represents the camera's exposure start time; tCi1 represents the camera's exposure end time; tLi0 represents the light source on time; tLi1 represents the light source off time; and i is a positive integer greater than 0, representing the number of groups. The duration corresponding to the exposure period is equal to the difference between the camera's exposure end time and the camera's exposure start time, and the duration corresponding to the light source lighting period is equal to the difference between the light source off time and the light source on time.
[0077] In Figure 3 (a), i=1, tC10 represents the exposure start time of the camera, tC11 represents the exposure end time of the camera, tL10 represents the light source on time; tL11 represents the light source off time. Figure (a) shows that the exposure start time is before the light source on time, and the exposure end time is before the light source off time, that is, the exposure period is before the light source lighting period, corresponding to the early exposure situation; in Figure 3 (b), i=2, tC20 represents the exposure start time of the camera, tC21 represents the exposure end time of the camera, tL20 represents the light source on time; tL21 represents the light source off time. In FIG3 (c), i=3, tC30 represents the exposure start time of the camera, tC31 represents the exposure end time of the camera, tL30 represents the light source turning on time, and tL31 represents the light source turning off time. FIG3 (c) shows that the exposure start time is after the light source turning on time, and the exposure end time is after the light source turning off time, that is, the exposure period is after the light source lighting period, which corresponds to the exposure lag situation.
[0078] As shown in Figure 4, this figure is a schematic diagram of a grayscale value change curve provided by an embodiment of the present application. Among them, Figures (a), (b), and (c) correspond to the situations where the light source is on for too long, the light source is on for an appropriate length of time, and the light source is on for too short a length of time, respectively. Grayscale H represents the maximum grayscale, and grayscale L represents the minimum grayscale.
[0079] The rising segment G1 corresponds to the early exposure situation in FIG. 3 , the flat segment G2 corresponds to the appropriate exposure situation in FIG. 3 , and the falling segment G3 corresponds to the delayed exposure situation in FIG. 3 .
[0080] In the embodiment of the present application, by adjusting the exposure start time, the exposure end time, the light source on time and the light source off time, the calibrated grayscale value change curve can be made as shown in Figure (b) of Figure 4, so that the light source is lit for an appropriate length of time.
[0081] S103 : Determine a calibrated exposure start time and a calibrated exposure end time within a time period in which the grayscale value of the image remains unchanged according to the calibrated grayscale value change curve.
[0082] After obtaining the calibrated grayscale value variation curve, the calibrated exposure start time and the calibrated exposure end time can be determined within a period of time when the grayscale value of the image remains unchanged, ie, the flat segment G2 as shown in FIG. 4 .
[0083] In a possible implementation, the starting point of the calibrated grayscale value change curve is determined as the calibrated light source turn-on time, and the ending point of the calibrated grayscale value change curve is determined as the calibrated light source turn-off time.
[0084] In a possible implementation, the duration between the light source turning on time and the light source turning off time is 1.3 times the duration between the exposure start time and the exposure end time.
[0085] In this application, the light source lighting time is controlled to be 30% longer than the camera exposure time to avoid signal jitter and maintain the stability of photography.
[0086] In summary, the present application provides an exposure time calibration method, which photographs a target object based on an exposure start time, an exposure end time, a light source on time, and a light source off time to obtain the grayscale value of the image corresponding to the target object; adjusts the exposure start time, the exposure end time, the light source on time, and the light source off time according to changes in the grayscale value of the image to obtain a calibrated grayscale value change curve; and determines the calibrated exposure start time and the calibrated exposure end time within a time period in which the grayscale value of the image remains unchanged based on the calibrated grayscale value change curve. In the present application, the measurement of time is converted into the measurement of the grayscale value of the image, and the exposure time is calibrated based on the grayscale value of the image, thereby improving the accuracy of the exposure time calibration.
[0087] The present application provides an exposure time calibration device. See Figure 5, which is a structural schematic diagram of an exposure time calibration device provided in an embodiment of the present application. Its specific implementation method is consistent with the implementation method and the technical effect achieved in the embodiment of the above method, and some contents will not be repeated here.
[0088] The present application provides an exposure time calibration device 1100, comprising:
[0089] A shooting unit 1101, an adjustment unit 1102, and a determination unit 1103;
[0090] The photographing unit 1101 is configured to photograph a target object according to an exposure start time, an exposure end time, a light source on time, and a light source off time, and obtain a grayscale value of an image corresponding to the target object;
[0091] The adjusting unit 1102 is configured to adjust the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the grayscale value of the image, so as to obtain a calibrated grayscale value change curve;
[0092] The determining unit 1103 is configured to determine a calibrated exposure start time and a calibrated exposure end time within a time period in which the grayscale value of the image remains unchanged according to the calibrated grayscale value change curve.
[0093] In a possible implementation, the adjusting unit is specifically configured to:
[0094] According to the grayscale value of the image, the exposure start time, the exposure end time, the light source turn-on time and the light source turn-off time are adjusted to respectively make the exposure period before the light source lighting period, the exposure period within the light source lighting period, and the exposure period after the light source lighting period, and obtain a calibrated grayscale value change curve, the exposure period is the period between the exposure start time and the exposure end time, and the light source lighting period is the period between the light source turn-on time and the light source turn-off time.
[0095] In a possible implementation, the apparatus further includes: a region of interest determining unit;
[0096] The region of interest determining unit is configured to determine the region of interest of the photographed target object;
[0097] The shooting unit is specifically configured to shoot the target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtain the grayscale value of the image corresponding to the region of interest;
[0098] The adjustment unit is specifically used to adjust the exposure start time, the exposure end time, the light source on time and the light source off time according to the change of the grayscale value of the image corresponding to the region of interest, so as to obtain a calibrated grayscale value change curve.
[0099] In a possible implementation, the region of interest determining unit is specifically configured to:
[0100] A flat area corresponding to the photographed target object is determined as the region of interest.
[0101] In a possible implementation, the device further includes: a clarity adjustment unit;
[0102] The clarity adjustment unit is used to adjust the height of the camera z-axis according to the clarity of the photographed target object to obtain a clear photographed target object;
[0103] The region of interest determining unit is specifically configured to determine the region of interest of the clear photographed target object.
[0104] In a possible implementation, the device further includes: a light source switch determination unit;
[0105] The light source switch determination unit is configured to determine the starting point of the calibrated gray value change curve as the calibrated light source on time, and determine the ending point of the calibrated gray value change curve as the calibrated light source off time.
[0106] In a possible implementation, the duration between the light source turning on time and the light source turning off time is 1.3 times the duration between the exposure start time and the exposure end time.
[0107] In summary, the present application provides an exposure time calibration device that can convert the measurement of time into the measurement of the grayscale value of an image, and calibrate the exposure time based on the grayscale value of the image, thereby improving the accuracy of the exposure time calibration.
[0108] The present application provides an electronic device, the electronic device comprising: a processor and a memory;
[0109] The memory is used to store program code and transmit the program code to the processor;
[0110] The processor is configured to execute the steps of the exposure time calibration method described above according to the instructions in the program code.
[0111] The present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the exposure time calibration method described above are implemented.
[0112] Example:
[0113] Embodiment 1: A method for calibrating exposure time, comprising:
[0114] photographing a target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining a grayscale value of an image corresponding to the target object;
[0115] adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to a change in the grayscale value of the image to obtain a calibrated grayscale value change curve;
[0116] According to the calibrated grayscale value variation curve, a calibrated exposure start time and a calibrated exposure end time are determined within a time period in which the grayscale value of the image remains unchanged.
[0117] Embodiment 2: The method according to embodiment 1, wherein adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the grayscale value of the image to obtain a calibrated grayscale value change curve includes:
[0118] According to the grayscale value of the image, the exposure start time, the exposure end time, the light source turn-on time and the light source turn-off time are adjusted to respectively make the exposure period before the light source lighting period, the exposure period within the light source lighting period, and the exposure period after the light source lighting period, and obtain a calibrated grayscale value change curve, the exposure period is the period between the exposure start time and the exposure end time, and the light source lighting period is the period between the light source turn-on time and the light source turn-off time.
[0119] Embodiment 3: The method according to embodiment 1 or 2, wherein before photographing the target object based on the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining the grayscale value of the image corresponding to the target object, the method further comprises:
[0120] Determining a region of interest of the photographed target object;
[0121] The step of photographing a target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining a grayscale value of an image corresponding to the target object includes:
[0122] Shooting the target object according to the exposure start time, the exposure end time, the light source on time, and the light source off time, and obtaining a grayscale value of the image corresponding to the region of interest;
[0123] The step of adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the grayscale value of the image to obtain a calibrated grayscale value change curve includes:
[0124] According to the change of the grayscale value of the image corresponding to the region of interest, the exposure start time, the exposure end time, the light source on time and the light source off time are adjusted to obtain a calibrated grayscale value change curve.
[0125] Embodiment 4: The method according to embodiments 1-3, wherein determining the region of interest of the photographed target object comprises:
[0126] A flat area corresponding to the photographed target object is determined as the region of interest.
[0127] Embodiment 5: The method according to embodiments 1-4, wherein, before determining the region of interest of the photographed target object, the method further comprises:
[0128] According to the clarity of the photographed target object, the height of the camera z-axis is adjusted to obtain a clear photographed target object;
[0129] The determining of the region of interest of the photographed target object includes:
[0130] Determine a region of interest of the clear photographed target object.
[0131] Embodiment 6: The method according to any one of embodiments 1-5, wherein, after adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change in the grayscale value of the image, and obtaining a calibrated grayscale value change curve, the method further comprises:
[0132] The starting point of the grayscale value change curve after calibration is determined as the light source turning-on time after calibration, and the ending point of the grayscale value change curve after calibration is determined as the light source turning-off time after calibration.
[0133] Embodiment 7: The method according to any one of embodiments 1-6, wherein the duration between the light source turning on time and the light source turning off time is 1.3 times the duration between the exposure start time and the exposure end time.
[0134] Embodiment 8: An exposure time calibration device, comprising:
[0135] a photographing unit, an adjusting unit, and a determining unit;
[0136] The shooting unit is used to shoot a target object according to the exposure start time, the exposure end time, the light source on time and the light source off time, and obtain the grayscale value of the image corresponding to the target object;
[0137] The adjustment unit is configured to adjust the exposure start time, the exposure end time, the light source on time, and the light source off time according to a change in the grayscale value of the image, to obtain a calibrated grayscale value change curve;
[0138] The determining unit is configured to determine a calibrated exposure start time and a calibrated exposure end time within a time period in which the grayscale value of the image remains unchanged according to the calibrated grayscale value change curve.
[0139] Embodiment 9: An electronic device, comprising a processor and a memory, wherein the memory is used to store program code and transmit the program code to the processor;
[0140] The processor is configured to execute an exposure time calibration method as described in any one of embodiments 1-7 according to instructions in the program code.
[0141] Embodiment 10: A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, an exposure time calibration method as described in any one of embodiments 1-7 is implemented.
[0142] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and apparatus embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0143] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for calibrating exposure time, characterized in that: include: According to the exposure start time, the exposure end time, the light source on time and the light source off time, a shooting target object is shot to obtain a grayscale value of an image corresponding to the shooting target object; According to the change of the gray value of the image, adjusting the exposure start time, the exposure end time, the light source on time and the light source off time to obtain a calibrated gray value change curve; According to the calibrated grayscale value variation curve, a calibrated exposure start time and a calibrated exposure end time are determined within a time period in which the grayscale value of the image remains unchanged.
2. The method according to claim 1, characterized in that The step of adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the gray value of the image to obtain a calibrated gray value change curve includes: According to the grayscale value of the image, the exposure start time, the exposure end time, the light source turn-on time and the light source turn-off time are adjusted to respectively make the exposure period before the light source lighting period, the exposure period within the light source lighting period, and the exposure period after the light source lighting period, so as to obtain a calibrated grayscale value change curve, the exposure period is the period between the exposure start time and the exposure end time, and the light source lighting period is the period between the light source turn-on time and the light source turn-off time.
3. The method according to claim 1, characterized in that Before photographing the target object according to the exposure start time, the exposure end time, the light source on time and the light source off time, and obtaining the grayscale value of the image corresponding to the target object, the method further includes: Determine a region of interest of the photographed target object; The method of photographing a target object according to the exposure start time, the exposure end time, the light source turn-on time, and the light source turn-off time, and obtaining a grayscale value of an image corresponding to the target object includes: According to the exposure start time, the exposure end time, the light source on time and the light source off time, the shooting target object is photographed to obtain the gray value of the image corresponding to the region of interest; The step of adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the gray value of the image to obtain a calibrated gray value change curve includes: According to the change of the gray value of the image corresponding to the region of interest, the exposure start time, the exposure end time, the light source turn-on time and the light source turn-off time are adjusted to obtain a calibrated gray value change curve.
4. The method according to claim 3, characterized in that The determining the region of interest of the photographed target object comprises: A flat area corresponding to the photographed target object is determined as the region of interest.
5. The method according to claim 3, characterized in that: Before determining the region of interest of the photographing target object, the method further includes: According to the clarity of the photographed target object, adjusting the height of the camera z-axis to obtain a clear photographed target object; The determining the region of interest of the photographed target object comprises: Determine a region of interest of the clear photographing target object.
6. The method according to claim 1, characterized in that After adjusting the exposure start time, the exposure end time, the light source on time, and the light source off time according to the change of the gray value of the image to obtain a calibrated gray value change curve, the method further includes: The starting point of the calibrated grayscale value variation curve is determined as the calibrated light source turning-on time, and the ending point of the calibrated grayscale value variation curve is determined as the calibrated light source turning-off time.
7. The method according to any one of claims 1 to 6, characterized in that: The duration between the light source turning on time and the light source turning off time is 1.3 times the duration between the exposure starting time and the exposure ending time.
8. An exposure time calibration device, characterized in that: include: A photographing unit, an adjusting unit and a determining unit; The shooting unit is used to shoot a target object according to the exposure start time, the exposure end time, the light source turn-on time and the light source turn-off time, and obtain the gray value of the image corresponding to the target object; The adjustment unit is used to adjust the exposure start time, the exposure end time, the light source on time and the light source off time according to the change of the gray value of the image, so as to obtain a calibrated gray value change curve; The determination unit is used to determine the calibrated exposure start time and the calibrated exposure end time within a time period in which the grayscale value of the image remains unchanged according to the calibrated grayscale value change curve.
9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the steps of an exposure time calibration method as described in any one of claims 1-7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of an exposure time calibration method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Dimming method and system for improving linearity of camera light source, and storage medium
CN115657404A
Exposure time calibration method and device, equipment and storage medium
CN117459711A
Camera unit with shutter detector
EP2302901A2
Image pickup apparatus and control method therefor
US20060098115A1