Light supplement lamp control method and device, electronic equipment and storage medium

文档序号:327278 发布日期:2021-11-30 浏览:11次 中文

阅读说明:本技术 一种补光灯控制方法、装置、电子设备及存储介质 (Light supplement lamp control method and device, electronic equipment and storage medium ) 是由 胡菁 夏若彬 于 2020-05-26 设计创作,主要内容包括:本发明公开了一种补光灯控制方法、装置、电子设备及存储介质,为了减少近处物体和远处物体的补光效果差异,近处物体对应的补光灯有效补光时间配置地较短,远处物体对应的补光灯有效补光时间配置地较长。由于图像传感器相邻两个像素行的曝光起始时刻相差一个读出时间,在远处物体对应的第一像素行的曝光起始时刻控制补光灯开启,在近处物体对应的第二像素行的曝光起始时刻之后,第一像素行的曝光结束时刻之前,控制补光灯关闭。让近处物体的有效补光时间更短,远处物体的有效补光时间更长。解决了补光灯对远处物体和近处物体的补光效果差异较大,不能同时满足远处物体和近处物体的补光要求的问题。(The invention discloses a method and a device for controlling a light supplementing lamp, electronic equipment and a storage medium. The exposure starting time of two adjacent pixel rows of the image sensor is different by one reading time, the light supplementing lamp is controlled to be turned on at the exposure starting time of a first pixel row corresponding to a distant object, and the light supplementing lamp is controlled to be turned off after the exposure starting time of a second pixel row corresponding to a near object and before the exposure ending time of the first pixel row. The effective light supplementing time of the near object is shorter, and the effective light supplementing time of the far object is longer. The problem of the light filling lamp to the light filling effect difference of object far away and object near great, can not satisfy the light filling requirement of object far away and object near simultaneously is solved.)

1. A method for controlling a fill-in light is characterized by comprising the following steps:

determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplement pixel range according to the light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitoring scene, wherein the distance between the first object and the first light supplement lamp is a first distance, the distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance;

and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

2. The method of claim 1, wherein the controlling the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row comprises:

and after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row, and before the exposure starting time of the first pixel row of the next frame image, controlling the first fill light to be turned off.

3. The method of claim 1, wherein before controlling the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row, the method further comprises:

when the monitoring scene further comprises at least one second light supplement lamp, judging whether light supplement pixel ranges of the first light supplement lamp and the at least one second light supplement lamp are not overlapped, if so, performing the subsequent step of controlling the first light supplement lamp to be closed after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row;

or when the monitoring scene further comprises at least one second light supplement lamp, judging whether the light supplement pixel range of the first light supplement lamp is the light supplement pixel range corresponding to the nearest object in the image, if so, performing the subsequent step of controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row.

4. The method of claim 3, wherein if the fill-in pixel ranges of the first fill-in lamp and at least one second fill-in lamp overlap, and the fill-in pixel range of the first fill-in lamp is not the fill-in pixel range corresponding to the nearest object in the image, the controlling the first fill-in lamp to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row comprises:

and after the exposure starting time of the second pixel row, before the exposure ending time of the first pixel row and before the exposure starting time of a third pixel row adjacent to the second pixel row, controlling the first supplementary lighting lamp to be turned off.

5. A light supplement lamp control device, the device comprising:

the device comprises a determining module, a processing module and a processing module, wherein the determining module is used for determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplementing pixel range according to the light supplementing pixel range corresponding to the first light supplementing lamp in an image in a predetermined monitoring scene, the distance between the first object and the first light supplementing lamp is a first distance, the distance between the second object and the first light supplementing lamp is a second distance, and the first distance is greater than the second distance;

and the control module is used for controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

6. The apparatus of claim 5, wherein the control module is specifically configured to control the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row and before the exposure start time of the first pixel row of the next frame image.

7. The apparatus of claim 5, wherein the apparatus further comprises:

