CN115657404A - Light modulation method and system for improving linearity of camera light source and storage medium - Google Patents

Light modulation method and system for improving linearity of camera light source and storage medium Download PDF

Info

Publication number
CN115657404A
CN115657404A CN202211589333.3A CN202211589333A CN115657404A CN 115657404 A CN115657404 A CN 115657404A CN 202211589333 A CN202211589333 A CN 202211589333A CN 115657404 A CN115657404 A CN 115657404A
Authority
CN
China
Prior art keywords
light source
period
brightness level
gray value
duty ratio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211589333.3A
Other languages
Chinese (zh)
Other versions
CN115657404B (en
Inventor
周施雨
元光远
张小宁
张贇
金长明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Anxin Precision Technology Co Ltd
Original Assignee
Hefei Anxin Precision Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Anxin Precision Technology Co Ltd filed Critical Hefei Anxin Precision Technology Co Ltd
Priority to CN202211589333.3A priority Critical patent/CN115657404B/en
Publication of CN115657404A publication Critical patent/CN115657404A/en
Application granted granted Critical
Publication of CN115657404B publication Critical patent/CN115657404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention relates to the field of light source brightness adjustment, and particularly discloses a dimming method and system for improving linearity of a camera light source and a storage medium, wherein the method is based on PWM dimming and comprises the following steps: determining light source lighting time corresponding to an overexposure critical point of the camera, wherein the overexposure critical point means that the gray value of an image shot by the camera reaches the maximum value and does not increase with the increase of the light source lighting time; and increasing the period lighting time in one light source period, wherein the sum of the period lighting time of the light source is less than or equal to the light source lighting time in one exposure period of the camera. The scheme can improve the linear relation between the image gray value and the brightness level, and improve the utilization rate and the adjustment precision of the light source.

Description

Light modulation method and system for improving linearity of camera light source and storage medium
Technical Field
The invention relates to the field of light source brightness adjustment, in particular to a dimming method and system for improving linearity of a camera light source and a storage medium.
Background
The machine vision system generally comprises a camera, a light source and an image processing unit, wherein according to the characteristics of an identified object, the light source brightness is required to be provided for the camera to shoot the object, and the image processing unit can conveniently identify the characteristics of the object. PWM dimming (Pulse Width Modulation) is a common dimming method, and the current PWM dimming method is used to adjust the brightness of the light source, and the dimming method is: a certain voltage or current is kept constant, but the on and off times within a certain period are changed, i.e. the average voltage or current is changed.
When the current is constant, the luminous intensity is a certain value according to the working principle of the light source, so that ideally, in a light source period, the brightness of the light source is in direct proportion to the conduction time, and the brightness level, namely the duty ratio of the PWM (the proportion of the conduction time to the light source period) is adjusted. The brightness of the light source can be reflected by the gray scale value of the image, which is a numerical value representing the brightness of the image, and the brightness is larger when the gray scale value is larger, such as the gray scale value ranging from 0 to 255. In summary, the gray-scale value of the image has a linear relationship with the brightness level of the light source.
When the actual analog circuit is used to realize PWM dimming, a period of time is required for switching from on to off, which is called rise time and fall time. When the period of the light source is short (compared with the rising time and the falling time), the light source starts to be closed before reaching a stable conduction state after being conducted, and the direct ratio relation between the brightness of the light source and the conduction time cannot be met, so that the linearity between the image gray value and the brightness level is poor; when the on-time of the light source exceeds a certain value, that is, the brightness level reaches a certain level, the gray value of the image reaches the maximum value, the linear relationship between the gray value of the image and the brightness level is deteriorated, even no linear relationship exists, and the subsequent brightness level has no practical adjusting significance. Poor linearity between the grey scale values and the brightness levels of the image leads to a reduced utilization of the light source and a reduced adjustment accuracy.
Disclosure of Invention
The invention aims to overcome the problems in the prior art, and provides a dimming method, a dimming system and a storage medium for improving the linearity of a camera light source, which can improve the linear relation between the gray value of an image and the brightness level and improve the utilization rate and the adjustment precision of the light source.
In order to achieve the above object, a first aspect of the present invention provides a dimming method for improving linearity of a camera light source, the method based on PWM dimming, comprising the steps of:
determining light source lighting time corresponding to an overexposure critical point of the camera, wherein the overexposure critical point means that the gray value of an image shot by the camera reaches the maximum value and does not increase with the increase of the light source lighting time;
increasing the period lighting time in one light source period, wherein the sum of the period lighting time of the light source is less than or equal to the light source lighting time in one exposure period of the camera; the method for increasing the period lighting time in one light source period comprises the following steps: the duty ratio is not changed and the light source period is enlarged, or the duty ratio is not changed and enlarged, or the light source period and the duty ratio are simultaneously enlarged.
The invention provides a dimming method for improving linearity of a camera light source, which is based on PWM dimming and comprises the following steps:
gradually lightening the light source according to the brightness level to take a picture, recording the gray value of the photographed image, and obtaining a relation curve of the gray value and the brightness level;
determining the corresponding brightness level d when the gray value reaches the maximum according to the relation curve;
calculating according to the brightness level d to obtain the maximum duty ratio as follows: D/D, wherein D represents the maximum value of the brightness level;
adjusting the duty ratio of the light source within the range of 0-D/D, shooting to obtain an image, recording the gray value of the image, and establishing a gray value-duty ratio coordinate curve;
and selecting the duty ratio corresponding to the straight line segment before the gray value reaches the maximum value from the coordinate curve as a dimming range.
A third aspect of the present invention provides a dimming system for improving linearity of a camera light source, comprising:
the calculation module is used for determining the light source lighting time corresponding to the camera overexposure critical point, wherein the overexposure critical point means that the gray value of an image shot by the camera reaches the maximum value and does not increase along with the increase of the lighting time of the light source, and the light source adopts PWM (pulse-width modulation) for dimming;
the adjusting module is used for increasing the period lighting time length in one light source period, and the sum of the period lighting time lengths of the light sources is less than or equal to the light source lighting time length in one exposure period of the camera; the method for increasing the period lighting time in one light source period comprises the following steps: the duty ratio is not changed and the light source period is enlarged, or the duty ratio is not changed and enlarged, or the light source period and the duty ratio are simultaneously enlarged.
A fourth aspect of the present invention provides a dimming system for improving linearity of a light source of a camera, the light source using PWM dimming, comprising:
the relation establishing module is used for gradually lightening the light source according to the brightness level to shoot, recording the gray value of the shot image and obtaining a relation curve of the gray value and the brightness level;
the maximum duty ratio calculation module is used for determining the brightness level d corresponding to the maximum gray value according to the relation curve, and calculating to obtain the maximum duty ratio: D/D, wherein D represents the maximum value of the brightness level;
the coordinate curve module is used for adjusting the duty ratio of the light source within the range of 0-D/D, shooting to obtain an image, recording the gray value of the image and establishing a gray value-duty ratio coordinate curve;
the duty ratio adjusting range module is used for selecting a duty ratio corresponding to a straight line segment before the gray value reaches the maximum value from the coordinate curve as a dimming range;
and the calling module is used for re-dividing the brightness level in the dimming range, establishing a corresponding relation of the brightness level-the gray value-the duty ratio, and adjusting the duty ratio according to the brightness level and/or the gray value to perform dimming.
A fifth aspect of the present invention provides a computer storage medium having a program stored thereon, the program being executable by a processor to implement the steps of the above-described dimming method for improving linearity of a camera light source.
By the technical scheme, the linear relation between the image gray value and the brightness level is improved by adjusting the lighting time of the light source, the requirement that the linearity of the light source is improved only by modifying the logic of a hardware board card in actual operation is met, the working period or the duty ratio of the light source is adjusted, the adjustable range of the light source is flexibly limited according to the actual brightness requirement of the light source, the linearity of the light source is improved, the processing mode is simple, the rising time and the falling time of a PWM (pulse-width modulation) waveform in a hardware circuit are not required to be adjusted, meanwhile, the influence of overlong rising/falling time and overhigh brightness level on the linearity is avoided, and the utilization rate and the adjustment precision of the light source are effectively improved.
Drawings
FIG. 1 is a schematic view of a light source conditioning system according to the present invention;
FIG. 2 is a schematic diagram of a light source duty cycle and a camera exposure time;
FIG. 3 is a graph of central gray scale value versus brightness level for linearity differences in the prior art;
FIG. 4 is a schematic diagram of an ideal square wave signal and an actual square wave signal;
FIG. 5 is a graph illustrating a relationship between a central gray-level value and a brightness level before dimming according to an embodiment of the present invention;
fig. 6 is a graph showing the relationship between the central gray-scale value and the brightness level after dimming according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The dimming method for improving the linearity of the camera light source is based on the following system, as shown in fig. 1, and comprises the following parts: light source, hardware integrated circuit board, camera, software system. Sending the brightness level to a hardware board card through a software system, wherein the parameter range is 0-1000 exemplarily; the hardware board card performs hardware logic processing on the received brightness grade to generate a PWM signal controlled by the light source, and the light source is controlled to be lightened at different grades through the hardware circuit; the camera collects images of the same object under different brightness levels, and a software system processes image data to obtain a curve graph of the gray value and the brightness level of the image. The specific working principle is as follows: firstly, a software system starts a photographing action, on one hand, a camera is controlled to start the photographing action, on the other hand, a brightness level required for photographing is issued to a hardware board card, the parameter range is 0 to 1000, the brightness of a light source is divided into 1000 levels, and the higher the level is, the stronger the brightness of the light source is. And then the hardware board outputs a PWM signal controlled by the light source after logical processing according to the issued brightness level, the signal controls a light source control circuit on the hardware board to work, the light source is driven to light according to the brightness level, at the moment, the camera carries out image acquisition on the same object under the brightness, and the acquired image data is uploaded to a software system. And finally, after the software system acquires the image information, analyzing the gray value of the image to obtain the gray value data corresponding to the issued brightness level. The software system repeats the steps to obtain the gray value data corresponding to each brightness level, and the curve graph of the image gray value and the brightness level can be obtained after the software processing. Through analysis of the graph, light source control can be adjusted according to the dimming method for improving linearity of the camera light source.
The exposure time M of the camera in the light source adjusting system is a fixed value and is used for determining the light entering time during each photographing. In order to ensure that the light-entering time of each photographing is consistent under the same brightness level, the light source period T 'needs to satisfy M = nT' (n is a positive integer), as shown in fig. 2, a high light source control waveform indicates that the light source is in an on state of lighting, and the current PWM control indicates that the light source is in a full current state. When the light source starting point is not consistent with the camera exposure starting point, the duration of the light source in the on state of lighting can be kept consistent in each exposure time.
Example 1
Based on the above principle, the first aspect of the present invention provides a dimming method for improving linearity of a camera light source, wherein the method is based on PWM dimming, and comprises the following steps:
determining light source lighting time corresponding to an overexposure critical point of the camera, wherein the overexposure critical point means that the gray value of an image shot by the camera reaches the maximum value and does not increase with the increase of the light source lighting time;
increasing the period lighting time in one light source period, wherein the sum of the period lighting time of the light source is less than or equal to the light source lighting time in one exposure period of the camera; the method for increasing the period lighting time in one light source period comprises the following steps: the duty ratio is not changed and the light source period is enlarged, or the duty ratio is not changed and enlarged, or the light source period and the duty ratio are simultaneously enlarged.
As shown in fig. 3, the poor linearity of the curve may affect the selection of the brightness level by the software system because the center gray value-brightness level coordinate established by taking the center gray value of the image as a parameter is: the PWM signal output by the hardware board card when actually controlling the light source is not an ideal square wave model, and the waveform of the PWM signal has a rising edge and a falling edge and correspondingly has a rising time T r And decrease T f . As shown in FIG. 4, when the light source period is short, the rise time T is r And a falling time T f The light source cannot be ignored, and the light source starts to fall down before the light source rises to a stable full current state, namely the light source is not in a stable state all the time, and at the moment, the image gray value and the brightness level cannot achieve a good linear relation. To solve this problem, on the premise that M = nT '(n is a positive integer), the period lighting time within one light source period T' is increased (i.e., the time for which the single-light-source control waveform shown in fig. 2 is increased to be high) so that the rising or falling time is much shorter than the period lighting time, the influence of the unstable state on the light source is negligible, and the linearity between the gray scale value and the brightness level can be effectively improved. Therefore, the present invention reduces or eliminates the rise time T by extending the period on time within one light source period T r And a fall time T f The influence of (c). Meanwhile, in order to avoid overhigh brightness level caused by overlong period lighting time in a light source period T', the light source lighting time corresponding to the overexposure critical point of the camera needs to be determined so as to avoid the phenomenon that the gray value of an image shot by the camera reaches the maximum value and is not increased along with the increase of the lighting time of the light source. After the light source lighting time corresponding to the camera overexposure critical point is determined, 3 methods are available for increasing the periodic lighting time in one light source period within the range: large light source period or light source period without duty ratio changeThe duty ratio is not changed to be increased or the light source period and the duty ratio are simultaneously increased. In the processing of the hardware board, the light source period T 'is increased, that is, the value of N in the logic of the hardware board is modified (a count value in the logic processing is used to implement the period control), and preferably, the rise time or fall time is less than 0.1T'.
Further, the process of determining the light source lighting duration corresponding to the camera overexposure critical point is as follows:
presetting a light source overexposure period T so that the light source lights up a camera in one overexposure period to reach the overexposure critical point;
gradually lightening the light source according to the brightness level to take a picture, recording the gray value of the photographed image, and obtaining a relation curve of the gray value and the brightness level;
determining the corresponding brightness level d when the gray value reaches the maximum according to the relation curve;
calculating to obtain the light source lighting time t, wherein the formula is as follows: t = (D/D) max ) T, wherein D max Representing the brightness level at which the light source is lit for one of said overexposure periods.
When the brightness of the light source is strong, the gray level of the image can quickly rise to the maximum value as the brightness level is increased, for example, as shown in fig. 5, the brightness level after the gray level reaches the maximum value 247.546 has no adjusting significance, and the gray level difference of the adjacent brightness levels before the gray level reaches the maximum value is large, so that the adjusting precision is reduced. And in order to determine the maximum value of the gray value of the image, gradually lightening the light source for photographing. Illustratively, as shown in fig. 5, the central gray scale value of the image is 247.546, which reaches a maximum value, and the corresponding current brightness level is 4. When the brightness level is divided into 0-1000, i.e. D max The light source lighting time t =400/1000 × t =0.4t corresponding to the overexposure critical point is calculated to be 1000.
For the establishment of the relationship curve between the gray-scale value and the brightness level shown in fig. 5, on the premise that the brightness level division standards are consistent, the consistent data shown in fig. 5 can be obtained by adopting the light sources which are lighted under various light source periods or duty ratios. Therefore, on the premise that the brightness level division standards are consistent, the relationship curve between the gray value and the brightness level established by adopting different light source periods or duty ratios is suitable for determining the corresponding brightness level d when the gray value under different overexposure periods reaches the maximum.
Further preferably, the carrier for executing the dimming method is a hardware board in the light source adjusting system, and the hardware board controls the light source period through a counting logic. Therefore, the method provided by the invention can meet the requirement that the working period or duty ratio of the light source is adjusted only by modifying the logic of the hardware board card in actual operation, flexibly limit the adjustable range of the light source according to the actual brightness requirement of the light source, improve the linearity of the light source, simplify the processing mode, avoid the adjustment of the rising time and the falling time of the PWM waveform in a hardware circuit, avoid the influence of overlong rising/falling time and overhigh brightness level on the linearity, and effectively improve the utilization rate and the adjustment precision of the light source.
Based on the same inventive concept, the invention provides a dimming system for improving the linearity of a camera light source, which comprises:
the calculation module is used for determining the light source lighting time corresponding to the camera overexposure critical point, wherein the overexposure critical point means that the gray value of an image shot by the camera reaches the maximum value and does not increase along with the increase of the lighting time of the light source, and the light source adopts PWM (pulse-width modulation) for dimming;
the adjusting module is used for adjusting the period lighting time length in one light source period, and in one exposure period of the camera, the sum of the period lighting time lengths of the light sources is less than or equal to the light source lighting time length; the method for increasing the period lighting time in one light source period comprises the following steps: the duty ratio is not changed and the light source period is enlarged, or the duty ratio is not changed and enlarged, or the light source period and the duty ratio are simultaneously enlarged.
Further, the calculation module includes:
the pre-setting unit is used for presetting a light source overexposure period so that the light source lights up a camera in the overexposure period to reach the overexposure critical point;
the relation curve establishing unit is used for gradually lighting the light source according to the brightness level to shoot, recording the gray value of the shot image and obtaining the relation curve of the gray value and the brightness level;
the light source lighting time calculating unit is used for determining the brightness level d corresponding to the maximum gray value according to the relation curve, and calculating to obtain the light source lighting time t, wherein the formula is as follows: t = (D/D) max ) T, where T represents the overexposure period, D max Representing the brightness level at which the light source is lit for one of said overexposure periods.
The duty ratio of the light source in the method and the system needs to satisfy 0.1-D/D max . If the duty ratio is less than 10%, the rise-fall time is relatively long, and the linearity of the light source is poor; if the duty ratio is larger than D/D max It may result in an excessive brightness level causing poor linearity of the light source.
Example 2
When the period of the initial light source is too long, the brightness level is too large, so that the linear relation between the image gray value and the brightness level is poor or even does not exist, and the later brightness level has no practical adjusting significance. In order to overcome this problem, based on the same concept of adjusting the period lighting time within one light source period as in embodiment 1, the light source period is not changed, and the duty ratio of the light source is changed. Accordingly, a second aspect of the present invention provides a dimming method for improving linearity of a camera light source, the method based on PWM dimming, comprising the steps of:
the light source is lightened step by step according to the brightness level for shooting, the gray value of the shot image is recorded, and a relation curve of the gray value and the brightness level is obtained;
determining the corresponding brightness level d when the gray value reaches the maximum according to the relation curve;
calculating according to the brightness level d to obtain the maximum duty ratio as follows: D/D, wherein D represents the maximum value of the brightness level;
adjusting the duty ratio of the light source within the range of 0-D/D, shooting to obtain an image, recording the gray value of the image, and establishing a gray value-duty ratio coordinate curve;
selecting a duty ratio corresponding to a straight line segment before the gray value reaches the maximum value from the coordinate curve as a dimming range;
and the brightness levels in the dimming range are divided again, the corresponding relation of the brightness levels, the gray value and the duty ratio is established, and the duty ratio is adjusted according to the brightness levels and/or the gray value to perform dimming.
Exemplarily, using the same luminance level division standard as embodiment 1 and the light source adjusting system as shown in fig. 1, a curve of the gray value and the luminance level as shown in fig. 5 is obtained, and the maximum duty ratio is calculated as: D/D =400/1000=40%. On the premise that the light source period is not changed, controlling the duty ratio adjusting range to be 0-40%, and dividing the brightness level within the duty ratio range to be 0-1000 again, as shown in fig. 6, so as to obtain a gray value and brightness level curve with a good linear relation; it is generally sufficient to default to a linearity exceeding 0.995, such as where the point corresponding to the brightness level 1000 also defaults to a linear relationship. And in the subsequent dimming, directly adjusting the corresponding duty ratio parameter according to the issued brightness level parameter or gray value.
Based on the same inventive concept, the invention provides a dimming system for improving linearity of a camera light source, wherein the light source adopts PWM dimming, and the dimming system comprises:
the relation establishing module is used for gradually lightening the light source according to the brightness level to shoot, recording the gray value of the shot image and obtaining a relation curve of the gray value and the brightness level;
the maximum duty ratio calculation module is used for determining the brightness level d corresponding to the maximum gray value according to the relation curve, and calculating to obtain the maximum duty ratio: D/D, wherein D represents the maximum value of the brightness level;
the coordinate curve module is used for adjusting the duty ratio of the light source within the range of 0-D/D, shooting to obtain an image, recording the gray value of the image and establishing a gray value-duty ratio coordinate curve;
the duty ratio adjusting range module is used for selecting a duty ratio corresponding to a straight line segment before the gray value reaches the maximum value from the coordinate curve as a dimming range;
and the calling module is used for re-dividing the brightness level in the dimming range, establishing a corresponding relation of the brightness level-the gray value-the duty ratio, and adjusting the duty ratio according to the brightness level and/or the gray value to perform dimming.
A third aspect of the present invention provides a computer storage medium having stored thereon a program executable by a processor to perform the steps of the method described in embodiment 1 and/or embodiment 2.
In summary, the PWM dimming of the present invention keeps the output light source control current unchanged, and adjusts the one-time lighting duration in the light source period according to the rise time and the fall time of the analog circuit and the exposure time of the camera photographing, so that the rise time or the fall time is far shorter than the stable on-time, and the gray level of the image and the brightness level can achieve a good linear relationship. Meanwhile, the lighting time of the light source is limited, the brightness of each grade is reduced, and the utilization rate and the adjustment precision of the light source are improved. The method and the device meet the requirements that in actual operation, the working period or the duty ratio of the light source is adjusted only by modifying the logic of the hardware board card, the adjustable range of the light source is flexibly limited according to the actual brightness requirement of the light source, so that the linearity of the light source is improved, the processing mode is simpler, the rising time and the falling time of the PWM waveform in the hardware circuit are not required to be adjusted, the influence of the rising/falling time and the overhigh brightness level on the linearity is avoided, and the utilization rate and the adjustment precision of the light source are effectively improved.
The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited thereto. Within the scope of the technical idea of the invention, numerous simple modifications can be made to the technical solution of the invention, including combinations of the individual specific technical features in any suitable way. The invention is not described in detail in order to avoid unnecessary repetition. Such simple modifications and combinations should be considered within the scope of the present disclosure as well.

