CN113518162B - Line exposure method, camera and computer readable storage medium - Google Patents

Line exposure method, camera and computer readable storage medium Download PDF

Info

Publication number
CN113518162B
CN113518162B CN202110372750.1A CN202110372750A CN113518162B CN 113518162 B CN113518162 B CN 113518162B CN 202110372750 A CN202110372750 A CN 202110372750A CN 113518162 B CN113518162 B CN 113518162B
Authority
CN
China
Prior art keywords
exposure
time
current
line
signal
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.)
Active
Application number
CN202110372750.1A
Other languages
Chinese (zh)
Other versions
CN113518162A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110372750.1A priority Critical patent/CN113518162B/en
Publication of CN113518162A publication Critical patent/CN113518162A/en
Application granted granted Critical
Publication of CN113518162B publication Critical patent/CN113518162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/54Mounting of pick-up tubes, electronic image sensors, deviation or focusing coils
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B7/00Control of exposure by setting shutters, diaphragms or filters, separately or conjointly
    • G03B7/08Control effected solely on the basis of the response, to the intensity of the light received by the camera, of a built-in light-sensitive device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Abstract

The application discloses a line exposure method, a camera and a computer readable storage medium, wherein the line exposure method firstly sends a current frame synchronization signal to an image sensor so that the image sensor acquires a current frame image by using line exposure; then, acquiring the current exposure central point time of a preset line in the current frame image by using the exposure parameter of line exposure and the current frame synchronous signal; then, obtaining an adjustment value by using the current exposure central point time and a plurality of peak times of alternating current for providing exposure energy for the image sensor; and finally, acquiring a next frame of synchronous signals by using the adjustment value, and sending the next frame of synchronous signals to the image sensor, so that when the image sensor acquires the next frame of image, the time of the next exposure central point of the preset line in the next frame of image is adjacent to the time of one peak in the next frame of image. The method and the device can place the preset line in the center of the interested area in the image, so that the exposure energy of the interested area is positioned at the peak of the alternating current, and the interested area is positioned at the bright place with alternate light and shade, thereby improving the recognition efficiency of the shot content.

Description