the judging module is used for judging whether the light supplementing pixel ranges of the first light supplementing lamp and the at least one second light supplementing lamp are not overlapped when the monitoring scene further comprises the at least one second light supplementing lamp, and if so, triggering the control module; or when the monitoring scene further comprises at least one second light supplement lamp, judging whether the light supplement pixel range of the first light supplement lamp is the light supplement pixel range corresponding to the nearest object in the image, and if so, triggering the control module.

8. The apparatus of claim 7, wherein the control module is further configured to control the first fill light to turn off after the exposure start time of the second pixel row, before the exposure end time of the first pixel row, and before the exposure start time of a third pixel row adjacent to the second pixel row.

9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;

a memory for storing a computer program;

a processor for implementing the method steps of any one of claims 1 to 4 when executing a program stored in the memory.

10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-4.

Technical Field

The invention relates to the technical field of optics, in particular to a method and a device for controlling a light supplement lamp, electronic equipment and a storage medium.

Background

In the field of intelligent transportation, the light supplement lamp technology is more and more widely applied. Since the surface illumination of an object is inversely proportional to the square of the distance, when light is supplemented, a near object may be overexposed in order to make the light supplement intensity of a far object appropriate. In order to make the light supplement intensity of the near object appropriate, the light supplement of the far object may be insufficient.

In the light supplement scheme of the prior art, the difference of the light supplement effect of the far object and the light supplement effect of the near object is large, and the light supplement requirements of the far object and the light supplement effect of the near object cannot be met simultaneously, so that the image quality acquired under the light supplement condition is poor.

Disclosure of Invention

The embodiment of the invention provides a method and a device for controlling a light supplement lamp, electronic equipment and a storage medium, which are used for solving the problems that the light supplement lamp has large difference in light supplement effect on a far object and a near object and cannot meet the light supplement requirements of the far object and the near object at the same time.

The embodiment of the invention provides a method for controlling a light supplement lamp, which comprises the following steps:

determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplement pixel range according to the light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitoring scene, wherein the distance between the first object and the first light supplement lamp is a first distance, the distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance;

and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

Further, the controlling the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row includes:

and after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row, and before the exposure starting time of the first pixel row of the next frame image, controlling the first fill light to be turned off.

Further, before controlling the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row, the method further includes:

when the monitoring scene further comprises at least one second light supplement lamp, judging whether light supplement pixel ranges of the first light supplement lamp and the at least one second light supplement lamp are not overlapped, if so, performing the subsequent step of controlling the first light supplement lamp to be closed after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row;

or when the monitoring scene further comprises at least one second light supplement lamp, judging whether the light supplement pixel range of the first light supplement lamp is the light supplement pixel range corresponding to the nearest object in the image, if so, performing the subsequent step of controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row.

Further, if the light supplement pixel ranges of the first light supplement lamp and at least one second light supplement lamp overlap, and the light supplement pixel range of the first light supplement lamp is not the light supplement pixel range corresponding to the nearest object in the image, controlling the first light supplement lamp to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row includes:

and after the exposure starting time of the second pixel row, before the exposure ending time of the first pixel row and before the exposure starting time of a third pixel row adjacent to the second pixel row, controlling the first supplementary lighting lamp to be turned off.

On the other hand, an embodiment of the present invention provides a light supplement lamp control apparatus, where the apparatus includes:

the device comprises a determining module, a processing module and a processing module, wherein the determining module is used for determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplementing pixel range according to the light supplementing pixel range corresponding to the first light supplementing lamp in an image in a predetermined monitoring scene, the distance between the first object and the first light supplementing lamp is a first distance, the distance between the second object and the first light supplementing lamp is a second distance, and the first distance is greater than the second distance;

and the control module is used for controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

Further, the control module is specifically configured to control the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row and before the exposure start time of the first pixel row of the next frame image.

Further, the apparatus further comprises:

the judging module is used for judging whether the light supplementing pixel ranges of the first light supplementing lamp and the at least one second light supplementing lamp are not overlapped when the monitoring scene further comprises the at least one second light supplementing lamp, and if so, triggering the control module; or when the monitoring scene further comprises at least one second light supplement lamp, judging whether the light supplement pixel range of the first light supplement lamp is the light supplement pixel range corresponding to the nearest object in the image, and if so, triggering the control module.

Further, the control module is further configured to control the first fill light to turn off after the exposure start time of the second pixel row, before the exposure end time of the first pixel row, and before the exposure start time of a third pixel row adjacent to the second pixel row.

On the other hand, the embodiment of the invention provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;

a memory for storing a computer program;

a processor for implementing any of the above method steps when executing a program stored in the memory.

In another aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the above.

The embodiment of the invention provides a method and a device for controlling a light supplement lamp, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplement pixel range according to the light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitoring scene, wherein the distance between the first object and the first light supplement lamp is a first distance, the distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance; and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

In the embodiment of the invention, in order to reduce the difference of the light supplement effect between the near object and the far object, the effective light supplement time of the light supplement lamp corresponding to the near object is configured to be shorter, and the effective light supplement time of the light supplement lamp corresponding to the far object is configured to be longer. Specifically, the purpose is achieved by setting the on and off time of the light supplement lamp. The effective light supplement time refers to the coincidence time of the exposure time length of each pixel row and the starting time length of the light supplement lamp. Because the exposure starting time of two adjacent pixel rows of the image sensor differs by one reading time, the light supplement lamp is controlled to be turned on at the exposure starting time of the first pixel row corresponding to a distant object in the embodiment of the invention, and the light supplement lamp is controlled to be turned off after the exposure starting time of the second pixel row corresponding to a close object and before the exposure ending time of the first pixel row. The effective light supplementing time of the near object is shorter, and the effective light supplementing time of the far object is longer. Therefore, the problem that the light supplement lamp has large difference in light supplement effect on the far object and the near object and cannot meet the light supplement requirements of the far object and the near object at the same time is solved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic diagram of a control process of a fill-in light lamp according to an embodiment of the present invention;

fig. 2 is a schematic diagram illustrating control of a fill-in light lamp when a fill-in light lamp is configured according to an embodiment of the present invention;

fig. 3 is a schematic view of a fill-in pixel range of a fill-in lamp when three fill-in lamps are configured according to an embodiment of the present invention;

fig. 4 is a schematic diagram illustrating control of a fill-in light according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of a fill-in light control device according to an embodiment of the present invention;

fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the attached drawings, and it should be understood 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.

Example 1:

fig. 1 is a schematic diagram of a light supplement lamp control process provided in an embodiment of the present invention, where the process includes the following steps:

s101: according to a light supplement pixel range corresponding to a first light supplement lamp in an image in a predetermined monitoring scene, determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in the light supplement pixel range, wherein the distance between the first object and the first light supplement lamp is a first distance, the distance between the second object and the first light supplement lamp is a second distance, and the first distance is larger than the second distance.

S102: and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

The light supplement lamp control method provided by the embodiment of the invention is applied to electronic equipment, and the electronic equipment can be equipment such as a PC (personal computer), a tablet personal computer and the like.

In a monitoring scene, after the configuration of the light supplement lamp is completed, the light supplement pixel range corresponding to the light supplement lamp in the image is determined, the electronic device can determine the light supplement pixel range corresponding to the light supplement lamp in the image in advance, and then a first pixel row corresponding to a far object and a second pixel row corresponding to a near object in the determined light supplement pixel range. It should be noted that, in a monitoring scene, when an irradiation range of one fill-in lamp can cover the whole image, only one fill-in lamp may be configured; when the irradiation range of one fill-in light lamp can not cover the whole image, can dispose a plurality of fill-in lights. In the embodiment of the present invention, a light supplement lamp to be currently controlled is referred to as a first light supplement lamp, and after a light supplement pixel range corresponding to the first light supplement lamp in an image is determined, a first pixel row corresponding to a first object closer to the first light supplement lamp and a second pixel row corresponding to a second object farther from the first light supplement lamp in the light supplement pixel range are determined.

Taking the example of configuring a first fill-in light in the monitoring area, the smaller the number of pixel lines in the general image is, the farther the first fill-in light is from the object, the larger the number of pixel lines is, and the closer the first fill-in light is to the object. Assuming that the image includes N pixel rows, a first pixel row corresponding to a farthest object in the determined fill-in pixel range is a first row, and a second pixel row corresponding to a nearest object is an nth row. And controlling the first light supplement lamp to be turned on at the exposure starting time of the first row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the Nth row and before the exposure finishing time of the first row.

Fig. 2 is a schematic diagram illustrating control over a fill-in light when a first fill-in light is configured according to an embodiment of the present invention, as shown in fig. 2, an image includes N pixel rows, and from row 1 to row N, the closer an object to be photographed, which has the larger number of rows, is to a camera, the farthest object in the fill-in light pixel range corresponds to the first row, and the closest object corresponds to the nth row. And in a frame interval time length, controlling the first light supplement lamp to be turned on at the exposure starting time of the first row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the Nth row and before the exposure finishing time of the first row. As shown in fig. 2, the exposure start times of two adjacent pixel rows of the image sensor differ by one readout time, in the embodiment of the present invention, the first fill-in light is controlled to be turned on at the exposure start time of the first pixel row corresponding to the distant object, and the first fill-in light is controlled to be turned off after the exposure start time of the second pixel row corresponding to the close object and before the exposure end time of the first pixel row. The effective light supplementing time of the near object is shorter, and the effective light supplementing time of the far object is longer. Therefore, the problem that the light supplement lamp has large difference in light supplement effect on the far object and the near object and cannot meet the light supplement requirements of the far object and the near object at the same time is solved.

Example 2:

in order to ensure that there is no mutual influence between two adjacent frames of images, so as to further ensure the image quality, on the basis of the above embodiment, in an embodiment of the present invention, the controlling the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row includes:

and after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row, and before the exposure starting time of the first pixel row of the next frame image, controlling the first fill light to be turned off.

In the embodiment of the invention, in order to ensure that no mutual influence exists between two adjacent frames of images, a time limiting condition is added when the first fill-in lamp is controlled to be turned off, wherein the time limiting condition is that the first fill-in lamp is controlled to be turned off before the exposure starting time of the first pixel row of the next frame of image. When a plurality of light supplement lamps are arranged in a monitoring scene, each light supplement lamp determines that a corresponding light supplement pixel range exists, and for each light supplement lamp, the light supplement lamp can be controlled to be turned off after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row and before the exposure starting time of the first pixel row in the light supplement pixel range of the light supplement lamp in the next frame image. Or the supplementary lighting lamp can be controlled to be turned off after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row and before the exposure starting time of the first pixel row of the whole image in the next frame image.

In the embodiment of the invention, the first fill-in light is controlled to be turned on at the exposure start time of the first pixel row, and is controlled to be turned off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row and before the exposure start time of the first pixel row of the next frame image. The light supplement between two adjacent frames of images is prevented from influencing each other, and the image quality is further improved.

Example 3:

on the basis of the foregoing embodiments, in an embodiment of the present invention, before controlling the first fill light to be turned off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row, the method further includes:

when the monitoring scene further comprises at least one second light supplement lamp, judging whether light supplement pixel ranges of the first light supplement lamp and the at least one second light supplement lamp are not overlapped, if so, performing the subsequent step of controlling the first light supplement lamp to be closed after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row;

or when the monitoring scene further comprises at least one second light supplement lamp, judging whether the light supplement pixel range of the first light supplement lamp is the light supplement pixel range corresponding to the nearest object in the image, if so, performing the subsequent step of controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure ending time of the first pixel row.

In the embodiment of the present invention, when at least two light supplement lamps are configured in a monitored scene, that is, when the monitored scene includes a first light supplement lamp and at least one second light supplement lamp, light supplement pixel ranges of the first light supplement lamp and the at least one second light supplement lamp may or may not overlap. In the embodiment of the present invention, in order to ensure that the light supplement lamps do not affect each other, and thus further ensure image quality, after the exposure start time of the second pixel row and before the exposure end time of the first pixel row, before controlling the first light supplement lamp to turn off, it is first determined whether light supplement pixel ranges of the first light supplement lamp and the at least one second light supplement lamp do not coincide with each other, if not, that is, the light supplement ranges of the first light supplement lamp and the at least one second light supplement lamp are separated from each other, and as long as after the exposure start time of the second pixel row and before the exposure end time of the first pixel row, controlling the first light supplement lamp to turn off does not affect other second light supplement lamps.

Or, the electronic device determines whether the light supplement pixel range of the first light supplement lamp is the light supplement pixel range corresponding to the nearest object in the image, and if so, it indicates that the last line of the light supplement pixel range of the light supplement lamp does not coincide with the light supplement pixel ranges of other second light supplement lamps, so that after the exposure start time of the second pixel line and before the exposure end time of the first pixel line, controlling the first light supplement lamp to be turned off does not affect the other second light supplement lamps.

In the following, three fill-in lamps are configured, and the fill-in pixel ranges of the three fill-in lamps are not overlapped.

As shown in fig. 3, the light filling pixel range of the light filling lamp 1 corresponds to the 1 st line to the Q th line of the image, the light filling pixel range of the light filling lamp 2 corresponds to the Q +1 th line to the P th line of the image, and the light filling pixel range of the light filling lamp 3 corresponds to the P +1 th line to the N th line of the image. The object corresponding to the light supplement lamp 1 is farthest, and the object corresponding to the light supplement lamp 3 is nearest.

Fig. 4 is a schematic diagram illustrating control of the fill-in light according to an embodiment of the present invention, and as shown in fig. 4, the fill-in light 1 is controlled to be turned on within an exposure time period of a 1 st row, and the fill-in light 1 is controlled to be turned off within an exposure time period of a Q th row. And controlling the light supplement lamp 2 to be turned on within the exposure time length of the Q +1 th line, and controlling the light supplement lamp 2 to be turned off within the exposure time length of the P-th line. And controlling the light supplement lamp 3 to be turned on within the exposure time length of the P +1 th line, and controlling the light supplement lamp 3 to be turned off within the exposure time length of the Nth line. Preferably, the fill light 1 is controlled to be turned on at the starting time within the exposure time of the 1 st row. And controlling the light supplement lamp 2 to be started at the initial moment within the exposure time length of the Q +1 th line. And controlling the light supplement lamp 3 to be started at the initial moment within the exposure time length of the P +1 th line. Thereby further improving image quality.

As shown in fig. 3, for the fill-in light 1, the effective fill-in light time of the image sensor in the 1 st row is the longest, and the effective fill-in light time of the Q-th row is the shortest. For the fill-in light 2, the effective fill-in light time of the image sensor on the Q +1 th line is the longest, and the effective fill-in light time of the P-th line is the shortest. For the fill-in light 3, the effective fill-in light time of the image sensor on the P +1 th line is the longest, and the effective fill-in light time of the nth line is the shortest. That is to say, the effective light supplementing time of the near object is shorter, and the effective light supplementing time of the far object is longer. Therefore, the problem that the light supplement lamp has large difference in light supplement effect on the far object and the near object, and cannot meet the light supplement requirements of the far object and the near object at the same time, and the image quality acquired under the light supplement condition is poor is solved.

Example 4:

on the basis of the foregoing embodiments, in an embodiment of the present invention, if light supplement pixel ranges of the first light supplement lamp and at least one second light supplement lamp overlap, and the light supplement pixel range of the first light supplement lamp is not a light supplement pixel range corresponding to a nearest object in the image, after an exposure start time of the second pixel row and before an exposure end time of the first pixel row, controlling the first light supplement lamp to turn off includes:

and after the exposure starting time of the second pixel row, before the exposure ending time of the first pixel row and before the exposure starting time of a third pixel row adjacent to the second pixel row, controlling the first supplementary lighting lamp to be turned off.

In the embodiment of the present invention, when the light supplement pixel ranges of the first light supplement lamp and the at least one second light supplement lamp are overlapped, and the light supplement pixel range of the first light supplement lamp is not the light supplement pixel range corresponding to the nearest object in the image, in order to ensure that there is no mutual influence between the first light supplement lamp and the at least one second light supplement lamp, it is to be avoided that two light supplement lamps having the overlapped light supplement pixel ranges simultaneously supplement light for a certain row of pixels. The method comprises the following steps of controlling a first supplementary lighting lamp to be turned off after the exposure starting time of a second pixel row, before the exposure ending time of a first pixel row and before the exposure starting time of a third pixel row adjacent to the second pixel row. Therefore, only one light supplement lamp can supplement light for the same pixel row, no mutual influence among the light supplement lamps is guaranteed, and image quality is further guaranteed.

It should be noted that the fill light in the embodiment of the present invention includes a stroboscopic fill light, and the stroboscopic fill light includes a white-light stroboscopic fill light and an infrared stroboscopic fill light. The method for controlling the light supplement lamp provided by the embodiment of the invention does not need to change an optical structure, and has small hardware change, so the scheme cost is low. The method is suitable for a single light supplement lamp scheme and a multi-light supplement lamp scheme. The method can be combined with other existing supplementary lighting control schemes. Meanwhile, the effective light supplementing time at different distances can be adjusted steplessly.

Example 5:

fig. 5 is a schematic structural diagram of a fill-in light control device provided in an embodiment of the present invention, where the device includes:

a determining module 51, configured to determine, according to a light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitored scene in an image, a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in the light supplement pixel range, where a distance between the first object and the first light supplement lamp is a first distance, a distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance;

the control module 52 is configured to control the first light supplement lamp to be turned on at the exposure start time of the first pixel row, and control the first light supplement lamp to be turned off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row.

The control module 52 is specifically configured to control the first fill light to turn off after the exposure start time of the second pixel row and before the exposure end time of the first pixel row, and before the exposure start time of the first pixel row of the next frame image.

The device further comprises:

a judging module 53, configured to, when the monitoring scene further includes at least one second light supplement lamp, judge whether light supplement pixel ranges of the first light supplement lamp and the at least one second light supplement lamp are not overlapped, and if yes, trigger the control module; or when the monitoring scene further comprises at least one second light supplement lamp, judging whether the light supplement pixel range of the first light supplement lamp is the light supplement pixel range corresponding to the nearest object in the image, and if so, triggering the control module.

The control module 52 is further configured to control the first fill light to turn off after the exposure start time of the second pixel row, before the exposure end time of the first pixel row, and before the exposure start time of a third pixel row adjacent to the second pixel row.

Example 6:

on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 6, including: the system comprises a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302 and the memory 303 complete mutual communication through the communication bus 304;

the memory 303 has stored therein a computer program which, when executed by the processor 301, causes the processor 301 to perform the steps of:

determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplement pixel range according to the light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitoring scene, wherein the distance between the first object and the first light supplement lamp is a first distance, the distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance;

and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

Based on the same inventive concept, the embodiment of the present invention further provides an electronic device, and since the principle of the electronic device for solving the problem is similar to the method for controlling the fill-in light, the implementation of the electronic device may refer to the implementation of the method, and repeated details are not repeated.

The electronic device provided by the embodiment of the invention can be a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), a network side device and the like.

The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.

The communication interface 302 is used for communication between the above-described electronic apparatus and other apparatuses.

The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.

The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.

When the processor executes a program stored in the memory in the embodiment of the present invention, determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplement pixel range according to the light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitoring scene in an image, where a distance between the first object and the first light supplement lamp is a first distance, a distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance; and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row. In the embodiment of the invention, in order to reduce the difference of the light supplement effect between the near object and the far object, the effective light supplement time of the light supplement lamp corresponding to the near object is configured to be shorter, and the effective light supplement time of the light supplement lamp corresponding to the far object is configured to be longer. Specifically, the purpose is achieved by setting the on and off time of the light supplement lamp. The effective light supplement time refers to the coincidence time of the exposure time length of each pixel row and the starting time length of the light supplement lamp. Because the exposure starting time of two adjacent pixel rows of the image sensor differs by one reading time, the light supplement lamp is controlled to be turned on at the exposure starting time of the first pixel row corresponding to a distant object in the embodiment of the invention, and the light supplement lamp is controlled to be turned off after the exposure starting time of the second pixel row corresponding to a close object and before the exposure ending time of the first pixel row. The effective light supplementing time of the near object is shorter, and the effective light supplementing time of the far object is longer. Therefore, the problem that the light supplement lamp has large difference in light supplement effect on the far object and the near object and cannot meet the light supplement requirements of the far object and the near object at the same time is solved.

Example 7:

on the basis of the foregoing embodiments, an embodiment of the present invention further provides a computer storage readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to execute the following steps:

determining a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in a light supplement pixel range according to the light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitoring scene, wherein the distance between the first object and the first light supplement lamp is a first distance, the distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance;

and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row.

Based on the same inventive concept, embodiments of the present invention further provide a computer-readable storage medium, and since a principle of solving a problem when a processor executes a computer program stored in the computer-readable storage medium is similar to that of a fill-in light control method, implementation of the computer program stored in the computer-readable storage medium by the processor may refer to implementation of the method, and repeated details are not repeated.

The computer readable storage medium may be any available medium or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs), etc.

In the computer-readable storage medium provided in the embodiment of the present invention, a computer program is stored, and when the computer program is executed by a processor, the method includes determining, according to a light supplement pixel range corresponding to a first light supplement lamp in a predetermined monitored scene in an image, a first pixel row corresponding to a first object and a second pixel row corresponding to a second object in the light supplement pixel range, where a distance between the first object and the first light supplement lamp is a first distance, a distance between the second object and the first light supplement lamp is a second distance, and the first distance is greater than the second distance; and controlling the first light supplement lamp to be turned on at the exposure starting time of the first pixel row, and controlling the first light supplement lamp to be turned off after the exposure starting time of the second pixel row and before the exposure finishing time of the first pixel row. In the embodiment of the invention, in order to reduce the difference of the light supplement effect between the near object and the far object, the effective light supplement time of the light supplement lamp corresponding to the near object is configured to be shorter, and the effective light supplement time of the light supplement lamp corresponding to the far object is configured to be longer. Specifically, the purpose is achieved by setting the on and off time of the light supplement lamp. The effective light supplement time refers to the coincidence time of the exposure time length of each pixel row and the starting time length of the light supplement lamp. Because the exposure starting time of two adjacent pixel rows of the image sensor differs by one reading time, the light supplement lamp is controlled to be turned on at the exposure starting time of the first pixel row corresponding to a distant object in the embodiment of the invention, and the light supplement lamp is controlled to be turned off after the exposure starting time of the second pixel row corresponding to a close object and before the exposure ending time of the first pixel row. The effective light supplementing time of the near object is shorter, and the effective light supplementing time of the far object is longer. Therefore, the problem that the light supplement lamp has large difference in light supplement effect on the far object and the near object and cannot meet the light supplement requirements of the far object and the near object at the same time is solved.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.

It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种双控双模式座舱照明系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!