Claims (10)

1. A dimming method for improving linearity of a camera light source, the method based on PWM dimming, comprising the following steps:
determining the light source lighting time corresponding to an overexposure critical point of the camera, wherein the overexposure critical point means that the gray value of an image shot by the camera reaches the maximum value and does not increase with the increase of the lighting time of the light source;
increasing the period lighting time in one light source period, wherein the sum of the period lighting time of the light source is less than or equal to the light source lighting time in one exposure period of the camera; the method for increasing the period lighting time in one light source period comprises the following steps: the duty ratio is not changed and the light source period is enlarged, or the duty ratio is not changed and enlarged, or the light source period and the duty ratio are simultaneously enlarged.
2. A dimming method according to claim 1, wherein the determining the light source turn-on duration corresponding to the camera overexposure critical point is performed as follows:
presetting a light source overexposure period so that the light source lights up a camera in the overexposure period to reach the overexposure critical point;
the light source is lightened step by step according to the brightness level for shooting, the gray value of the shot image is recorded, and a relation curve of the gray value and the brightness level is obtained;
determining the corresponding brightness level d when the gray value reaches the maximum according to the relation curve;
calculating to obtain the light source lighting time t, wherein the formula is as follows: t = (D/D) max ) T, where T represents the overexposure period, D max Representing the brightness level at which the light source is illuminated for one of said overexposure periods.
3. A dimming method as claimed in claim 2, wherein the duty cycle is 0.1-D/D max
4. A dimming method for improving linearity of a camera light source, the method based on PWM dimming, comprising the following steps:
the light source is lightened step by step according to the brightness level for shooting, the gray value of the shot image is recorded, and a relation curve of the gray value and the brightness level is obtained;
determining the corresponding brightness level d when the gray value reaches the maximum according to the relation curve;
calculating according to the brightness level d to obtain the maximum duty ratio as follows: D/D, wherein D represents the maximum value of the brightness level;
adjusting the duty ratio of the light source within the range of 0-D/D, shooting to obtain an image, recording the gray value of the image, and establishing a gray value-duty ratio coordinate curve;
and selecting the duty ratio corresponding to the straight line segment before the gray value reaches the maximum value from the coordinate curve as a dimming range.
5. The dimming method according to claim 4, wherein the brightness levels in the dimming range are subdivided, a correspondence relationship between the brightness levels and the gray-scale values is established, and the duty ratio is adjusted according to the brightness levels and/or the gray-scale values to perform dimming.
6. A dimming system for improving linearity of a camera light source, comprising:
the calculation module is used for determining the light source lighting time corresponding to the camera overexposure critical point, the overexposure critical point means that the gray value of an image shot by the camera reaches the maximum value and does not increase with the increase of the lighting time of the light source, and the light source adopts PWM (pulse-width modulation) dimming;
the adjusting module is used for increasing the period lighting time length in one light source period, and the sum of the period lighting time lengths of the light sources is less than or equal to the light source lighting time length in one exposure period of the camera; the method for increasing the period lighting time in one light source period comprises the following steps: the duty ratio is not changed and the light source period is enlarged, or the duty ratio is not changed and enlarged, or the light source period and the duty ratio are simultaneously enlarged.
7. The dimming system of claim 6, wherein the calculation module comprises:
the presetting unit is used for presetting a light source overexposure period so that the light source lights up the camera in one overexposure period to reach the overexposure critical point;
the relation curve establishing unit is used for gradually lighting the light source according to the brightness level to shoot, recording the gray value of the shot image and obtaining the relation curve of the gray value and the brightness level;
when the light source is turned onThe length calculating unit is used for determining the brightness level d corresponding to the maximum gray value according to the relation curve, and calculating the lighting time length t of the light source, and the formula is as follows: t = (D/D) max ) T, where T represents the overexposure period, D max Representing the brightness level at which the light source is lit for one of said overexposure periods.
8. The dimming system of claim 7, wherein the duty cycle is 0.1-D/D max
9. A dimming system for improving linearity of a light source of a camera, wherein the light source employs PWM dimming, comprising:
the relation establishing module is used for gradually lightening the light source according to the brightness level to shoot, recording the gray value of the shot image and obtaining a relation curve of the gray value and the brightness level;
the maximum duty ratio calculation module is used for determining the brightness level d corresponding to the maximum gray value according to the relation curve, and calculating to obtain the maximum duty ratio: D/D, wherein D represents the maximum value of the brightness level;
the coordinate curve module is used for adjusting the duty ratio of the light source within the range of 0-D/D, shooting to obtain an image, recording the gray value of the image and establishing a gray value-duty ratio coordinate curve;
the duty ratio adjusting range module is used for selecting a duty ratio corresponding to a straight line segment before the gray value reaches the maximum value from the coordinate curve as a dimming range;
and the calling module is used for re-dividing the brightness level in the dimming range, establishing a corresponding relation of the brightness level-the gray value-the duty ratio, and adjusting the duty ratio according to the brightness level and/or the gray value to perform dimming.
10. A computer storage medium, characterized in that a program is stored thereon, which program is executable by a processor for carrying out the steps of the method as claimed in any one of the claims 1-3, and/or which program is executable by a processor for carrying out the steps of the method as claimed in claim 4 or 5.
CN202211589333.3A 2022-12-12 2022-12-12 Light modulation method and system for improving linearity of camera light source and storage medium Active CN115657404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211589333.3A CN115657404B (en) 2022-12-12 2022-12-12 Light modulation method and system for improving linearity of camera light source and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211589333.3A CN115657404B (en) 2022-12-12 2022-12-12 Light modulation method and system for improving linearity of camera light source and storage medium