Line exposure method, camera and computer readable storage medium
Technical Field
The present application relates to the field of video surveillance technology, and in particular, to a line exposure method, a camera, and a computer-readable storage medium.
Background
With the development of video monitoring technology, monitoring cameras are arranged in most public areas, and when the cameras shoot in scenes with insufficient light, an external light source is needed to provide exposure energy, the external light source is usually powered by alternating current provided by mains supply, and the energy of the alternating current periodically changes in a sine wave form. However, when the exposure mode of the camera is line exposure, due to the periodic change of the exposure energy, the brightness of the captured image may generate periodic change along with the change of the number of lines, that is, a phenomenon of alternate light and shade appears on the image, and meanwhile, when a multi-frame image appears as a dynamic video, a band (Banding) appears on the video and flickers, thereby adversely affecting the identification of the captured content and reducing the monitoring effect.
Disclosure of Invention
The technical problem mainly solved by the application is to provide a line exposure method, a camera and a computer readable storage medium, which can improve the recognition efficiency of shot contents.
In order to solve the technical problem, the application adopts a technical scheme that: a method of enhancing line exposure, comprising:
sending a current frame synchronization signal to an image sensor so that the image sensor acquires a current frame image by using line exposure;
acquiring the current exposure central point time of a preset line in the current frame image by using the exposure parameter of the line exposure and the current frame synchronous signal;
acquiring an adjustment value by utilizing the current exposure central point time and a plurality of peak times of alternating current for providing exposure energy for the image sensor;
acquiring a next frame of synchronous signals by using the adjusting value, and sending the next frame of synchronous signals to the image sensor so that when the image sensor acquires a next frame of image, the time of a next exposure central point of a preset row in the next frame of image is adjacent to the time of one peak in the next frame of image; and the number of lines where the preset lines are located in the current frame image and the next frame image is the same.
Further, the step of obtaining the current exposure center point time of the preset line in the current frame image by using the exposure parameter of the line exposure and the current frame synchronization signal includes:
acquiring a first product of the blanking line number and the interval time and a second product of the preset line number minus 1 and the interval time;
acquiring the current signal starting time of the current frame synchronization signal, the first product and the sum of the second products;
and taking the difference obtained by subtracting half of the duration from the sum as the current exposure center point time.
Further, the step of obtaining an adjustment value using the current exposure center point time and a plurality of peak times of an alternating current for supplying exposure energy to the image sensor includes:
acquiring a peak time closest to the current exposure central point time as a nearest peak time;
and taking the difference value between the latest peak time and the current exposure central point time as the adjusting value.
Further, the step of acquiring the next frame synchronization signal by using the adjustment value includes:
making the total duration of the next frame of synchronization signals the same as the total duration of the current frame of synchronization signals, and taking the sum of the starting time of the current signal, the adjustment value and the integral multiple of the alternating current period as the starting time of the next signal of the next frame of synchronization signals; wherein an integral multiple of the period of the alternating current is greater than or equal to the total duration and is closest to the total duration.
Further, the step of using the sum of the current signal start time, the adjustment value, and the integer multiple of the period of the alternating current as the next signal start time of the next frame synchronization signal includes:
in response to the adjustment value being equal to zero, directly taking the sum of the current signal start time and an integer multiple of the alternating current period as the next signal start time;
in response to the adjustment value being greater than zero, taking a time point obtained by adjusting the sum of the current signal starting time and the integral multiple of the alternating current period backwards according to the adjustment value as the next signal starting time;
and in response to the adjustment value being smaller than zero, taking the time point obtained by forward adjustment of the sum of the current signal starting time and the integral multiple of the alternating current period according to the adjustment value as the next signal starting time.
Further, before the step of obtaining the current exposure center point time of the preset line in the current frame image by using the exposure parameter of the line exposure and the current frame synchronization signal, the method further includes:
setting a region of interest in the current frame image;
and setting the central row of the region of interest as the preset row.
Further, when the current frame image is the first frame image, the current signal start time and the total duration of the current frame synchronization signal are both preset.
Further, before the step of sending the current frame synchronization signal to the image sensor, the method further includes:
setting a first signal starting time of a first frame synchronization signal as an initial signal starting time, setting a total duration as a preset value, and setting the number of lines of a preset line in a first frame image;
acquiring the expected exposure central point time of the preset line by using the exposure parameters and the first frame synchronization signal;
acquiring a primary adjustment value by utilizing the predicted exposure central point time and the plurality of peak times;
and setting the starting time of the first signal as the starting time of the final signal by using the initial setting value, so that when the image sensor acquires the first frame image, the actual exposure central point time of a preset line in the first frame image is adjacent to one peak time of the preset line.
In order to solve the technical problem, the other technical scheme adopted by the application is as follows: provided is a camera including:
a processor and an image sensor and a memory respectively coupled to the processor;
the memory stores program instructions, and the processor can execute the program instructions and cooperate with the image sensor to implement the line exposure method according to the above technical solution.
In order to solve the technical problem, the other technical scheme adopted by the application is as follows: there is provided a computer readable storage medium having stored thereon program instructions executable by a processor to implement the line exposure method of the above-described technical solution.
The beneficial effect of this application is: the line exposure method provided by the application firstly sends a current frame synchronization signal to an image sensor so that the image sensor acquires a current frame image by using line exposure; then, acquiring the current exposure central point time of a preset line in the current frame image by using the exposure parameter of line exposure and the current frame synchronous signal; then, obtaining an adjustment value by using the current exposure central point time and a plurality of peak times of alternating current for providing exposure energy for the image sensor; and finally, acquiring a next frame of synchronous signals by using the adjustment value, and sending the next frame of synchronous signals to the image sensor, so that when the image sensor acquires the next frame of image, the time of the next exposure central point of the preset line in the next frame of image is adjacent to the time of one peak in the next frame of image. The number of lines of the preset lines in the current frame image is the same as that of the lines in the next frame image. Therefore, the center position of the interest area in the shot image can be set by the preset line, so that the exposure energy received by the interest area is near the wave crest of the alternating current, the interest area is in the bright place with alternate light and shade, the recognition efficiency of the shot content is improved, and the monitoring effect is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. Wherein:
fig. 1 is a schematic structural diagram of an embodiment of a camera according to the present application;
FIG. 2 is a schematic flow chart diagram illustrating an embodiment of a line exposure method according to the present application;
FIG. 3 is a schematic diagram of the line exposure of the present application;
FIG. 4 is a flowchart illustrating an embodiment of a step before step S12 in FIG. 2;
FIG. 5 is a flowchart illustrating an embodiment of step S13 in FIG. 2;
FIG. 6 is a flowchart illustrating an embodiment of step S14 in FIG. 2;
FIG. 7 is a flowchart illustrating an embodiment of a step before step S11 in FIG. 2;
FIG. 8 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of a camera according to the present application, where the camera includes a processor 110, and an image sensor 120 and a memory 130 respectively coupled to the processor 110. The memory 130 stores program instructions, and the processor 110 can execute the program instructions and cooperate with the image sensor 120 to capture multiple frames of images in a line exposure manner to form a monitoring video. A specific exposure method will be described below.
When the camera operates, the image sensor 120 acquires an image according to the frame synchronization signals XVS, each frame synchronization signal corresponds to one frame of image, when the frame synchronization signals are generated by the image sensor 120, the image sensor 120 operates in the master mode, and when the frame synchronization signals are generated by the processor 110 and transmitted to the image sensor 120, the image sensor 120 operates in the slave mode. In this application, image sensor 120 operates in a slave mode, receiving a frame synchronization signal from processor 110 for each frame of image.
The image sensor 120 needs exposure when acquiring an image, and when the camera works in a scene with insufficient light, an external light source is needed to provide exposure energy, the external light source is usually powered by alternating current provided by mains supply, the energy of the alternating current periodically changes according to a sine wave form, and the expression of a voltage signal U (t) is as follows formula (1):
Figure SMS_1
wherein, U m Is the effective value of the voltage, theta is the initial phase angle, f is the frequency of the alternating current energy, 100HZ in european standards, 120HZ in us standards, and 100HZ in chinese standards.
When t takes different values, it corresponds to different voltage transients. For simplicity of calculation, assuming θ =0, the expression of the instantaneous energy L (t) of the external light source is the following formula (2):
L(t)=U 2 (t)/R=2L*sin 2 (πft)=L*(1+cos(2πft));……(2)
wherein R is the resistance of the external light source, L = U 2 m and/R represents the peak value of the brightness of the external light source.
In the present application, the image sensor 120 acquires an image by line exposure, and for each line in the same frame of image, the exposure time t exp The exposure start positions are different, the start position interval time Δ t is the same, and the image data of each line is read out within the interval time Δ t corresponding to the line.
When exposing the ith line of a certain frame image, the exposure energy E (i) obtained by the ith line satisfies the following formula (3):
Figure SMS_2
wherein t1 and t2 are the starting point and the ending point of the ith row exposure, and t exp And = t2-t1, which is the duration of the exposure of the ith row.
Then, when exposing the (i + m) th line of the frame image, the starting point and the ending point are (t 1+ m Δ t) and (t 2+ m Δ t), respectively, and the exposure energy E (i + m) obtained for the (i + m) th line satisfies the following formula (4):
Figure SMS_3
it can be seen that if
Figure SMS_4
When k is a positive integer, E (i) = E (i + m) = L × t exp When t is exp When the exposure energy is integral multiple of (1/f), the exposure energy obtained by each line is the same, and the phenomenon of alternate bright and dark Banding can not occur. For example, if t is set when f =100HZ exp And k 10ms, the bundling phenomenon cannot occur. However, in practical applications, t is generally limited in order to clearly capture an object moving at a high speed (e.g., a license plate of a car) exp If the time is less than 10ms, for example, 4ms, bright and dark stripes may be generated on the captured image, which is not favorable for recognizing the captured content, for example, the license plate number cannot be clearly recognized.
When t is exp If the ratio is not an integral multiple of (1/f), i.e. there is a Banding phenomenon, if
Figure SMS_5
When is at time
Figure SMS_6
As can be seen from the above equations (3) and (4), E (i) = E (i + m) is also satisfied. That is, the exposure energy obtained for two rows m apart is the same, m being the distance between adjacent light stripes or adjacent dark stripes, and if m is large enough (i.e., Δ t is small enough), the effect of the Banding phenomenon will be small enough. However, due to hardware limitations of the image sensor 120, there is generally a minimum Δ t, that is, the Banding phenomenon still affects recognition of the shot content.
To solve the technical problem, the present application provides a line exposure method, and specifically please refer to fig. 2, fig. 2 is a flowchart illustrating an embodiment of the line exposure method, where an execution main body of the line exposure method is the processor 110, and the method specifically includes the following steps.
And step S11, sending a current frame synchronization signal to the image sensor so that the image sensor acquires a current frame image by using line exposure.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating the principle of line exposure according to the present application, when the image sensor 120 receives a current frame synchronization signal (current XVS) sent by the processor 110, the image sensor starts to acquire a current frame image, and a current signal start time t of the current frame synchronization signal xvs_down The moment when the acquisition starts.
And S12, acquiring the current exposure central point time of a preset line in the current frame image by using the exposure parameter of the line exposure and the current frame synchronous signal.
Wherein the exposure parameter comprises a duration t of each line of exposure exp Interval time delta t between adjacent line exposure starting points and interval time delta t from signal starting point of frame synchronization signal to first line exposureThe number of blanking lines FS before the light. The blank area between the left and right filled areas of each row in FIG. 3 is the duration t of the exposure exp =t n_2 -t n_1 The interval time Δ t is also the time required for reading each line of data, wherein the time t is from the starting point of the current signal xvs_down Until the start of outputting the valid data of the first line, there is a time FS Δ t corresponding to the blanking line FS in the middle. The left and right padding areas of each row in fig. 3 represent Δ t.
The camera is generally fixedly installed at a preset position, and multiple frames of images shot by the camera include the same scene, for example, the same intersection, that is, the content (for example, a license plate) which is most desired to be clearly recognized is located at the same position in each frame of image. Therefore, before the step S12, please refer to fig. 4, fig. 4 is a flowchart illustrating an embodiment of the step before the step S12 in fig. 2, and before the current exposure center point time is obtained, the following steps are further included.
Step S21, a region of interest is set in the current frame image.
After the current frame image is acquired, the region of interest, i.e. the region where the content that is most desired to be clearly identified is located, is located according to the current frame image.
And step S22, setting the central line of the region of interest as a preset line.
The central row of the region of interest is then set as a preset row. The preset lines are arranged in the content which is most expected to be clearly identified in the monitored image, for example, the preset lines are arranged in the area where the license plate of the automobile is located. Assuming that the number of lines of the preset line in the current frame image is n, the current exposure center point time t of the preset line in the current frame image can be obtained through the following steps n_mid
Step one, acquiring a first product FS x delta t of blanking line number FS and interval time delta t, and a second product (n-1) x delta t of interval time delta t after subtracting 1 from line number n of preset lines;
step two, obtaining the current signal starting point time t of the current frame synchronizing signal xvs_down A first product FS Δ t and a sum (t) of a second product (n-1) Δ t xvs_down +FS*Δt+ (n-1)*Δt);
Step three, adding the sum value (t) xvs_down + FS Δ t + (n-1) Δ t) minus duration t exp Half of the resulting difference (t) xvs_down +FS*Δt+(n-1)*Δt-t exp /2) as the current exposure center point time t n_mid
That is, the current exposure center point time t of the nth row in the current frame image n_mid Satisfies the following formula (5):
t n_mid =t xvs_down +FS*Δt+(n-1)*Δt-t exp /2;......(5)
it can be seen that, in any frame synchronization signal, the distance between the time of the signal starting point and the time of the exposure center point of the preset line is (FS × Δ t + (n-1) × Δ t-t) exp /2), i.e., the time lengths represented by L1 and L2 in fig. 3 are equal.
And S13, acquiring an adjustment value by using the current exposure center point time and a plurality of peak times of alternating current for providing exposure energy for the image sensor.
As mentioned above, the energy of the ac generally varies periodically in the form of a sine wave, and the peak times of the ac can be obtained by using a detection method known in the art, and then the current exposure center point time t can be used n_mid And the multiple peak time acquisition adjustment values t aj
Referring to fig. 5, fig. 5 is a flowchart illustrating an embodiment of step S13 in fig. 2, wherein the adjustment value t can be obtained through the following steps aj
Step S31, obtaining a peak time closest to the current exposure center point time as the latest peak time.
Firstly, selecting a peak time closest to the current exposure central point time from a plurality of peak times as a latest peak time t peak
In step S32, the difference between the latest peak time and the current exposure center time is used as an adjustment value.
Obtaining the latest peak time t peak Then, it is compared with the current exposure center point time t n_mid In betweenThe difference value is used as an adjustment value t aj . That is, the value t is adjusted aj Satisfies the following formula (6):
t aj =t peak -t xvs_down -(FS*Δt+(n-1)*Δt-t exp /2);......(6)
from the foregoing, t peak 、t xvs_down 、(FS*Δt+(n-1)*Δt-t exp /2) can be calculated, the adjustment value t is then calculated aj Can also be obtained by calculation, so as to be convenient for follow-up according to the adjustment value t aj The next frame synchronization signal is obtained.
And S14, acquiring a next frame of synchronous signals by using the adjustment value, and sending the next frame of synchronous signals to the image sensor so that the time of the next exposure central point of a preset row in the next frame of image is adjacent to the time of one peak in the next frame of image when the image sensor acquires the next frame of image.
Specifically, the adjustment value t is acquired aj Then, the total duration of the next frame synchronization signal (next XVS in fig. 3) is kept the same as the total duration of the current frame synchronization signal (current XVS in fig. 3), and the starting time t of the current frame synchronization signal is set xvs_down Adjusting the value t aj And the sum of integral multiples (k × T ') of the ac power period T' is used as the next signal start time T 'of the next frame synchronization signal' xvs_down . The integral multiple of the period T 'of the alternating current is greater than or equal to the total duration T and is closest to the total duration T, i.e., a suitable integer k is selected such that k × T' is greater than or equal to T and is closest to T. Therefore, the next signal start time t' xvs_down Satisfies the following formula (7):
t′ xvs_down =t xvs_down +t aj +k*T′;......(7)
that is, the adjustment value t is first adjusted aj Moving the current signal start time t xvs_down To make the current exposure center point time t in the current frame synchronous signal n_mid With the most recent peak time t peak And overlapping, and shifting the current frame synchronization signal backward by k × T' time to obtain the next frame synchronization signal. Due to the current signal starting time t xvs_down Time t from current exposure center point n_mid Time interval between and nextTime t 'of signal starting point' xvs_down And next exposure center point time t' n_mid The time intervals between them are the same, i.e. L1= L2= FS Δ t + (n-1) × Δ t-t exp /2, therefore, the next exposure center point time t 'in the next frame synchronization signal' n_mid Must coincide with another peak time, which is the most recent peak time t peak Followed by the k-th peak time.
Wherein, in order not to influence the collection of the current frame image, k T 'is required to be equal to T, and in order to improve the exposure efficiency, k T' is required to be closest to T. For example, T '=10ms, if 990ms < T ≦ 1000ms, k =100 is set, and if 1000ms < T ≦ 1010ms, k =101 is set, i.e., after the current frame sync signal, it is necessary to wait for (k × T' -T) time to reach the next signal start time T ″. xvs_down
The next frame synchronization signal thus formed is sent to the image sensor 120, so that when the image sensor 120 acquires the next frame image, the next exposure center point time t 'of the preset line in the next frame image' n_mid Adjacent to one of the peak times (theoretical calculation is to make the next exposure center point time t' n_mid Coincides with one of the peaks but the signal transmission process may be disturbed, so the next exposure centroid time t' n_mid In temporal proximity to one of the peaks).
In the embodiment, the preset line is set at the center position of the interest area in the shot image, and the next frame of synchronous signal is obtained according to the adjustment value, so that the time of the next exposure central point of the preset line in the next frame of image is adjacent to the time of one peak, and the exposure energy received by the center line of the interest area in the next frame of image is near to the peak position of the alternating current. That is to say, this application makes the region of interest be in alternate bright and dark department, can improve the recognition efficiency to the content of shooing, improves the monitoring effect.
In some embodiments, referring to fig. 6, fig. 6 is a flowchart illustrating an embodiment of step S14 in fig. 2, and the next frame synchronization signal can be obtained through the following steps.
And S41, responding to the adjustment value being equal to zero, and directly taking the sum of the current signal starting time and the integral multiple of the alternating current period as the next signal starting time.
If the value t is adjusted aj Equal to zero, indicating the current exposure center point time t of the preset line in the current frame image n_mid With the most recent peak time t peak The superposition, that is, the preset line can obtain the peak value of the exposure energy, so that the preset line is positioned at the center of the bright stripe, the region of interest is positioned at the bright place, the frame synchronization signal does not need to be adjusted, and the starting time t of the current signal is directly obtained xvs_down And the sum of the time and an integral multiple k × T ' of the period of the alternating current is used as the starting time T ' of the next signal ' xvs_down That is, the next frame of synchronization signal is generated according to the periodic rule of the alternating current, so that the preset line in the next frame of image can also obtain the peak value of the exposure energy.
And step S42, responding to the adjustment value being larger than zero, and taking the time point obtained by adjusting the sum of the current signal starting time and the integral multiple of the alternating current period backwards according to the adjustment value as the next signal starting time.
If the value t is adjusted aj If the value is larger than zero, the current exposure central point time t of the preset line in the current frame image is illustrated n_mid With the most recent peak time t peak Non-coincidence, most recent peak time t peak At the current exposure center point time t n_mid Then, the preset line does not obtain the peak value of the exposure energy, and in order to make the preset line located at the center of the bright stripe in the next frame of image, the starting time t of the current signal needs to be started first xvs_down According to the adjustment value t aj Adjusting backward to make the current exposure central point time t n_mid And the nearest peak time t peak Adjacent to the current signal, and adjusting the starting time t of the current signal xvs_down The time point obtained by backward shifting the integral multiple k of the alternating current period T 'is used as the next signal starting point time T' xvs_down . I.e. according to the adjustment value t aj And moving the current frame synchronous signal, and generating a next frame synchronous signal according to the periodic rule of the alternating current, so that the preset line in the next frame image can also obtain the peak value of the exposure energy.
And S43, responding to the adjustment value being smaller than zero, and taking the time point obtained by forward adjusting the sum of the current signal starting time and the integral multiple of the alternating current period according to the adjustment value as the next signal starting time.
If the value t is adjusted aj Less than zero, it indicates the current exposure center point time t of the preset line in the current frame image n_mid And the nearest peak time t peak Non-coincidence, most recent peak time t peak At the current exposure center point time t n_mid Previously, as shown in fig. 3, the preset line does not obtain the peak value of the exposure energy, and to make the preset line located at the center of the bright stripe in the next frame image, it is necessary to first determine the starting time t of the current signal xvs_down According to the adjustment value t aj Adjusting forward to make the current exposure central point time t n_mid With the most recent peak time t peak Adjacent to the current signal, and adjusting the starting time t of the current signal xvs_down The time point obtained by integral multiple k × T 'of the backward alternating current period is used as the next signal starting point time T' xvs_down . I.e. according to the adjustment value t aj And moving the current frame synchronous signal, and generating a next frame synchronous signal according to the periodic rule of the alternating current, so that the preset line in the next frame image can also obtain the peak value of the exposure energy.
As can be seen from FIG. 3, in the current XVS, t peak At t n_mid Before and at a distance of t aj At the time interval when the current XVS is shifted forward by t as a whole aj And then overall backward moving k x T 'to obtain the next XVS, wherein T' n_mid In temporal proximity to another peak.
In the next frame of synchronization signal generated in this embodiment, the time of the next exposure center point of the preset line is adjacent to the time of one of the wave peaks, so that the exposure energy received by the center line of the region of interest in the next frame of image is in the vicinity of the position of the wave peak of the alternating current. That is to say, this application makes the region of interest be in alternate bright and dark department, can improve the recognition efficiency to the content of shooing, improves the monitoring effect.
As can be seen from the foregoing description, the line exposure method provided in the present application is an iterative adjustment process, and continuously adjusts the next frame of synchronization signal according to the current frame of synchronization signal, so that the exposure center point time of the preset line approaches the peak time of the alternating current indefinitely. When the first frame image is collected, data of the previous frame image can not be used as an adjustment basis, so that the signal starting time and the total duration of the first frame synchronization signal are set to be preset, namely the signal starting time and the total duration of the first frame synchronization signal are set according to an empirical value, and then the first frame synchronization signal is adjusted by combining with the peak time to generate a second frame synchronization signal, and the second frame synchronization signal is iterated in sequence.
In other embodiments, the first frame synchronization signal may be generated in other manners, please refer to fig. 7, fig. 7 is a flowchart illustrating an embodiment of a step before step S11 in fig. 2, and before the iterative process starts, the first frame synchronization signal is generated through the following steps.
Step S51, setting a first signal start time of the first frame synchronization signal as an initial signal start time, setting a total duration as a preset value, and setting a number of lines in which preset lines are located in the first frame image.
Firstly, setting the starting time of the first signal of the first frame synchronization signal as the starting time t of the initial signal according to the empirical value 1_0 And setting the total time length T as a preset value, and setting the number n of rows where preset rows are located in the first frame image. At this time, the first frame synchronization signal is not transmitted to the image sensor 120, but rather, an assumed first frame synchronization signal is generated, and after initial adjustment, a real first frame synchronization signal is formed and then transmitted to the image sensor 120.
Step S52, the expected exposure central point time of the preset line is obtained by using the exposure parameter and the first frame synchronization signal.
Specifically, as can be seen from the above equation (5), the exposure center point time t is predicted 1_mid0 Satisfies the following formula (8):
t 1_mid0 =t 1_0 +FS*Δt+(n-1)*Δt-t exp /2......(8)
and S53, acquiring initial setting values by using the predicted exposure central point time and the plurality of peak times.
In particular, according toAs can be seen from the above equation (6), the initial value t 1_aj The following formula (9) is satisfied:
t 1_aj =t 1_peak -t 1_0 -(FS*Δt+(n-1)*Δt-t exp /2);......(9)
wherein, t 1_peak Is a time t equal to the predicted exposure center point 1_mid0 The closest peak time.
Step S54, setting the first signal starting point time as the final signal starting point time by using the initial value, so that when the image sensor collects the first frame image, the actual exposure central point time of the preset line in the first frame image is adjacent to one peak time.
Then according to the initial value t 1_aj Setting the starting time of the first signal as the starting time t of the final signal 1_1 Specifically, the final signal start time t is obtained according to the following formula (10) 1_1
t 1_1 =t 1_0 +t 1_aj ;......(10)
And then generating a first frame synchronization signal by combining the total time length T. That is, the first frame synchronization signal assumed in advance is adjusted to be the true first frame synchronization signal, and is transmitted to the image sensor 120. When the image sensor 120 acquires the first frame image, the time of the actual exposure center point of the preset line in the first frame image is adjacent to the time of one peak, and the region of interest of the preset line is located at the bright position of the light and shade stripe, so that the identification efficiency of the region of interest of the first frame image is improved.
Based on the same inventive concept, the present application further provides a computer-readable storage medium, please refer to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application, the storage medium 800 stores program instructions 810, and the program instructions 810 can be executed by a processor to implement the line exposure method according to any of the above embodiments. For details, reference may be made to the above embodiments, which are not described herein again.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (9)

1. A line exposure method, comprising:
sending a current frame synchronization signal to an image sensor so that the image sensor acquires a current frame image by using line exposure;
acquiring the current exposure central point time of a preset line in the current frame image by using the exposure parameter of the line exposure and the current frame synchronous signal;
acquiring an adjustment value by utilizing the current exposure central point time and a plurality of peak times of alternating current for providing exposure energy for the image sensor;
acquiring a next frame of synchronous signals by using the adjusting value, and sending the next frame of synchronous signals to the image sensor so that when the image sensor acquires a next frame of image, the time of a next exposure central point of a preset row in the next frame of image is adjacent to the time of one peak in the next frame of image; the number of lines of the preset lines in the current frame image is the same as that of the lines of the preset lines in the next frame image;
wherein, the exposure parameters include duration of each line exposure, interval time between adjacent line exposure start points, and blanking line number from signal start point of frame synchronizing signal to before first line exposure, and the step of obtaining current exposure center point time of preset line in the current frame image by using the exposure parameters of line exposure and the current frame synchronizing signal includes:
acquiring a first product of the blanking line number and the interval time, and a second product of the line number of the preset line and the interval time;
acquiring the current signal starting time of the current frame synchronizing signal, the first product and the sum of the second products;
and taking the difference obtained by subtracting half of the duration from the sum as the current exposure center point time.
2. The line exposure method according to claim 1, wherein the step of obtaining the adjustment value using the current exposure center point time and a plurality of peak times of an alternating current that supplies the exposure energy to the image sensor comprises:
acquiring a peak time closest to the current exposure central point time as a latest peak time;
and taking the difference value between the latest peak time and the current exposure central point time as the adjusting value.
3. The line exposure method according to claim 2, wherein the step of acquiring the next frame synchronization signal using the adjustment value comprises:
making the total duration of the next frame of synchronization signals the same as the total duration of the current frame of synchronization signals, and taking the sum of the starting time of the current signal, the adjustment value and the integral multiple of the alternating current period as the starting time of the next signal of the next frame of synchronization signals; wherein an integer multiple of the period of the alternating current is greater than or equal to the total duration and is closest to the total duration.
4. The line exposure method according to claim 3, wherein the step of taking the sum of the current signal start time, the adjustment value, and an integer multiple of the period of the alternating current as the next signal start time of the next frame synchronization signal comprises:
in response to the adjustment value being equal to zero, directly taking the sum of the current signal start time and an integer multiple of the alternating current period as the next signal start time;
in response to the adjustment value being greater than zero, taking a time point obtained by adjusting the sum of the current signal starting time and the integral multiple of the alternating current period backwards according to the adjustment value as the next signal starting time;
and in response to the adjustment value being smaller than zero, taking the time point obtained by forward adjustment of the sum of the current signal starting time and the integral multiple of the alternating current period according to the adjustment value as the next signal starting time.
5. The line exposure method according to claim 1, wherein before the step of obtaining the current exposure center point time of the preset line in the current frame image by using the exposure parameter of the line exposure and the current frame synchronization signal, the method further comprises:
setting a region of interest in the current frame image;
and setting the central line of the interested area as the preset line.
6. The line exposure method according to claim 5, wherein when the current frame image is a first frame image, the current signal start time and the total duration of the current frame synchronization signal are both preset.
7. The line exposure method of claim 1, wherein the step of sending the current frame synchronization signal to the image sensor is preceded by:
setting a first signal starting time of a first frame synchronization signal as an initial signal starting time, setting a total duration as a preset value, and setting the number of lines of a preset line in a first frame image;
acquiring the expected exposure central point time of the preset line by using the exposure parameters and the first frame synchronization signal;
acquiring a primary adjustment value by utilizing the predicted exposure central point time and the plurality of peak times;
and setting the starting time of the first signal as the starting time of the final signal by using the initial setting value, so that when the image sensor collects the first frame image, the actual exposure central point time of a preset line in the first frame image is adjacent to one peak time.
8. A camera, comprising:
a processor and an image sensor and a memory respectively coupled to the processor;
wherein the memory stores program instructions that the processor is capable of executing and implementing the line exposure method of any of claims 1-7 in cooperation with the image sensor.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores program instructions executable by a processor to implement the line exposure method of any one of claims 1-7.
CN202110372750.1A 2021-04-07 2021-04-07 Line exposure method, camera and computer readable storage medium Active CN113518162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110372750.1A CN113518162B (en) 2021-04-07 2021-04-07 Line exposure method, camera and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110372750.1A CN113518162B (en) 2021-04-07 2021-04-07 Line exposure method, camera and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113518162A CN113518162A (en) 2021-10-19
CN113518162B true CN113518162B (en) 2023-04-07

Family

ID=78061345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110372750.1A Active CN113518162B (en) 2021-04-07 2021-04-07 Line exposure method, camera and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113518162B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114025055A (en) * 2021-11-29 2022-02-08 上海商汤临港智能科技有限公司 Data processing method, device, system, equipment and storage medium
CN114158156B (en) * 2022-02-10 2022-05-03 深圳佑驾创新科技有限公司 PWM (pulse-width modulation) adjusting method, device, equipment and storage medium of light supplementing lamp

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5254438A (en) * 1990-11-29 1993-10-19 Hewlett-Packard Company Single pass compensation for electron beam proximity effect
JP2009077057A (en) * 2007-09-19 2009-04-09 Olympus Imaging Corp Imaging apparatus, and control method for imaging apparatus
JP6296697B2 (en) * 2013-05-10 2018-03-20 キヤノン株式会社 Imaging apparatus, control method, program, and storage medium
US9648249B2 (en) * 2013-11-20 2017-05-09 Canon Kabushiki Kaisha Image capturing apparatus, method of controlling the same, and storage medium
JP6768372B2 (en) * 2016-06-27 2020-10-14 キヤノン株式会社 Imaging device, its control method, and program
JP6746398B2 (en) * 2016-06-27 2020-08-26 キヤノン株式会社 Imaging device, control method thereof, and program
US10609265B2 (en) * 2017-01-26 2020-03-31 Qualcomm Incorporated Methods and apparatus for synchronizing camera flash and sensor blanking
US20180309919A1 (en) * 2017-04-19 2018-10-25 Qualcomm Incorporated Methods and apparatus for controlling exposure and synchronization of image sensors
JP6924089B2 (en) * 2017-07-13 2021-08-25 キヤノン株式会社 Imaging device and its control method
US11064132B2 (en) * 2019-04-29 2021-07-13 Samsung Electronics Co., Ltd. Image capture with anti-flicker synchronization
CN111818272B (en) * 2020-06-30 2021-09-03 浙江大华技术股份有限公司 Method for eliminating image flicker, electronic device and storage medium
CN112437206B (en) * 2020-11-25 2022-07-29 杭州海康威视数字技术股份有限公司 Light supplement control method and camera

Also Published As

Publication number Publication date
CN113518162A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
CN113518162B (en) Line exposure method, camera and computer readable storage medium
JP5866200B2 (en) Flicker detection circuit for image sensor using rolling shutter
US11425358B2 (en) Method and system for unsynchronized structured lighting
CN109903324B (en) Depth image acquisition method and device
JP2009164774A (en) Image processing apparatus, image processing method, program, and storage medium
CN105049736A (en) Multi-exposure imaging system and method for eliminating rolling shutter flicker
US10607088B2 (en) Image processing device, image processing method, and image processing system
CN106683130A (en) Depth image acquisition method and device
CN110445952A (en) Film flicker processing method, device, equipment and the storage medium of camera
JP6784130B2 (en) Flicker detection device and method
US20210250488A1 (en) Reducing a Flicker Effect of Multiple Light Sources in an Image
WO2019005051A1 (en) Camera communications system using high speed camera sensors
CN112153301A (en) Shooting method and electronic equipment
CN110971835A (en) Monitoring method and device based on double-phase exposure
CN103750850A (en) Automatic synchronizing method and device of optical signal detector
WO2018214838A1 (en) Surveillance image capture method, apparatus, and system
CN106303257B (en) Synchronous control method and device and image acquisition system
CN104184977A (en) Projection method and electronic equipment
EP4072124A1 (en) Image capturing method and device, apparatus, and storage medium
CN112287805A (en) Moving object detection method and device, readable storage medium and electronic equipment
JP5383886B2 (en) Image processing apparatus, image processing method, program, and storage medium
CN103957361A (en) Exposure method and apparatus for monitoring camera
CN115277982A (en) Synchronous exposure processing method, device and storage medium
CN104038668A (en) Method and system for displaying panoramic video
CN116887022A (en) Image generation method and device based on pulse camera, electronic equipment and medium

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