Control method and device of image acquisition device and electronic device

By adjusting the partition marking and exposure amount of the image acquisition device, the problem of low brightness of the foreground object under backlight conditions is solved, improving the image effect and reducing hardware requirements.

CN114067274BActive Publication Date: 2025-08-26HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111400514.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-08-26
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

Under backlight conditions, the brightness of the foreground object in the image acquisition device is low, resulting in poor image effects.

Method used

By detecting the startup conditions of the image acquisition device, the current scene image is collected and the partition is marked, the marking information of the historical scene image is obtained, the partition marking information is compared to determine the target partition, and the exposure amount parameter is adjusted according to the pixel value of the target partition.

Benefits of technology

Improve the brightness of the foreground object in backlight scenes and improve image effects, especially in fixed scenes, you can position the face area without relying on face detection, reducing hardware performance requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114067274B_ABST
    Figure CN114067274B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a control method, device, and electronic device for an image acquisition device. The method includes: when detecting that a start condition of the image acquisition device is triggered, starting the image acquisition device and acquiring a current scene image; marking a partition of the current scene image based on the pixel value of the current scene image to obtain marking information of the current scene image; obtaining marking information of the corresponding historical scene image based on the acquisition time of the current scene image; determining a target partition based on the marking information of the current scene image and the marking information of the historical scene image; and adjusting the exposure parameters of the image acquisition device based on the pixel value of each target partition. By comparing the marking information of the current scene image with the marking information of the corresponding historical scene image, the embodiments of the present application can determine the position of a foreground object and adjust the exposure parameters, thereby increasing the brightness of the foreground object in a backlit scene and improving the image effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of doorbell peepholes, and in particular to a control method, device and electronic equipment for an image acquisition device. Background Art

[0002] With the development of electronic technology, image acquisition devices set in fixed areas are widely used, for example, electronic doorbells with image acquisition functions.

[0003] When an image acquisition device captures an image, it may contain a foreground object. Different lighting conditions can have different effects on the captured image. In backlit conditions, the brightness of the foreground object may be low, resulting in a poor image quality. Therefore, how to improve the image quality of the foreground object under different lighting conditions is an urgent problem to be solved. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a control method, device and electronic device for an image acquisition device to solve the problem of how to improve the image effect of a foreground object in a backlit scene.

[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for controlling an image acquisition device, comprising:

[0007] When detecting that a start condition of the image acquisition device is triggered, starting the image acquisition device and acquiring an image of the current scene;

[0008] Marking the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image;

[0009] Based on the acquisition time of the current scene image, obtaining label information of each partition of the corresponding historical scene image;

[0010] According to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, determining a partition whose marking information meets a preset marking condition among the partitions as a target partition;

[0011] The exposure parameters of the image acquisition device are adjusted according to the pixel values ​​of each target partition.

[0012] In a second aspect, an embodiment of the present application provides a control device for an image acquisition device, comprising:

[0013] Image sensor, used to collect the current scene image;

[0014] A memory, used for storing marking information of each partition of the historical scene image;

[0015] A processor is configured to start the image acquisition device when it is detected that a start condition of the image acquisition device is triggered; mark the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image; obtain marking information of each partition of the corresponding historical scene image based on the acquisition time of the current scene image; determine, according to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, the partition whose marking information meets the preset marking condition as the target partition; and adjust the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition.

[0016] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, and a memory electrically connected to the processor. The memory stores a computer program, and the processor is configured to retrieve and execute the computer program from the memory to implement the steps of the above-mentioned method for controlling an image acquisition device.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method of the above-mentioned image acquisition device are implemented.

[0018] In an embodiment of the present application, when it is detected that the start-up condition of the image acquisition device is triggered, the image acquisition device is started and the current scene image is acquired; based on the pixel values ​​of the current scene image, the partitions of the current scene image are marked to obtain the marking information of each partition of the current scene image; based on the acquisition time of the current scene image, the marking information of each partition of the corresponding historical scene image is acquired; based on the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, the partition whose marking information meets the preset marking condition is determined as the target partition; based on the pixel values ​​of each target partition, the exposure parameter of the image acquisition device is adjusted. By comparing the marking information of each partition of the current scene image with the marking information of each partition of the corresponding historical scene image, the embodiment of the present application can determine the position of the foreground object and adjust the exposure parameter, thereby increasing the brightness of the foreground object in a backlit scene and improving the image effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 A first flow chart of a control method for an image acquisition device provided in an embodiment of the present application;

[0021] Figure 2 A second flow chart of a method for controlling an image acquisition device provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of the module composition of a control device for an image acquisition device provided in an embodiment of the present application;

[0023] Figure 4 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0025] Figure 1 A flow chart of a control method for an image acquisition device is provided for one or more embodiments of this specification, see Figure 1 , the method may specifically include the following steps:

[0026] Step 102: When it is detected that the start condition of the image acquisition device is triggered, the image acquisition device is started and the current scene image is acquired.

[0027] The image acquisition device may be an electronic device with an image acquisition function, such as an electronic doorbell or an electronic cat's eye, or may be other image acquisition devices set in a fixed area, such as a surveillance camera.

[0028] Before the start-up condition of the image acquisition device is triggered, the image acquisition device can be in a shutdown state or a sleep state; when it is detected that the start-up condition of the image acquisition device is triggered, the control device of the image acquisition device can start the image acquisition device, and after starting, the current scene image can be captured through the image sensor in the image acquisition device.

[0029] The arrangement position of the image acquisition device in the embodiment of the present application can be fixed, and the image shooting angle of the image acquisition device can be fixed or adjustable within a preset angle threshold.

[0030] The current scene image may be an image of the scene facing the image acquisition device, acquired by the image sensor after the image acquisition device is started. The current scene image may include a foreground object, which may be a non-fixed, temporary person or object in the current scene image.

[0031] In a specific implementation, collecting the current scene image may be collecting one frame of image, or collecting multiple frames of image according to a preset time period.

[0032] To save power, the image acquisition device can enter a shutdown or sleep state at a preset time after startup. For example, an electronic doorbell starts at 7:02:00, captures one frame of image, and automatically goes to sleep one minute after startup, re-entering the sleep state at 7:03:00.

[0033] Optionally, the image acquisition device includes an electronic doorbell with an image acquisition function; when it is detected that the start condition of the image acquisition device is triggered, the image acquisition device is started and the current scene image is acquired, including: when it is detected that the doorbell button of the electronic doorbell is clicked, the electronic doorbell is controlled to change from a sleep state to a working state, and the current scene image is acquired; or, when it is determined that there is at least one foreground object of the electronic doorbell by detecting the infrared information acquired by the electronic doorbell, the electronic doorbell is controlled to change from a sleep state to a working state, and the current scene image is acquired.

[0034] The electronic doorbell can be activated by a visitor clicking the doorbell button, by detecting infrared information collected by the electronic doorbell and determining the presence of at least one visitor, or by the owner of the electronic doorbell actively triggering the activation operation. The owner of the electronic doorbell here refers to the resident of the house where the electronic doorbell is installed, and usually the resident has partial or full operation rights of the electronic doorbell.

[0035] Step 104 : Mark the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image.

[0036] In an embodiment of the present application, the size of the current scene image may be fixed, and any of the multiple partitions obtained by dividing the current scene image may contain at least one pixel.

[0037] Taking a frame of image as an example, the frame of image can be divided into MxN partitions (M ≥ 1 pixel, N ≥ 1 pixel). For each of the MxN partitions, the partition can be marked based on the pixel values ​​of each pixel contained in the partition to obtain the marking information of the partition. After obtaining the marking information of the MxN partitions in the frame of image, the marking information of each partition can be recorded in a preset order as the marking information of each partition of the current scene image.

[0038] A pixel value is a value assigned by a computer when an original image is digitized. It represents the average brightness of a small square in the original, or the average reflective (or transmissive) density of that square. When converting a digital image to a halftone image, the dot area ratio (dot percentage) is directly related to the pixel value (grayscale value) of the digital image. That is, the size of the dot represents the average brightness of a small square in the original.

[0039] By marking the partitions of the current scene image, the light conditions in the actual application scene can be recorded.

[0040] Optionally, according to the pixel values ​​of the current scene image, the partitions of the current scene image are marked to obtain marking information of each partition of the current scene image, including: for any partition in each partition, calculating the average value of the pixel value of the partition to obtain the block brightness of the partition; judging whether the block brightness is greater than a preset brightness threshold; if so, determining that the marking information of the partition is a bright area mark; if not, determining that the marking information of the partition is a dark area mark.

[0041] Taking a frame of image as an example, the frame can be divided into MxN partitions. For each of the MxN partitions, the average pixel value of each pixel contained in the partition is calculated, and this average value is used as the block brightness of the partition. It is determined whether the block brightness is greater than a preset brightness threshold: if so, the partition is marked as a bright area, that is, the marking information of the partition is determined to be a bright area mark; if not, the partition is marked as a dark area, that is, the marking information of the partition is determined to be a dark area mark.

[0042] Step 106 : Based on the acquisition time of the current scene image, obtain the label information of each partition of the corresponding historical scene image.

[0043] In specific implementation, based on the acquisition time of the current scene image, the time period in which the acquisition time falls can be determined as the target time period in multiple pre-divided time periods, and then the label information of each partition of the historical scene image corresponding to the target time period can be queried to obtain.

[0044] The plurality of pre-divided time periods correspond to the marking information of each partition of different historical scene images. Before step 102 is executed, a number of address spaces can be divided in a non-volatile storage space (such as a Flash space); the number of divided address spaces is the same as the number of pre-divided time periods, and the address controls correspond to the time periods one-to-one; then the marking information of each partition obtained in any time period is stored in the one-to-one corresponding address space. The pre-divided time period can be a preset time divided according to a preset time interval. The preset time can be all or part of a day. The preset time interval can be set to 1 hour, but can also be other time intervals.

[0045] The following uses an electronic doorbell as an example to explain the principle of step 106. A visitor triggering an electronic doorbell only occurs occasionally; most of the time, it's off or dormant. Because electronic doorbells are fixed, typically located in hallways, light changes between periods are minimal. Without interference from visitors or other external objects, light conditions at the same time each day are very similar and can be considered identical. Therefore, if an image is captured at the same time each day, the tag information for each sub-area of ​​the image can be considered approximately identical. Typically, light conditions within an hour are very similar and can be considered approximately identical. Therefore, without interference from visitors or other external objects, light conditions at the same time each day are very similar and can be considered identical. Based on the capture time of the current scene image, the time period of that capture time can be determined. The tag information for each sub-area of ​​the historical scene image corresponding to that time period can be obtained. This tag information for each sub-area of ​​the historical scene image can be compared with the tag information for each sub-area of ​​the current scene image to determine whether a visitor is currently present, thereby determining how to adjust the exposure parameters.

[0046] It should be noted that before the image acquisition device is officially put into use, each pre-divided time period corresponds to the initial value of the tag information for each partition, rather than the tag information for each partition of the historical scene image collected during the commissioning process. In one embodiment, the initial value of the tag information for each partition can be a dark area. If the tag information for each partition of the historical scene image corresponding to the target time period is obtained, the tag information for each partition of the current scene image can be used to update the tag information for each partition of the historical scene image stored in the memory.

[0047] In addition, the memory does not store historical scene images, but only stores the labeling information for each subarea of ​​the historical scene images arranged in a preset order. The memory may store only one set of labeling information for each subarea of ​​the historical scene images arranged in a preset order, or may store multiple sets of labeling information for each subarea of ​​the historical scene images arranged in a preset order.

[0048] Step 106 can be described in conjunction with Table 1 above.

[0049] Time period start time Time period end time Address Space Index Tag Information 6:00:00 6:59:59 0 Mark information 1 7:00:00 7:59:59 1 Mark information 2 8:00:00 8:59:59 2 Mark information 3 9:00:00 9:59:59 3 Mark information 4 10:00:00 10:59:59 4 Mark information 5 11:00:00 11:59:59 5 Mark information 6 12:00:00 12:59:59 6 Tag information 7 13:00:00 13:59:59 7 Tag information 8 14:00:00 14:59:59 8 Tag information 9 15:00:00 15:59:59 9 Mark information 10 16:00:00 16:59:59 10 Tag information 11 17:00:00 17:59:59 11 Tag information 12 18:00:00 18:59:59 12 Tag information 13 19:00:00 19:59:59 13 Tag information 14

[0050] Table 1

[0051] Table 1 is a marking information table in a control method for an image acquisition device provided in an embodiment of the present application, which is used to represent the marking information of each partition of the historical scene image stored in the memory.

[0052] As shown in Table 1, 6:00-20:00 is divided into 14 time periods according to a one-hour time interval, namely Time Period 0 (6:00:00-6:59:59), Time Period 1 (7:00:00-7:59:59), Time Period 2 (8:00:00-8:59:59), ... Time Period 13 (19:00:00-19:59:59). The address space index corresponding to Time Period 0 is 0, the address space index corresponding to Time Period 1 is 1, ... The address space index corresponding to Time Period 13 is 13. Marking Information 1 can be the marking information of each partition of the last saved historical scene image, the acquisition time of which is between 6:00:00 and 6:59:59. The other marking information in Table 1 is similar to Marking Information 1 and will not be repeated here.

[0053] Based on the acquisition time of the current scene image, obtain the tag information of each partition of the corresponding historical scene image. For example, the acquisition time of the current scene image is 7:09:22, then the acquisition time is in time period 1 (7:00:00-7:59:59), corresponding to the address space index "1". According to the address space index "1", find the address space where tag information 2 is stored, and read tag information 2.

[0054] Step 108 : According to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, a partition whose marking information meets a preset marking condition is determined as a target partition.

[0055] The preset marking condition may be that, in the marking information for each partition of the historical scene image, the marking information for that partition is a bright area marking, and in the marking information for each partition of the current scene image, the marking information for that partition is a dark area marking. In other words, if a partition changes from a bright area to a dark area, the partition is considered to meet the preset marking condition.

[0056] Optionally, based on the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, the partition whose marking information meets the preset marking conditions in each partition is determined as the target partition, including: for any partition in each partition, the marking information of the partition in the marking information of each partition of the current scene image is determined as the first marking information, and the marking information of the partition in the marking information of each partition of the historical scene image is determined as the second marking information; if the first marking information is a dark area mark and the second marking information is a bright area mark, then the partition is determined as the target partition.

[0057] The current scene image and the historical scene image have the same size, and the partitions of the current scene image and the historical scene image are the same. For example, the current scene image is divided into MxN partitions, and the historical scene image is divided into MxN partitions. For any of the MxN partitions, if the first marking information of the partition is a dark area marking and the second marking information is a bright area marking, the partition is determined to be the target partition.

[0058] Optionally, after step 108, the control method of the image acquisition device further includes: if the determined number of target partitions does not meet a preset number condition, updating the marking information of each partition of the historical scene image according to the marking information of each partition of the current scene image.

[0059] The preset quantity condition may include: the number of the determined target partitions is greater than a preset quantity threshold, or the ratio of the number of the determined target partitions to the number of each partition of the current scene image is greater than a preset ratio threshold.

[0060] When the number of target partitions determined in step 108 is less than or equal to a preset number threshold, the marking information of each partition of the historical scene image is updated according to the marking information of each partition of the current scene image; or, when the ratio of the number of target partitions determined in step 108 to the number of each partition of the current scene image is greater than a preset ratio threshold, the marking information of each partition of the historical scene image is updated according to the marking information of each partition of the current scene image.

[0061] The number of determined target partitions is less than or equal to a preset number threshold, or the ratio of the number of determined target partitions to the number of partitions of the current scene image is less than or equal to a preset ratio threshold, indicating that the number of partitions changed from bright areas to dark areas is small.

[0062] Taking an electronic doorbell as an example, the technical concept of setting a preset number threshold or a preset ratio threshold is explained: During the same time period each day, when there are no visitors, the lighting conditions of the current scene and the historical scenes of the electronic doorbell are nearly identical, but there may be slight differences. Obviously, the number of areas that change from bright to dark due to slight differences in lighting conditions is relatively small, while the number of areas that change from bright to dark due to the arrival of a visitor is relatively large. By setting a preset number threshold or a preset ratio threshold, we can prevent small differences in lighting conditions from being mistakenly identified as the arrival of a visitor.

[0063] When the number of target partitions is small, the target partitions may be caused by slight differences between the lighting conditions of the current scene image and the lighting conditions of the historical image scene. Therefore, the marking information of each partition of the current scene image can be regarded as the regular marking information of the image that does not contain foreground objects obtained by the image acquisition device, and the marking information of each partition of the current scene image can replace the marking information of each partition of the historical scene image stored in the memory.

[0064] When the number of determined target partitions does not meet the preset number condition, updating the marking information of each partition of the historical scene image according to the marking information of each partition of the current scene image has the following advantages:

[0065] On the one hand, before the image acquisition device is officially put into use, the marking information of each partition stored in the memory can be the initial value of the marking information. After the image acquisition device is officially put into use, the marking information of each partition under the normal lighting conditions of the location of the image acquisition device can be stored through the above-mentioned update method as a comparison object for the current scene image acquired next time.

[0066] On the other hand, as the seasons change, for example, the nights become longer in winter and shorter in summer, the lighting conditions in the same time period may change. Through this update method, the marking information of each partition of the historical scene image stored in the memory can be more in line with the recent normal lighting conditions.

[0067] In specific implementation, when the image acquisition device is about to re-enter the shutdown state or sleep state, and the number of determined target partitions does not meet the preset number conditions, the marking information of each partition of the historical scene image is updated according to the marking information of each partition of the current scene image.

[0068] Optionally, if the number of determined target partitions does not meet the preset number condition, the marking information in the current scene image is calculated as the average value of the pixel values ​​of each partition marked as a dark area to obtain the second average brightness information; based on the second average brightness information and the second preset brightness information, the exposure parameters of the image acquisition device are adjusted.

[0069] The exposure parameters of the image acquisition device include but are not limited to: exposure time, exposure multiple, and aperture size.

[0070] The second preset brightness information refers to conventional brightness information that enables the image acquisition device to obtain a clear and visible image when there is no foreground object in the current scene image.

[0071] If the number of determined target subareas does not meet the preset number requirement, the target subareas in the current scene image may be caused by a slight difference in lighting conditions between the current scene image and the historical scene image, rather than by light obstruction caused by visitors. Therefore, each subarea in the current scene image marked as a dark area can be considered an area that needs to be brightened when the image capture device captures the current scene image.

[0072] The partitions marked with dark area mark information in the current scene image may be multiple partitions connected together, or may be multiple partitions separated by intervals.

[0073] The average pixel values ​​of each subarea marked as a dark area in the current scene image are calculated to obtain second average brightness information, which is the average brightness information of each subarea marked as a dark area in the current scene image.

[0074] In a specific implementation, the following situation may occur: a first number of partitions marked with dark area information are connected, while a second number of partitions marked with dark area information are not connected to the first number of connected partitions marked with dark area information, and the first number is much larger than the second number. In this case, the second number of partitions marked with dark area information can be discarded, and only the average pixel values ​​of the first number of connected partitions marked with dark area information can be calculated as the second average brightness information.

[0075] The first quantity is much larger than the second quantity, which may be that the ratio of the first quantity to the second quantity is larger than a preset ratio threshold, or the difference between the first quantity and the second quantity is larger than a preset quantity threshold.

[0076] For example, the current scene image is divided into 16x16 partitions, among which 150 partitions with marking information as dark area marking are connected together, and there are 6 partitions with marking information as dark area marking that are not connected to the 150 partitions with marking information as dark area marking, and 150 / 6=25, 25 is greater than the preset ratio threshold 15, then the 6 partitions with marking information as dark area marking can be discarded, and only the average value of the pixel values ​​of the 150 partitions with marking information as dark area marking are calculated as the second average brightness information.

[0077] According to the second average brightness information and the second preset brightness information, the exposure parameters of the image acquisition device are adjusted. For example, the second preset brightness information is X1, and the calculated second average brightness information is Y1. Then, according to the difference between Y1 and X1, one or more of the exposure time, exposure multiple and aperture size corresponding to the difference are determined.

[0078] By calculating the average value of the pixel values ​​of each partition marked as a dark area in the current scene image when the number of determined target partitions does not meet the preset number condition, the second average brightness information is obtained, and the exposure parameters of the image acquisition device are adjusted according to the second average brightness information and the second preset brightness information. By adjusting the exposure parameters, a clear and visible image can be obtained using the image acquisition device when there is no foreground object in the current scene image, thereby improving the image effect.

[0079] Step 110: Adjust the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition.

[0080] According to the pixel values ​​of each target partition, the average brightness information of each target partition can be determined, so that the exposure time, exposure multiple and aperture of the image acquisition device can be adjusted according to the average brightness information.

[0081] Optionally, the exposure parameters of the image acquisition device are adjusted according to the pixel values ​​of each target partition, including: if the number of determined target partitions meets a preset number condition, then the exposure parameters of the image acquisition device are adjusted according to the pixel values ​​of each target partition; the preset number condition includes: the number of determined target partitions is greater than a preset number threshold, or the ratio of the number of determined target partitions to the number of partitions of the current scene image is greater than a preset ratio threshold.

[0082] If the number of target subareas determined in step 108 is greater than a preset threshold, or if the ratio of the number of target subareas determined in step 108 to the number of subareas in the current scene image is greater than a preset threshold, this indicates that there are a large number of target subareas. In this case, each target subarea can be considered to be caused by light being blocked by a foreground object. Therefore, in this case, the average brightness information of each target subarea can be determined based on its pixel value, and the exposure time, exposure factor, and aperture of the image acquisition device can be adjusted based on this average brightness information.

[0083] Optionally, the exposure parameters of the image acquisition device are adjusted according to the pixel values ​​of each target partition, including: calculating the average value of the pixel values ​​of each target partition to obtain first average brightness information; and adjusting the exposure parameters of the image acquisition device according to the first average brightness information and the first preset brightness information.

[0084] The first preset brightness information refers to brightness information that enables the foreground object to be clearly visible in the image acquired by the image acquisition device when there is a foreground object in the current scene image.

[0085] When the number of the determined target subareas meets the preset number condition, the target subareas in the current scene image may be caused by the foreground object blocking the light. In this case, it is necessary to increase the brightness of the foreground object in the image to make the foreground object clearly visible.

[0086] The average value of the pixel values ​​of each target subarea is calculated to obtain first average brightness information, which is the average brightness information of each target subarea in the current scene image.

[0087] According to the first average brightness information and the first preset brightness information, the exposure parameters of the image acquisition device are adjusted. For example, the first preset brightness information is X2, and the calculated first average brightness information is Y2. Then, according to the difference between Y2 and X2, one or more of the exposure time, exposure multiple and aperture size corresponding to the difference are determined.

[0088] In an embodiment of the present application, by adopting a time-based method to record the marking information of the bright and dark partitions in the image in time periods, and comparing the current marking information of the same period with the stored marking information when used next time, the image acquisition device has a certain degree of environmental adaptability, which can make the exposure parameters of the image acquisition device more adapted to the scene, thereby improving the image effect, especially the image effect of the foreground object in a backlit environment.

[0089] Furthermore, by comparing the current brightness distribution with the stored brightness distribution for the same time period, the target partitions are identified, thereby determining the target area. In scenarios where the foreground objects are primarily faces, such as when an electronic doorbell captures a visitor's facial image, this can be used to locate the face and human shape areas even when face and human shape detection is not possible, maximizing exposure accuracy for these areas. Because products like Cat's Eye are used in relatively fixed scenarios with a largely unchanged brightness distribution, any change in the brightness distribution within a given time period relative to the same time period is likely due to the presence of a visitor. Therefore, these partitions that change from bright to dark are most likely people. Therefore, face and human shape areas can be located without relying on face and human shape detection, significantly reducing hardware performance requirements and enabling lower-cost products to achieve higher-quality images.

[0090] In an embodiment of the present application, when it is detected that the start condition of the image acquisition device is triggered, the image acquisition device is started and the current scene image is acquired; based on the pixel values ​​of the current scene image, the partitions of the current scene image are marked to obtain the marking information of each partition of the current scene image; based on the acquisition time of the current scene image, the marking information of each partition of the corresponding historical scene image is acquired; based on the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, the partition whose marking information meets the preset marking condition is determined as the target partition; based on the pixel values ​​of each target partition, the exposure parameter of the image acquisition device is adjusted. By comparing the marking information of each partition of the current scene image with the marking information of each partition of the corresponding historical scene image, the embodiment of the present application can determine the position of the foreground object and adjust the exposure parameter, thereby increasing the brightness of the foreground object in a backlit scene and improving the image effect.

[0091] Figure 2 A second flow chart of a control method for an image acquisition device provided in an embodiment of the present application.

[0092] like Figure 2 As shown, in step 202, a frame of image is acquired.

[0093] Step 204: Mark the partitions of the image to obtain marking information of each partition of the image.

[0094] The marking information may include a bright area mark and a dark area mark.

[0095] Step 206: Obtain the marking information of each partition of the image last saved in the same time period.

[0096] A number of address spaces can be divided in a non-volatile storage space (such as Flash memory); the number of divided address spaces is the same as the number of pre-divided time periods, and the address controls correspond to the time periods one-to-one; then, the tag information of each partition obtained within any time period is stored in the one-to-one corresponding address space. The pre-divided time period can be a preset time divided into preset time intervals, which can be all or part of a day. The preset time interval can be set to 1 hour, but can also be other time intervals.

[0097] For example, if step 202 is executed at 8:05 to acquire a frame of image, then 8:05 belongs to the time period 8:00-9:00, and tag information of each partition of the image stored in the address space corresponding to the time period 8:00-9:00 in the non-volatile storage space can be acquired. The tag information of each partition of the stored image can be the tag information of each partition of the image that was last stored in the time period 8:00-9:00.

[0098] Step 208: If all the partitions in the marking information of the partitions of the image saved last time are dark areas (ie, default markings, indicating that the marking information has not been updated), the saved marking information is updated with the current marking information.

[0099] Step 210 compares the tag information of each partition of the current image with the tag information of each partition of the last saved image to find the target partition. The target partition is the partition whose tag information in the last saved tag information is a bright area tag and whose tag information in the current image is a dark area tag.

[0100] Step 212: If the image acquisition device is about to sleep, and the number of target partitions found one or more times is less than or equal to a preset number threshold, or the ratio of the number of target partitions found one or more times to the number of partitions of the frame image is greater than a preset ratio threshold, the saved marking information is updated with the current marking information.

[0101] In step 214, if the number of target partitions is greater than a preset number threshold, or the ratio of the number of target partitions to the number of partitions of the frame image is greater than a preset ratio threshold, the target area is determined based on the target partitions; otherwise, the target area is determined based on the partition marked as a dark area according to the current marking information.

[0102] Step 216 , calculating the average value of the pixel values ​​of all pixels in the target area to obtain the brightness information of the target area.

[0103] Step 218: Adjust the exposure parameters of the image acquisition device according to the difference between the brightness information of the target area and the corresponding preset brightness information.

[0104] When the target area is determined according to the target partition, there is a foreground object in the frame image; when the target area is determined according to the partition currently marked as a dark area, there is no foreground object in the frame image.

[0105] When there is a foreground object in a frame image, the preset brightness corresponding to the target area brightness includes first preset brightness information; when there is no foreground object in a frame image, the preset brightness corresponding to the target area brightness includes second preset brightness information.

[0106] In addition, for Figure 2 As for the control method embodiment of the image acquisition device shown in FIG, since it is similar to the above Figure 1 The control method embodiments of the image acquisition device shown are basically similar, so the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.

[0107] Based on the same technical concept, one or more embodiments of this specification further provide a control device for an image acquisition device. Figure 3A schematic diagram of the module composition of a control device for an image acquisition device provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the device includes:

[0108] Image sensor 306, used to capture the current scene image;

[0109] Memory 302, used to store marking information of each partition of the historical scene image;

[0110] Processor 304 is used to start the image acquisition device when it is detected that the start condition of the image acquisition device is triggered; mark the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain the marking information of each partition of the current scene image; obtain the marking information of each partition of the corresponding historical scene image based on the acquisition time of the current scene image; determine the partition whose marking information meets the preset marking condition in each partition as the target partition based on the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image; and adjust the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition.

[0111] Optionally, the processor 304 is specifically configured to:

[0112] Marking the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image, including:

[0113] For any partition in each partition, calculate the average value of the pixel values ​​of the partition to obtain the block brightness of the partition;

[0114] Determine whether the brightness of the block is greater than a preset brightness threshold;

[0115] If yes, then determine that the marking information of the partition is a bright area mark;

[0116] If not, it is determined that the marking information of the partition is a dark area mark.

[0117] Optionally, the processor 304 is specifically configured to:

[0118] According to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, a partition whose marking information meets a preset marking condition is determined as a target partition, including:

[0119] For any one of the partitions, determining the marking information of the partition in the marking information of the partitions of the current scene image as the first marking information, and determining the marking information of the partition in the marking information of the partitions of the historical scene image as the second marking information;

[0120] If the first marking information is a dark area marking and the second marking information is a bright area marking, the partition is determined as a target partition.

[0121] Optionally, the processor 304 is specifically configured to:

[0122] Adjust the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition, including:

[0123] Calculating the average of the pixel values ​​of each target partition to obtain first average brightness information;

[0124] Adjust the exposure parameters of the image acquisition device according to the first average brightness information and the first preset brightness information.

[0125] Optionally, the processor 304 is specifically configured to:

[0126] Adjust the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition, including:

[0127] If the number of the determined target partitions meets the preset number condition, then adjusting the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition;

[0128] The preset quantity conditions include:

[0129] The number of the determined target partitions is greater than a preset number threshold, or the ratio of the number of the determined target partitions to the number of each partition of the current scene image is greater than a preset ratio threshold.

[0130] Optionally, the processor 304 is specifically configured to:

[0131] If the number of the determined target partitions does not meet the preset number condition, then calculating the average of the pixel values ​​of each partition marked as a dark area in the current scene image to obtain second average brightness information;

[0132] The exposure parameter of the image acquisition device is adjusted according to the second average brightness information and the second preset brightness information.

[0133] Optionally, the image acquisition device includes an electronic doorbell with an image acquisition function; the processor 304 is further configured to:

[0134] When it is detected that the start condition of the image acquisition device is triggered, the image acquisition device is started and the current scene image is acquired, including:

[0135] When the doorbell button of the electronic doorbell is detected to be clicked, the electronic doorbell is controlled to change from the sleep state to the working state and collect the current scene image;

[0136] or,

[0137] When it is determined that there is at least one foreground object of the electronic doorbell by detecting the infrared information collected by the electronic doorbell, the electronic doorbell is controlled to change from a dormant state to a working state, and a current scene image is collected.

[0138] Optionally, the processor 304 is specifically configured to:

[0139] If the determined number of target partitions does not meet the preset number condition, the marking information of each partition of the historical scene image is updated according to the marking information of each partition of the current scene image.

[0140] The control device of the image acquisition device provided in the embodiment of the present application starts the image acquisition device and acquires the current scene image when detecting that the start condition of the image acquisition device is triggered; marks the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain the marking information of each partition of the current scene image; obtains the marking information of each partition of the corresponding historical scene image based on the acquisition time of the current scene image; determines the partition whose marking information meets the preset marking condition as the target partition according to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image; and adjusts the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition. By comparing the marking information of each partition of the current scene image with the marking information of each partition of the corresponding historical scene image, the embodiment of the present application can determine the position of the foreground object and adjust the exposure parameters, thereby increasing the brightness of the foreground object in a backlit scene and improving the image effect.

[0141] In addition, the aforementioned embodiment of the control device for an image acquisition device is generally similar to the embodiment of the control method for an image acquisition device, so the description is relatively simple. For relevant details, please refer to the description of the embodiment of the control method for an image acquisition device. Furthermore, it should be noted that the various components of the control device for an image acquisition device of the present invention are logically divided according to the functions to be implemented. However, the present invention is not limited thereto, and the various components may be re-divided or re-combined as needed.

[0142] Based on the same technical concept, the embodiment of the present application also provides an electronic device, such as Figure 4 shown. Figure 4 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Figure 4, the electronic device includes a processor, an internal bus, a network interface, a memory and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a control device for the image acquisition device at the logical level. Of course, in addition to software implementation, this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0143] The network interface, processor, and memory can be connected to each other through a bus system. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0144] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include read-only memory and random access memory, and provides instructions and data to the processor. The memory may include high-speed random access memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk storage device.

[0145] The processor is used to execute the program stored in the memory and specifically perform the following:

[0146] When it is detected that the starting condition of the image acquisition device is triggered, the image acquisition device is started and the current scene image is acquired;

[0147] Marking the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image;

[0148] Based on the acquisition time of the current scene image, obtain the label information of each partition of the corresponding historical scene image;

[0149] According to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, a partition whose marking information meets a preset marking condition is determined as a target partition;

[0150] The exposure parameters of the image acquisition device are adjusted according to the pixel values ​​of each target partition.

[0151] The above application Figure 3 The image acquisition device control method performed by the control device of the image acquisition device disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor or by software instructions. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be an audio processing device 1024 (Digital Signal Processor, DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the image acquisition device control method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the control method for the image acquisition device described above.

[0152] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple applications, the electronic device executes the control method of the image acquisition device provided by the aforementioned method embodiment.

[0153] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0154] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0155] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0156] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0157] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1A step that specifies a function in one or more boxes.

[0159] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0160] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0161] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0162] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0163] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A control method for an image acquisition device, characterized in that: include: When detecting that a start condition of the image acquisition device is triggered, starting the image acquisition device and acquiring an image of the current scene; Marking the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image; Based on the acquisition time of the current scene image, obtaining label information of each partition of the corresponding historical scene image; According to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, determining a partition whose marking information meets a preset marking condition among the partitions as a target partition; adjusting the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition; The marking information is a bright area mark or a dark area mark, the bright area mark indicates that the average value of the pixel values ​​of the partition is greater than a preset brightness threshold, and the dark area mark indicates that the average value of the pixel values ​​of the partition is less than or equal to the preset brightness threshold; The preset marking condition is that the marking information of the partition in the historical scene image is the bright area mark, and the marking information of the corresponding partition in the current scene image is the dark area mark.

2. The method according to claim 1, characterized in that The step of marking the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image includes: For any one of the partitions, calculating an average value of pixel values ​​of the partition to obtain a block brightness of the partition; Determining whether the brightness of the block is greater than a preset brightness threshold; If yes, then determine that the marking information of the partition is a bright area mark; If not, it is determined that the marking information of the partition is a dark area mark.

3. The method according to claim 2, characterized in that The determining, based on the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, a partition whose marking information satisfies a preset marking condition as a target partition includes: For any of the partitions, determining the marking information of the partition in the marking information of the partitions of the current scene image as first marking information, and determining the marking information of the partition in the marking information of the partitions of the historical scene image as second marking information; If the first marking information is the dark area mark and the second marking information is the bright area mark, the partition is determined as the target partition.

4. The method according to claim 1, wherein The step of adjusting the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition includes: Calculating an average of pixel values ​​of each of the target subareas to obtain first average brightness information; Adjust the exposure parameters of the image acquisition device according to the first average brightness information and the first preset brightness information.

5. The method according to claim 1, wherein The step of adjusting the exposure parameters of the image acquisition device according to the pixel values ​​of each target partition includes: If the number of the determined target partitions meets a preset number condition, adjusting the exposure parameters of the image acquisition device according to the pixel values ​​of each of the target partitions; The preset quantity conditions include: The number of the determined target partitions is greater than a preset number threshold, or the ratio of the number of the determined target partitions to the number of each partition of the current scene image is greater than a preset ratio threshold.

6. The method according to claim 5, characterized in that After the step of determining, according to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, a partition whose marking information satisfies a preset marking condition as a target partition, the method further includes: If the number of the determined target partitions does not meet the preset number condition, calculating the average of the pixel values ​​of each partition marked as a dark area in the current scene image to obtain second average brightness information; Adjust the exposure parameters of the image acquisition device according to the second average brightness information and the second preset brightness information.

7. The method according to claim 1, characterized in that The image acquisition device includes an electronic doorbell with an image acquisition function; when detecting that a start condition of the image acquisition device is triggered, starting the image acquisition device and acquiring a current scene image, including: When detecting that the doorbell button of the electronic doorbell is clicked, controlling the electronic doorbell to change from a dormant state to an active state, and capturing the current scene image; or, When it is determined that there is at least one foreground object of the electronic doorbell by detecting the infrared information collected by the electronic doorbell, the electronic doorbell is controlled to change from a dormant state to an active state, and the current scene image is collected.

8. The method according to claim 5, characterized in that After the step of determining, according to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, a partition whose marking information satisfies a preset marking condition as a target partition, the method further includes: If the determined number of target partitions does not meet the preset number condition, the marking information of each partition of the historical scene image is updated according to the marking information of each partition of the current scene image.

9. A control device for an image acquisition device, characterized in that: include: Image sensor, used to collect the current scene image; A memory, used for storing marking information of each partition of the historical scene image; a processor, configured to start the image acquisition device when detecting that a start condition of the image acquisition device is triggered; Marking the partitions of the current scene image according to the pixel values ​​of the current scene image to obtain marking information of each partition of the current scene image; Based on the acquisition time of the current scene image, obtaining label information of each partition of the corresponding historical scene image; According to the marking information of each partition of the current scene image and the marking information of each partition of the historical scene image, a partition whose marking information meets a preset marking condition is determined as a target partition; according to the pixel value of each target partition, an exposure parameter of the image acquisition device is adjusted; The marking information is a bright area mark or a dark area mark, the bright area mark indicates that the average value of the pixel values ​​of the partition is greater than a preset brightness threshold, and the dark area mark indicates that the average value of the pixel values ​​of the partition is less than or equal to the preset brightness threshold; The preset marking condition is that the marking information of the partition in the historical scene image is the bright area mark, and the marking information of the corresponding partition in the current scene image is the dark area mark.

10. An electronic device, characterized in that: include: A processor, a memory electrically connected to the processor; the memory stores a computer program, and the processor is configured to call and execute the computer program from the memory to perform the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Patent Citations

  • Method and device for determining brightness of endoscope image and related equipment

    CN111861928A

  • Endoscope exposure method and device and computer readable storage medium

    CN112911165A