Publications (2)

Publication Number Publication Date
CN115657404A true CN115657404A (en) 2023-01-31
CN115657404B CN115657404B (en) 2023-04-07

Family

ID=85017304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211589333.3A Active CN115657404B (en) 2022-12-12 2022-12-12 Light modulation method and system for improving linearity of camera light source and storage medium

Country Status (1)

Country Link
CN (1) CN115657404B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309863A (en) * 2023-02-17 2023-06-23 合肥安迅精密技术有限公司 Calibration method and system for illumination parameters of image light source and storage medium
CN117459711A (en) * 2023-12-21 2024-01-26 苏州镁伽科技有限公司 Exposure time calibration method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257468A (en) * 2013-05-16 2013-08-21 中山大学 Liquid crystal displayer response time measurement method based on reference brightness
CN104700777A (en) * 2015-03-27 2015-06-10 西安电子科技大学 Image display method and image display brightness adjusting device
CN105390087A (en) * 2014-08-29 2016-03-09 莎益博网络系统株式会社 Device and method for inspecting gray value
CN114520880A (en) * 2020-11-18 2022-05-20 华为技术有限公司 Exposure parameter adjusting method and device
CN115066052A (en) * 2022-06-21 2022-09-16 中山市耀佳电子有限公司 Control method for rectangular wave signal change of single signal line

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257468A (en) * 2013-05-16 2013-08-21 中山大学 Liquid crystal displayer response time measurement method based on reference brightness
CN105390087A (en) * 2014-08-29 2016-03-09 莎益博网络系统株式会社 Device and method for inspecting gray value
CN104700777A (en) * 2015-03-27 2015-06-10 西安电子科技大学 Image display method and image display brightness adjusting device
CN114520880A (en) * 2020-11-18 2022-05-20 华为技术有限公司 Exposure parameter adjusting method and device
CN115066052A (en) * 2022-06-21 2022-09-16 中山市耀佳电子有限公司 Control method for rectangular wave signal change of single signal line

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309863A (en) * 2023-02-17 2023-06-23 合肥安迅精密技术有限公司 Calibration method and system for illumination parameters of image light source and storage medium
CN116309863B (en) * 2023-02-17 2024-02-02 合肥安迅精密技术有限公司 Calibration method and system for illumination parameters of image light source and storage medium
CN117459711A (en) * 2023-12-21 2024-01-26 苏州镁伽科技有限公司 Exposure time calibration method, device, equipment and storage medium
CN117459711B (en) * 2023-12-21 2024-03-19 苏州镁伽科技有限公司 Exposure time calibration method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115657404B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN115657404B (en) Light modulation method and system for improving linearity of camera light source and storage medium
JP4676834B2 (en) Work image acquisition method and work image acquisition device
US11037529B2 (en) Methods and storage media for dimming a display screen
CN106375645B (en) A kind of adaptive control system based on infrared eye
EP2734011B1 (en) LED illuminating method and apparatus for image measuring device
CN102081278A (en) Flash control method and device
CN109005365B (en) Method and device for controlling starting of light supplement lamp
CN115580782B (en) Light source brightness control method and system for linear array camera illumination and storage medium
CN102612194A (en) Dimming circuit, control method, micro controller and phase angle detection method for micro controller
CN113851074B (en) LED driving pulse modulation method and device
EP1428379B1 (en) Image sensing apparatus with light emitting device, image sensing method of image sensing apparatus, and storage medium storing image sensing apparatus control program
CN110996477B (en) Air conditioner lamp control method, computer device and computer readable storage medium
CN212543935U (en) 3D camera assembly and control circuit capable of adapting to ambient brightness
CN110502942A (en) Scanning means and its light filling lamp control method
EP3550938B1 (en) Light source actuating apparatus
CN109637437A (en) Image display control method, device, medium and display screen control system
CN115297590A (en) Color non-shift control method for dimming lamp and application thereof
TWI400675B (en) Method and apparatus for power level control of a display device
CN113301682A (en) LED brightness gradient control method and system
CN110384470B (en) Light adjusting method and device for endoscope light source, light source assembly and endoscope
CN113838429B (en) Backlight driving method and system
CN113597043B (en) Initial lighting grade method and system for fixed lamp, storage medium and lamp system
CN114666954A (en) Brightness compensation method and device of visual light source
CN115022621A (en) Event camera testing method, device and equipment and readable storage medium
CN114241980A (en) Drive chip, control method and display panel

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant