A method for compensating power consumption between frames of vehicle-mounted analog cameras
By adjusting the duty cycle of the PWM signal and the timer control to take effect, the inter-frame power consumption compensation of the vehicle analog camera is realized, which solves the flickering problem caused by power consumption fluctuations in low-illumination environments and improves video quality.
Patent Information
- Application Number
- CN202210693155.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-06-17
AI Technical Summary
Vehicle-mounted analog cameras have a flickering problem caused by fluctuations in power consumption of photosensitive elements in low-light environments. Existing solutions increase hardware costs.
By adjusting the duty cycle of the PWM signal of the pulse width modulator and the timer to determine the effective timing, the working power compensation of the vehicle-mounted analog camera when transmitting the previous frame image is achieved, ensuring stable power consumption and reducing power consumption steps between frames.
Without increasing hardware costs, it improves the quality of video output from vehicle-mounted analog cameras, reduces fluctuations in power consumption between frames, and solves the problem of screen flickering.
Smart Images

Figure CN115086568B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an inter-frame power consumption compensation method of a vehicle-mounted analog camera. Background Art
[0002] The camera's photosensitivity in low-light environments is an important indicator for measuring the performance of an on-board analog camera. In night scenes, the frame rate of the data stream flowing out of the photosensitive element is reduced by a frame reduction strategy to increase the exposure time of the photosensitive element, thereby improving the camera's photosensitivity in low-light environments. Among them, on-board analog cameras usually need to be powered by three-core or four-core wires, and this power supply method has a common ground for the input power supply and the output signal, that is, when the hardware generates an analog video signal, it must refer to the current ground wire, where the current ground wire and the common ground of the input power supply and the output signal are not the same ground. This causes the photosensitive element to cause power consumption fluctuations before and after the frame reduction strategy is turned on. Such fluctuations will affect the analog video signal output of the on-board analog camera, which will appear as a flickering screen on the on-board camera video.
[0003] To address the above issues, an external constant current hardware module is usually added for optimization to solve the screen flickering problem of the vehicle-mounted analog camera. However, this will increase the hardware cost. Summary of the invention
[0004] The purpose of the present invention is to provide a method for compensating the power consumption between frames of a vehicle-mounted analog camera, so as to solve the problem of screen flickering of the vehicle-mounted analog camera without increasing the hardware cost.
[0005] In order to solve the above problem, the present invention provides a method for compensating power consumption between frames of a vehicle-mounted analog camera, comprising the following steps:
[0006] Step S1: compensating the working power of the vehicle-mounted analog camera when transmitting the front frame image by adjusting the duty cycle of the PWM signal of the pulse width modulator, wherein the vehicle-mounted analog camera transmits multiple pairs of front frame images and rear frame images, the data of the rear frame images are copied to the data of the front frame images of the same pair, and in each pair, the working power of the vehicle-mounted analog camera when transmitting the front frame image is less than the working power of the vehicle-mounted analog camera when transmitting the rear frame image; and
[0007] Step S2: determining the effective time of the PWM signal by a timer to determine the working power compensation time when the vehicle-mounted analog camera transmits the previous frame image.
[0008] Optionally, in step S1, in each pair, the operating current of the vehicle-mounted analog camera when transmitting the front frame image is smaller than the operating current of the vehicle-mounted analog camera when transmitting the rear frame image.
[0009] Optionally, the pulse width modulator includes a first resistor, a second resistor, a third resistor, a capacitor and a switching transistor, one end of the first resistor is connected to a power supply, the other end of the first resistor is connected to the source of the switching transistor, the gate of the switching transistor is connected to one end of the second resistor and also connected to one end of the capacitor, the other end of the second resistor inputs a PWM signal, the drain of the switching transistor is connected to one end of the third resistor, and the other end of the third resistor and the other end of the capacitor are both grounded.
[0010] Furthermore, the power supply voltage is 3.3V, the resistance value of the first resistor is 51Ω, the resistance value of the second resistor is 1000Ω, the resistance value of the third resistor is 0, and the value of the capacitor is 1000F.
[0011] Furthermore, the PWM signal is periodically assigned a high level and a low level, and when the vehicle-mounted analog camera transmits the previous frame image, the PWM signal is at a high level, and the switching transistor is turned on. At this time, a current is generated between the power supply and the ground, and the current flows from the first resistor through the switching transistor and the third resistor.
[0012] Optionally, there is a frame interruption between the adjacent previous frame images and the next frame images, and a timer is designed within the frame interruption to determine the working power compensation time.
[0013] Optionally, the working power compensation time includes the on time, off time and duty cycle of the PWM signal.
[0014] Furthermore, when the PWM signal is turned on, the duty cycle of the PWM signal takes a preset value, and when the PWM signal is turned off, the duty cycle of the PWM signal is 0.
[0015] Optionally, step S2 includes:
[0016] Using an oscilloscope to collect and obtain a current timing diagram of the working current of the vehicle-mounted analog camera, so as to obtain the time points of the working power step when the vehicle-mounted analog camera transmits the previous frame image and the next frame image; and
[0017] The timer confirms the working power compensation time when the vehicle-mounted analog camera transmits the previous frame image according to the time point of the working power step, and the PWM signal controls the power consumption of the vehicle-mounted analog camera according to the working power compensation time.
[0018] Furthermore, the time point of the working power step includes the time point when the working current starts to transmit the previous frame image by the vehicle-mounted camera, and the time point when the working current steps from when the vehicle-mounted camera transmits the previous frame image to when the vehicle-mounted camera transmits the next frame image.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] The present invention provides a method for compensating the inter-frame power consumption of a vehicle-mounted analog camera, comprising the following steps: compensating the working power of the vehicle-mounted analog camera when transmitting a front frame image by adjusting the duty cycle of a PWM signal of a pulse width modulator, wherein the vehicle-mounted analog camera transmits multiple pairs of front frame images and rear frame images, the data of the rear frame images are copied to the data of the front frame images of the same pair, and in each pair, the working power of the vehicle-mounted analog camera when transmitting the front frame image is less than the working power of the vehicle-mounted analog camera when transmitting the rear frame image, thereby realizing compensation of the working power of the vehicle-mounted analog camera when transmitting the front frame image; and determining the effective timing of the PWM signal by a timer to determine the working power compensation time when the vehicle-mounted analog camera transmits the front frame image, thereby realizing accurate confirmation of the compensation timing of the working power consumption when the vehicle-mounted analog camera transmits the front frame image, thereby realizing low-cost compensation of the inter-frame power consumption steps of the vehicle-mounted analog camera and improving the quality of the video output by the vehicle-mounted analog camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic flow chart of an inter-frame power consumption compensation method for a vehicle-mounted analog camera according to an embodiment of the present invention;
[0022] Figure 2 A current timing diagram of the working current of a vehicle-mounted analog camera according to an embodiment of the present invention;
[0023] Figure 3 A circuit diagram of a pulse width modulator according to an embodiment of the present invention;
[0024] Figure 4 This is a current timing diagram of the working current after compensation when the vehicle-mounted camera transmits the previous frame image according to an embodiment of the present invention.
[0025] Description of reference numerals:
[0026] a-operating current of the vehicle-mounted analog camera when transmitting the rear frame image; b-operating current of the vehicle-mounted analog camera when transmitting the front frame image; m-frame interrupt; 1-PWM signal. DETAILED DESCRIPTION
[0027] The following is a further detailed description of a method for compensating power consumption between frames of a vehicle-mounted analog camera of the present invention. The present invention will be described in more detail below with reference to the accompanying drawings, in which preferred embodiments of the present invention are shown. It should be understood that those skilled in the art can modify the present invention described herein and still achieve the beneficial effects of the present invention. Therefore, the following description should be understood as being widely known to those skilled in the art and not as a limitation of the present invention.
[0028] For the sake of clarity, not all features of the actual embodiments are described. In the following description, well-known functions and structures are not described in detail because they would clutter the invention with unnecessary detail. It should be recognized that in the development of any actual embodiment, a large number of implementation details must be made to achieve the developer's specific goals, such as changing from one embodiment to another according to the limitations of the relevant system or the relevant business. In addition, it should be recognized that such development work may be complex and time-consuming, but it is just a routine task for those skilled in the art.
[0029] In order to make the purpose and features of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are further described below in conjunction with the accompanying drawings. It should be noted that the accompanying drawings are all in a very simplified form and use inaccurate ratios, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0030] Under low-light conditions, the vehicle-mounted analog camera increases the exposure time of the photosensitive element by adopting a frame-down strategy to reduce the frame rate of the data stream outflowing from the photosensitive element. At this time, the frame rate of the output data stream of the photosensitive element is reduced, for example, the frame rate of the output data stream is reduced from 30 to 15; at the same time, the cache module in the vehicle-mounted analog camera caches and copies each frame of image data into two frames of image data for use. In this way, the data of the front frame image and the rear frame image transmitted by the entire vehicle-mounted analog camera will have a low working power when transmitting one frame of image, and a high working power when transmitting another frame of image. Specifically, when transmitting a low-power frame of image data, the working current of the vehicle-mounted analog camera is low; when transmitting a high-power frame of image data, the working current of the vehicle-mounted analog camera is high, and the current difference between the two frames of image data is obvious. This causes the vehicle-mounted analog camera to generate a working power step between frames of the video transmitted, causing the image transmitted by the vehicle-mounted analog camera to have a flashing screen phenomenon.
[0031] Figure 1 FIG. 1 is a flow chart of a method for compensating power consumption between frames of a vehicle-mounted analog camera according to the present embodiment. Figure 1 As shown, in order to achieve compensation for the working power step when the entire vehicle-mounted analog camera transmits the previous and next two frames of images, this embodiment provides an inter-frame power consumption compensation method for a vehicle-mounted analog camera, which adopts a control strategy based on adjusting a pulse width modulator (PWM) and a timer to achieve accurate compensation for the inter-frame power consumption of the entire vehicle-mounted analog camera output video, thereby ensuring the power consumption stability of the entire vehicle-mounted analog camera during the use period, and preventing the inter-frame power consumption step phenomenon of the vehicle-mounted analog camera.
[0032] The inter-frame power consumption compensation method of the vehicle-mounted analog camera comprises the following steps:
[0033] Step S1: compensating the working power of the vehicle-mounted analog camera when transmitting the front frame image by adjusting the duty cycle of the PWM signal of the pulse width modulator, wherein the vehicle-mounted analog camera transmits multiple pairs of front frame images and rear frame images, the data of the rear frame images are copied to the data of the front frame images of the same pair, and in each pair, the working power of the vehicle-mounted analog camera when transmitting the front frame image is less than the working power of the vehicle-mounted analog camera when transmitting the rear frame image; and
[0034] Step S2: determining the effective time of the PWM signal by a timer to determine the working power compensation time when the vehicle-mounted analog camera transmits the previous frame image.
[0035] The following combination Figure 1-4 The inter-frame power consumption compensation method of the vehicle-mounted analog camera of this embodiment is described in detail.
[0036] First, step S1 is executed to compensate for the working power of the vehicle-mounted analog camera when transmitting the front frame image by adjusting the duty cycle of the PWM signal of the pulse width modulator (i.e., PWM), wherein the vehicle-mounted analog camera transmits multiple pairs of front frame images and rear frame images, the data of the rear frame images are copied to the data of the front frame images of the same pair, and in each pair, the working power of the vehicle-mounted analog camera when transmitting the front frame image is less than the working power of the vehicle-mounted analog camera when transmitting the rear frame image.
[0037] In this step, since in each pair, the working power of the vehicle-mounted analog camera when transmitting the front frame image is less than the working power of the vehicle-mounted analog camera when transmitting the rear frame image, in each pair, the working current b of the vehicle-mounted analog camera when transmitting the front frame image is less than the working current of the vehicle-mounted analog camera when transmitting the rear frame image. Therefore, by compensating the working current of the vehicle-mounted analog camera when transmitting the front frame image, the difference between the working current b when the vehicle-mounted analog camera transmits the front frame image and the working current a when the vehicle-mounted analog camera transmits the rear frame image becomes smaller, and the working power compensation of the vehicle-mounted analog camera transmitting the front frame image can be realized, thereby realizing the inter-frame power consumption compensation of the vehicle-mounted analog camera, and solving the problem of screen flashing of the vehicle-mounted analog camera without increasing the hardware cost.
[0038] Figure 3 FIG. 4 is a circuit diagram of the pulse width modulator of this embodiment. Figure 3As shown, the pulse width modulator includes a first resistor R1, a second resistor R2, a third resistor R3, a capacitor C, and a switching transistor Q. One end of the first resistor R1 is connected to a power supply VDD, the other end of the first resistor R1 is connected to the source of the switching transistor Q, the gate of the switching transistor Q is connected to one end of the second resistor R2, and is also connected to one end of the capacitor C. The other end of the second resistor R2 inputs a PWM signal, the drain of the switching transistor Q is connected to one end of the third resistor R3, and the other end of the third resistor R3 and the other end of the capacitor C are both grounded GND.
[0039] In this embodiment, the power supply VDD voltage is, for example, 3.3V, the resistance value of the first resistor R1 may be 51Ω, the resistance value of the second resistor R2 may be 1000Ω, the resistance value of the third resistor R3 is 0, and the value of the capacitor C is 1000F. In other embodiments, the values of the power supply VDD, the first resistor R1, the second resistor R2, the third resistor R3 and the capacitor C may be changed according to actual needs, for example, only the resistance value of the third resistor R3 may be changed.
[0040] The PWM signal is periodically assigned with high and low levels, and when the vehicle-mounted analog camera transmits the front frame image, the PWM signal is high, and the switch transistor Q is turned on. At this time, a current is generated between the power supply VDD and the ground GND, and the current flows from the first resistor R1 through the switch transistor Q and the third resistor R3, that is, a current is generated in the PWM, so that the power of the load first resistor R1 is used as an additional load generated by the pulse width modulator, and this current increases the working current of the vehicle-mounted analog camera; when the vehicle-mounted analog camera transmits the rear frame image, the switch transistor Q is turned off. At this time, no current is generated between the power supply VDD and the ground GND, and the pulse width modulator does not generate an additional load. In other words, by adjusting the duty cycle of the PWM signal, an additional load can be generated in conjunction with the first resistor R1 to compensate for the working power of the vehicle-mounted analog camera when transmitting the front frame image, so that the working power of the vehicle-mounted analog camera when transmitting the front frame image is as close as possible to the working power of the vehicle-mounted analog camera when transmitting the rear frame image, thereby realizing the compensation of the working power consumption of the vehicle-mounted analog camera when transmitting the front frame image.
[0041] In order to accurately compensate the working power of the vehicle-mounted analog camera for transmitting the previous frame image, step S2 is then performed to determine the effective timing of the PWM signal 1 through a timer to determine the working power compensation time when the vehicle-mounted analog camera transmits the previous frame image. The working power compensation time includes the on time, off time and duty cycle of the PWM signal 1.
[0042] Since there is a frame interrupt m between every two frames of image data transmitted by the vehicle-mounted analog camera (i.e., between the adjacent previous frame image and the next frame image), a timer is designed in the frame interrupt m to determine the on time, off time and duty cycle of PWM signal 1, so as to achieve precise control of the effective timing of PWM signal 1. In this step, when the PWM signal 1 is on, the duty cycle of PWM signal 1 is a preset value, and when the PWM signal 1 is off, the duty cycle of PWM signal 1 is 0.
[0043] This step specifically includes:
[0044] Figure 2 : is a current timing diagram of the vehicle-mounted analog camera working current of the vehicle-mounted camera of this embodiment. Figure 2 As shown, first, in order to accurately control the timing of the effectiveness of the PWM signal, an oscilloscope is needed to collect and obtain the current timing diagram of the working current of the vehicle-mounted analog camera, based on which the time points of the working power steps when the vehicle-mounted analog camera transmits the front frame image and the rear frame image can be determined.
[0045] Figure 4 This is a current timing diagram of the working current after compensation when the vehicle-mounted camera of this embodiment transmits the previous frame image. Figure 4 As shown, then, the timer confirms the working power compensation time when the vehicle-mounted analog camera transmits the front frame image according to the time point of the working power step (i.e., the time point when the working current starts to transmit the front frame image by the vehicle-mounted camera, and the time point when the working current steps from the vehicle-mounted camera when transmitting the front frame image to the working current when the vehicle-mounted camera transmits the rear frame image), and the PWM signal controls the power consumption of the vehicle-mounted analog camera according to the working power compensation time, that is, accurately realizes the inter-frame power consumption compensation of the vehicle-mounted analog camera.
[0046] After repeated tests, the inter-frame power consumption compensation method of the vehicle-mounted analog camera provided in this embodiment has a very small step in actual measurement between the power consumption when the vehicle-mounted analog camera transmits the front frame image and obtains working power consumption compensation and the power consumption when the vehicle-mounted analog camera transmits the rear frame image without power for working power compensation, thereby achieving accurate compensation of the inter-frame power consumption of the vehicle-mounted analog camera in the frame reduction application scenario, thereby solving the problem of screen flickering of the vehicle-mounted analog camera.
[0047] The specific steps of the inter-frame power consumption compensation method of the vehicle-mounted analog camera may include first executing step S2 and then executing step S1.
[0048] In summary, the present invention provides a method for compensating for power consumption between frames of a vehicle-mounted analog camera, which compensates for the working power of the vehicle-mounted analog camera when transmitting a previous frame image by adjusting the duty cycle of a PWM signal of a pulse width modulator, wherein the vehicle-mounted analog camera transmits multiple pairs of previous frame images and subsequent frame images, the data of the subsequent frame images are copied to the data of the previous frame images of the same pair, and in each pair, the working power of the vehicle-mounted analog camera when transmitting the previous frame image is less than the working power of the vehicle-mounted analog camera when transmitting the subsequent frame image, thereby realizing compensation for the working power of the vehicle-mounted analog camera when transmitting the previous frame image; and determining the effective timing of the PWM signal by a timer to determine the working power compensation time when the vehicle-mounted analog camera transmits the previous frame image, thereby realizing accurate confirmation of the compensation timing of the working power consumption when the vehicle-mounted analog camera transmits the previous frame image, thereby realizing low-cost compensation for the power consumption steps between frames of the vehicle-mounted analog camera and improving the quality of the video output by the vehicle-mounted analog camera.
[0049] In addition, it should be noted that, unless otherwise specified or indicated, the terms "first" and "second" in the specification are only used to distinguish the various components, elements, steps, etc. in the specification, and are not used to indicate the logical relationship or sequential relationship between the various components, elements, steps, etc.
[0050] It is to be understood that, although the present invention has been disclosed as a preferred embodiment, the above embodiment is not intended to limit the present invention. For any person skilled in the art, without departing from the scope of the technical solution of the present invention, the technical content disclosed above can be used to make many possible changes and modifications to the technical solution of the present invention, or modified into equivalent embodiments of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of protection of the technical solution of the present invention.
Claims
1. A method for compensating power consumption between frames of a vehicle-mounted analog camera. It is characterized in that The following steps are involved: Step S1: compensating the working power of the vehicle-mounted analog camera when transmitting the front frame image by adjusting the duty cycle of the PWM signal of the pulse width modulator, wherein the vehicle-mounted analog camera transmits multiple pairs of front frame images and rear frame images, the data of the rear frame images are copied to the data of the front frame images of the same pair, and in each pair, the working power of the vehicle-mounted analog camera when transmitting the front frame image is less than the working power of the vehicle-mounted analog camera when transmitting the rear frame image; and Step S2: using an oscilloscope to collect and obtain a current timing diagram of the working current of the vehicle-mounted analog camera, so as to obtain the time points of the working power step when the vehicle-mounted analog camera transmits the front frame image and the rear frame image; The timer confirms the working power compensation time when the vehicle-mounted analog camera transmits the previous frame image according to the time point of the working power step, and the PWM signal controls the power consumption of the vehicle-mounted analog camera according to the working power compensation time; Among them, the time point of the working power step includes the time point when the working current of the vehicle-mounted analog camera starts to transmit the previous frame image, and the time point when the working current steps from when the vehicle-mounted analog camera transmits the previous frame image to when the vehicle-mounted analog camera transmits the next frame image.
2. The inter-frame power consumption compensation method of the vehicle-mounted analog camera according to claim 1, It is characterized in that In step S1 , in each pair, the operating current of the vehicle-mounted analog camera when transmitting the front frame image is smaller than the operating current of the vehicle-mounted analog camera when transmitting the rear frame image.
3. The inter-frame power consumption compensation method of the vehicle-mounted analog camera according to claim 1, It is characterized in that The pulse width modulator includes a first resistor, a second resistor, a third resistor, a capacitor and a switching transistor, one end of the first resistor is connected to a power supply, the other end of the first resistor is connected to the source of the switching transistor, the gate of the switching transistor is connected to one end of the second resistor and also connected to one end of the capacitor, the other end of the second resistor inputs a PWM signal, the drain of the switching transistor is connected to one end of the third resistor, and the other end of the third resistor and the other end of the capacitor are both grounded.
4. The inter-frame power consumption compensation method of the vehicle-mounted analog camera as claimed in claim 3, It is characterized in that The power supply voltage is 3.3V, the resistance value of the first resistor is 51Ω, the resistance value of the second resistor is 1000Ω, the resistance value of the third resistor is 0, and the value of the capacitor is 1000F.
5. The inter-frame power consumption compensation method of the vehicle-mounted analog camera as claimed in claim 3, It is characterized in that The PWM signal is periodically assigned a high level and a low level, and when the vehicle-mounted analog camera transmits a previous frame image, the PWM signal is at a high level, and the switching transistor is turned on. At this time, a current is generated between the power supply and the ground, and the current flows from the first resistor through the switching transistor and the third resistor.
6. The inter-frame power consumption compensation method of the vehicle-mounted analog camera according to claim 1, It is characterized in that There is a frame interruption between the adjacent previous frame images and the next frame images, and a timer is designed in the frame interruption to determine the working power compensation time.
7. The inter-frame power consumption compensation method of the vehicle-mounted analog camera according to claim 1, It is characterized in that The working power compensation time includes the on time, the off time and the duty cycle of the PWM signal.
8. The inter-frame power consumption compensation method of the vehicle-mounted analog camera as claimed in claim 7, It is characterized in that When the PWM signal is turned on, the duty cycle of the PWM signal takes a preset value, and when the PWM signal is turned off, the duty cycle of the PWM signal is 0.
