Image processing method and device, electronic equipment and computer readable storage medium

By dividing the image frame based on the sound source location information and calculating the photometric weights for brightness adjustment, the problems of high monitoring cost and poor quality are solved, and dynamic brightness adjustment of the sound source area is realized, thereby improving the quality of video surveillance.

CN114913219BActive Publication Date: 2025-11-18ZHEJIANG UNIVIEW TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110176418.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-09
Publication Date
2025-11-18
Estimated Expiration
2041-02-09

AI Technical Summary

Technical Problem

Existing monitoring methods are costly and have poor overall video surveillance quality, especially when detecting moving objects or sound sources in the frame, as they cannot effectively adjust the brightness.

Method used

The target area is determined based on the location information of the sound source, and the brightness is dynamically adjusted according to the brightness information. This includes dividing the image into M*N blocks and calculating the photometric weights to adjust the brightness.

Benefits of technology

It enables dynamic brightness adjustment of the sound source area in the image, improving video surveillance quality, ensuring appropriate brightness in the sound source area, shortening the brightness adjustment time, and enhancing the monitoring effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114913219B_ABST
    Figure CN114913219B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method and device, electronic equipment and computer readable storage medium, and relate to the field of image processing. The method comprises: determining a target region of a sound source in an image frame based on position information of the sound source; determining brightness information of the target region; and adjusting the brightness information when it is detected that the brightness information does not satisfy a brightness information threshold. In this way, the target region of the sound source in the image frame is first determined based on the position information of the sound source, then the brightness information of the target region is obtained, and it is detected whether the brightness information of the target region satisfies the brightness information threshold. If not, the brightness information of the target region can be adjusted, thereby achieving dynamic brightness adjustment of the region of the sound source in the image frame, ensuring that the brightness of the region of the sound source is appropriate, and thereby improving the quality of video monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to an image processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the increasing awareness of safety, the security industry has developed rapidly in recent years. All kinds of surveillance cameras have quickly spread to the streets and alleys. The rapid popularization of surveillance has led people to place higher demands on surveillance, and people urgently need to see more clearly and more widely.

[0003] Apart from expensive PTZ cameras and linked cameras, most civilian cameras currently available can only perform routine monitoring of the entire screen. This monitoring method easily overlooks key monitoring objects such as moving objects and sound-emitting objects in the screen.

[0004] In recent years, although methods such as face detection and human detection have been able to make the monitored subject clearer through intelligent detection and parameter adjustment, this method requires information provided by intelligent modules, which is costly. Moreover, this method only optimizes the clarity of local areas, resulting in poor overall video surveillance quality. Summary of the Invention

[0005] This application provides an image processing method, apparatus, electronic device, and computer-readable storage medium, which can solve the problems of high cost and poor overall video surveillance quality in existing monitoring methods. The technical solution is as follows:

[0006] According to one aspect of this application, an image processing method is provided, the method comprising:

[0007] The target area of ​​the sound source in the image is determined based on the location information of the sound source.

[0008] The brightness information of the target area is determined;

[0009] When the brightness information of the target area is detected to be inconsistent with the brightness information threshold, the brightness information of the target area is adjusted.

[0010] In one or more embodiments, before the step of detecting that the brightness information of the target area does not meet the brightness information threshold, the method further includes:

[0011] The detection checks whether a preset time interval has elapsed after the target area has been identified.

[0012] If not, then detect whether the brightness information of the target area meets the brightness information threshold; if yes, then repeatedly execute the process of determining the target area of ​​the sound source in the image based on the location information of the sound source, determining the brightness information of the target area, and detecting whether a preset time interval has elapsed after determining the target area, until it is detected that no preset time interval has elapsed after determining the target area.

[0013] In one or more embodiments, determining the target region of the sound source in the video frame based on the sound source's location information includes:

[0014] Based on the location information of the sound source, the horizontal distance between the sound source and the image acquisition device is determined, and the image frame is divided into M*N blocks on average; wherein, the image acquisition device is used to acquire the image frame, and M and N are positive integers;

[0015] Centered on the sound source, a target region including at least one target block is determined based on the horizontal distance, M, and N.

[0016] In one or more embodiments, determining the brightness information of the target region includes:

[0017] Obtain the brightness information corresponding to at least one target block in the target area;

[0018] The average brightness information is calculated based on the brightness information corresponding to each of the at least one target block, and is used as the brightness information of the target area.

[0019] In one or more embodiments, adjusting the brightness information of the target area when it is detected that the brightness information of the target area does not meet the brightness information threshold includes:

[0020] When the brightness information of the target area is detected to be no more than the minimum brightness information threshold, the first photometric weight corresponding to at least one target block in the target area is calculated based on the brightness information of the target area and the minimum brightness information.

[0021] The brightness of the at least one target region is adjusted based on each of the first photometric weights.

[0022] In one or more embodiments, adjusting the brightness information of the target area when it is detected that the brightness information of the target area does not meet the brightness information threshold includes:

[0023] When the brightness information of the target area is detected to exceed the highest brightness information threshold, the second photometric weight corresponding to at least one target block in the target area is calculated based on the brightness information of the target area and the highest brightness information threshold.

[0024] The brightness of the at least one target region is adjusted based on each of the second photometric weights.

[0025] According to another aspect of this application, an image processing apparatus is provided, the apparatus comprising:

[0026] The target region determination module is used to determine the target region of the sound source in the image based on the location information of the sound source;

[0027] A brightness information determination module is used to determine the brightness information of the target area;

[0028] The brightness adjustment module is used to adjust the brightness information of the target area when it is detected that the brightness information of the target area does not meet the brightness information threshold.

[0029] In one or more embodiments, it further includes:

[0030] The time detection module is used to detect whether a preset time interval has elapsed after the target area has been determined, before the brightness information of the target area is detected to be insufficient to meet the brightness information threshold.

[0031] The brightness detection module is used to detect whether the brightness information meets the brightness information threshold after the preset time interval has elapsed since the target area has been determined.

[0032] After the target area is determined, the preset time interval is elapsed, and the target area determination module, the brightness information determination module, and the brightness detection module are repeatedly called until it is detected that no preset time interval has elapsed after the target area is determined.

[0033] In one or more embodiments, the target region determination module includes:

[0034] The first processing submodule is used to determine the horizontal distance between the sound source and the image acquisition device based on the location information of the sound source, and to divide the image frame into M*N blocks on average; wherein the image acquisition device is used to acquire the image frame, and M and N are positive integers;

[0035] The second processing submodule is used to determine a target region, including at least one target block, centered on the sound source and based on the horizontal distance, M, and N.

[0036] In one or more embodiments, the brightness information determination module includes:

[0037] The acquisition submodule is used to acquire the brightness information corresponding to at least one target block in the target region.

[0038] The calculation submodule is used to calculate the average brightness information based on the brightness information corresponding to each of the at least one target block, and use it as the brightness information of the target area.

[0039] In one or more embodiments, the brightness adjustment module includes:

[0040] The photometric weight determination submodule is used to calculate the first photometric weight corresponding to at least one target block in the target area based on the brightness information of the target area and the minimum brightness information when the brightness information of the target area is detected to be no more than the minimum brightness information threshold.

[0041] The adjustment submodule is used to adjust the brightness of the at least one target area based on each of the first photometric weights.

[0042] In one or more embodiments, the brightness adjustment module includes:

[0043] The photometric weight determination submodule is also used to calculate the second photometric weight corresponding to at least one target block in the target area based on the brightness information of the target area and the highest brightness information threshold when the brightness information of the target area is detected to exceed the highest brightness information threshold.

[0044] The adjustment submodule is also used to adjust the brightness of the at least one target area based on each of the second photometric weights.

[0045] According to another aspect of this application, an electronic device is provided, the electronic device comprising:

[0046] One or more processors;

[0047] Memory;

[0048] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform operations corresponding to the image processing method shown in the first aspect of this application.

[0049] According to another aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the image processing method shown in the first aspect of this application.

[0050] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various implementations of the first aspect described above.

[0051] The beneficial effects of the technical solution provided in this application are:

[0052] In this embodiment of the invention, the target area of ​​the sound source in the image is determined based on the location information of the sound source. Then, the brightness information of the target area is determined. When the brightness information does not meet the brightness information threshold, the brightness information is adjusted. Thus, by first determining the target area of ​​the sound source in the image based on its location information, then acquiring the brightness information of the target area, and detecting whether the brightness information of the target area meets the brightness information threshold, and if not, adjusting the brightness information of the target area, dynamic brightness adjustment of the sound source area in the image is achieved, ensuring appropriate brightness of the sound source area and thereby improving the quality of video surveillance. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0054] Figure 1 A flowchart illustrating an image processing method provided in this application embodiment. Figure 1 ;

[0055] Figure 2 A schematic diagram illustrating the segmentation effect of an image frame provided in an embodiment of this application;

[0056] Figure 3 Logical illustration provided for embodiments of this application Figure 1 ;

[0057] Figure 4 A flowchart illustrating an image processing method provided in this application embodiment. Figure 2 ;

[0058] Figure 5 Logical illustration provided for embodiments of this application Figure 2 ;

[0059] Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application;

[0060] Figure 7This is a schematic diagram of the structure of an electronic device for image processing provided in an embodiment of this application. Detailed Implementation

[0061] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0062] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0064] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0065] This invention provides an image processing method, such as... Figure 1 As shown, the method includes:

[0066] Step S101: Determine the target area of ​​the sound source in the image based on the location information of the sound source;

[0067] The images can be captured by an image acquisition device and then displayed on a display device. For example, images can be captured by a camera and then displayed on a screen. What is displayed on the screen is the image.

[0068] Once the image is obtained, the target area of ​​the sound source in the image can be determined based on the location information of the sound source.

[0069] It should be noted that the location information of the sound source can be determined by a sound source localization device, which can then determine the distance between the sound source and the sound source localization device based on the sound source's location information. The sound source localization device and the image acquisition device can be separate devices deployed together, or they can be integrated into a single device. In this case, the distance between the sound source and the sound source localization device is almost the same as the distance between the sound source and the image acquisition device. Of course, other methods can also be used to deploy the sound source localization device and the image acquisition device. Any method that achieves the above objectives is applicable to the embodiments of the present invention, and the embodiments of the present invention do not impose any limitations on this.

[0070] In one embodiment of the present invention, determining the target area of ​​the sound source in the video frame based on the location information of the sound source includes:

[0071] Based on the location information of the sound source, the horizontal distance between the sound source and the image acquisition device is determined, and the image is divided into M*N blocks on average; where the image acquisition device is used to acquire the image, and M and N are positive integers.

[0072] Centered on the sound source, a target region including at least one target block is determined based on the horizontal distance, M, and N.

[0073] Specifically, the location information of the sound source includes, but is not limited to, the direction and angle of the sound source. Then, based on the location information, the horizontal distance between the sound source and the sound source localization device is calculated, denoted as D. The image frame is then divided into M*N blocks, where M and N are positive integers. Since the sound source localization device and the image acquisition device are deployed together, the horizontal distance between the sound source and the sound source localization device can be used as the horizontal distance between the sound source and the image acquisition device.

[0074] Then, centered on the sound source, where... 1 target block is defined as the target region, where μ is a positive integer. and Round off according to the nearest integer. For example... Figure 2 As shown, the image is divided into M*N blocks. After determining the horizontal distance between the sound source and the image acquisition device, the target area is determined using the above formula, with the sound source as the center. The target area includes the target blocks.

[0075] Step S102: Determine the brightness information of the target area;

[0076] Once the target area is identified, its brightness information can be determined to facilitate subsequent brightness detection.

[0077] In one embodiment of the present invention, determining the brightness information of the target area includes:

[0078] Obtain the brightness information corresponding to at least one target block in the target area;

[0079] The average brightness information is calculated based on the brightness information corresponding to at least one target block, and is used as the brightness information of the target area.

[0080] Specifically, after the image is divided into M*N blocks, the brightness information corresponding to each block can be directly obtained, denoted as L. 11 L 12 , ..., L 1N , ..., L MN Then, at least one target block included in the target area is obtained from each brightness information.

[0081] In this embodiment of the invention, after dividing the area into M*N blocks, a photometric weight can be assigned to each block, denoted as W. 11 W 12 ,…,W 1N ,…,W MN .

[0082] Therefore, when calculating the brightness information of the target area, the brightness information of each target block can be multiplied by its corresponding photometric weight to obtain the final brightness information of each target block. Then, the final brightness information of each block is added together to obtain the total brightness information of the target area. Finally, the total brightness information is divided by the number of target blocks to obtain the average brightness information of the target area, denoted as L. D For example, L D =(L 11 *W 11 +L 12 *W 12 +L 21 *W 21 +L 22 *W 22 ) / 4.

[0083] Of course, instead of using photometric weighting, the brightness information of each target block can be directly added together to obtain the total brightness information of the target area. For example, L D =(L 11 +L 12 +L 21 +L 22 ) / 4. In practical applications, adjustments can be made according to actual needs, and the embodiments of the present invention do not impose any limitations on this.

[0084] Step S103: When the brightness information of the target area is detected to be inconsistent with the brightness information threshold, the brightness information of the target area is adjusted.

[0085] The luminance information threshold can be a luminance information range, including a minimum luminance information threshold and a maximum luminance information threshold, denoted as L, respectively. L and L H In other words, during detection, it is possible to detect whether the brightness information of the target area does not exceed the minimum brightness information, or whether the brightness information of the target area exceeds the maximum brightness information.

[0086] In one embodiment of the present invention, when the brightness information of the target area is detected to not meet the brightness information threshold, the brightness information of the target area is adjusted, including:

[0087] When the brightness information of the target area is detected to be no more than the minimum brightness information threshold, the first photometric weight corresponding to at least one target block in the target area is calculated based on the brightness information and the minimum brightness information of the target area.

[0088] The brightness of at least one target area is adjusted based on each first photometric weight.

[0089] Specifically, it detects whether the brightness information of the target area does not exceed the minimum brightness information threshold. If so, it then bases the brightness information L of the target area on... D and minimum brightness information threshold L L The first metering weight for each target block is calculated using the following formula:

[0090] W MN '=W MN +|L L -L D |*λ;

[0091] Among them, W MN W represents the original photometric weights for each target block. MN ' is the first photometric weight calculated for each target block, and λ is the preset step size adjustment coefficient, 0 < λ ≤ 1.

[0092] After determining the first metering weight corresponding to each target block, the brightness of each target block is adjusted based on each first metering weight. This brightness adjustment includes, but is not limited to, adjusting the exposure value of the image acquisition device, such as increasing the exposure value of the camera.

[0093] In one embodiment of the present invention, when the brightness information of the target area is detected to not meet the brightness information threshold, the brightness information of the target area is adjusted, including:

[0094] When the brightness information of the target area is detected to exceed the maximum brightness information threshold, the second photometric weight corresponding to at least one target block in the target area is calculated based on the brightness information of the target area and the maximum brightness information threshold.

[0095] The brightness of at least one target area is adjusted based on each of the second photometric weights.

[0096] Specifically, it detects whether the brightness information of the target area exceeds the maximum brightness information threshold. If so, it then bases the brightness information L of the target area on... D and the highest brightness information threshold L H The second metering weight for each target block is calculated using the following formula:

[0097] W MN =W MN -|L H -L D |*λ;

[0098] Among them, W MN W represents the original photometric weights for each target block. MN " is the second photometric weight calculated for each target block, and λ is the preset step size adjustment coefficient, 0<λ≤1.

[0099] After determining the second metering weight corresponding to each target block, the brightness of each target block is adjusted based on each second metering weight. This brightness adjustment includes, but is not limited to, adjusting the exposure value of the image acquisition device, such as reducing the exposure value of the camera.

[0100] The above method can improve the accuracy of photometric weighting, so that when the brightness information L of the target area... D With L L or L H When the difference is large, a faster brightness adjustment can be made, thus shortening the brightness adjustment time and making the image brightness change more quickly; when L D With L L or L H When the difference is small, a slower brightness adjustment can be made to prevent the adjustment from being too large and causing L... D The inability to accurately reach the optimal brightness range necessitates repeated adjustments.

[0101] For ease of understanding, the embodiments of the present invention will describe the logical flow of each of the above steps, such as... Figure 3 As shown, it includes:

[0102] 1) Divide the image into M*N blocks;

[0103] 2) Determine the horizontal distance between the sound source and the image acquisition device based on the location information of the sound source;

[0104] 3) Identify the target region in the image, centered on the sound source, that includes at least one target block;

[0105] 4) Determine the brightness information L of the target area. D ;

[0106] 5) Detect whether the brightness information of the target area is within the preset brightness information range, i.e., L L ≤L D ≤L H If yes, then end the process; otherwise, proceed to step 6).

[0107] 6) Detect L D <L L Is it true, or, L H <L D Whether it is true or not, if L D <L L If L H <L D Then execute 9);

[0108] 7) Calculate the first photometric weight corresponding to at least one target block in the target region;

[0109] 8) Adjust the brightness of at least one target block based on each first photometric weight, and then execute 4) after the adjustment is completed;

[0110] 9) Calculate the second photometric weights corresponding to at least one target block in the target region;

[0111] 10) Adjust the brightness of at least one target block based on each second photometric weight, and execute step 4 after the adjustment is completed.

[0112] In this embodiment of the invention, the target area of ​​the sound source in the image is determined based on the location information of the sound source. Then, the brightness information of the target area is determined. When the brightness information of the target area does not meet the brightness information threshold, the brightness information of the target area is adjusted. Thus, by first determining the target area of ​​the sound source in the image based on its location information, then acquiring the brightness information of the target area, and detecting whether the brightness information of the target area meets the brightness information threshold, and if not, adjusting the brightness information of the target area, dynamic brightness adjustment of the sound source area in the image is achieved, ensuring appropriate brightness of the sound source area and thereby improving the quality of video surveillance.

[0113] Furthermore, by dynamically adjusting the brightness using the brightness information and brightness range of the target area, the accuracy of the metering weight can be improved. In this way, when the difference between the brightness information of the target area and the minimum or maximum brightness information threshold is large, a faster brightness adjustment can be performed, thereby shortening the brightness adjustment time and making the image brightness change more quickly. When the difference between the brightness information and the minimum or maximum brightness information threshold is small, a slower brightness adjustment can be performed to prevent the adjustment range from being too large, which would cause the brightness information to fail to accurately reach the optimal brightness range and require repeated adjustments.

[0114] This invention provides an image processing method, such as... Figure 4 As shown, the method includes:

[0115] Step S401: Determine the target area of ​​the sound source in the image based on the location information of the sound source;

[0116] Step S402: Determine the brightness information of the target area;

[0117] The principles of steps S401 to S402 are the same as those of steps S101 to S102. For details, please refer to steps S101 to S102. They will not be repeated here.

[0118] Step S403: Detect whether a preset time interval has elapsed after the target area has been determined;

[0119] Step S404: If not, then detect whether the brightness information of the target area meets the brightness information threshold; if yes, then repeat the process of determining the target area of ​​the sound source in the image based on the location information of the sound source, determining the brightness information of the target area, and detecting whether a preset time interval has passed after the target area is determined, until it is detected that no preset time interval has passed after the target area is determined.

[0120] In practical applications, since the sound source may be constantly moving, the target area in the image can be refreshed before detecting the brightness information of the target area to check if it has changed. Specifically, when the target area is determined, the time point is recorded, and then it is checked whether a preset time interval has elapsed since that time point. If not, then it is checked whether the brightness information of the target area meets the brightness information threshold; if so, then the process of determining the target area of ​​the sound source in the image based on the sound source's location information, determining the brightness information of the target area, and checking whether a preset time interval has elapsed since the target area was determined is repeated until it is detected that no preset time interval has elapsed since the target area was determined.

[0121] Step S405: When the brightness information of the target area is detected to be inconsistent with the brightness information threshold, the brightness information of the target area is adjusted.

[0122] Step S405 is based on the same principle as step S103, and can be referred to step S103 for details, which will not be repeated here.

[0123] For ease of understanding, the embodiments of the present invention will describe the logical flow of each of the above steps, such as... Figure 5 As shown, it includes:

[0124] 1) Divide the image into M*N blocks;

[0125] 2) Determine the horizontal distance between the sound source and the image acquisition device based on the location information of the sound source;

[0126] 3) Identify the target region in the image, centered on the sound source, that includes at least one target block;

[0127] 4) Determine the brightness information L of the target area. D ;

[0128] 5) Check if a preset time interval has elapsed after the target area has been identified. If not, proceed to step 6); if so, proceed to step 2.

[0129] 6) Detect whether the brightness information of the target area is within the preset brightness information range, i.e., L L ≤L D ≤L H If yes, then end the process; otherwise, proceed to step 7).

[0130] 7) Detect L D <L L Is it true, or, L H <L D Whether it is true or not, if L D <L L If L H <L D If so, then execute 10);

[0131] 8) Calculate the first photometric weight corresponding to at least one target block in the target region;

[0132] 9) Adjust the brightness of at least one target block based on each first photometric weight, and then execute 4) after the adjustment is completed;

[0133] 10) Calculate the second photometric weights corresponding to at least one target block in the target region;

[0134] 11) Adjust the brightness of at least one target block based on each second photometric weight, and execute step 4 after the adjustment is completed.

[0135] In this embodiment of the invention, the target area of ​​the sound source in the image is determined based on the location information of the sound source. Then, the brightness information of the target area is determined. When the brightness information does not meet the brightness information threshold, the brightness information is adjusted. Thus, by first determining the target area of ​​the sound source in the image based on its location information, then acquiring the brightness information of the target area, and detecting whether the brightness information of the target area meets the brightness information threshold, and if not, adjusting the brightness information of the target area, dynamic brightness adjustment of the sound source area in the image is achieved, ensuring appropriate brightness of the sound source area and thereby improving the quality of video surveillance.

[0136] Furthermore, by dynamically adjusting the brightness using the brightness information and brightness range of the target area, the accuracy of the metering weight can be improved. In this way, when the difference between the brightness information of the target area and the minimum or maximum brightness information threshold is large, a faster brightness adjustment can be performed, thereby shortening the brightness adjustment time and making the image brightness change more quickly. When the difference between the brightness information and the minimum or maximum brightness information threshold is small, a slower brightness adjustment can be performed to prevent the adjustment range from being too large, which would cause the brightness information to fail to accurately reach the optimal brightness range and require repeated adjustments.

[0137] Furthermore, by detecting whether a preset time interval has elapsed after the target area has been identified, the area of ​​the sound source in the image is continuously refreshed. At the same time, combined with dynamic brightness adjustment, the target area is dynamically adjusted in real time, thereby enabling dynamic and focused monitoring of the sound source.

[0138] Figure 6 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this application, as shown below. Figure 7 As shown, the apparatus of this embodiment may include:

[0139] The target region determination module 601 is used to determine the target region of the sound source in the image based on the location information of the sound source.

[0140] Brightness information determination module 602 is used to determine the brightness information of the target area;

[0141] The brightness adjustment module 603 is used to adjust the brightness information of the target area when the brightness information of the target area is detected to be less than the brightness information threshold.

[0142] In one embodiment of the present invention, it further includes:

[0143] The time detection module is used to detect whether a preset time interval has elapsed after the target area has been determined, before the brightness information of the target area is detected to be less than the brightness information threshold.

[0144] The brightness detection module is used to detect whether the brightness information of the target area meets the brightness information threshold after the target area has been determined and no preset time interval has elapsed.

[0145] After the target area is determined, the target area determination module, brightness information determination module, and brightness detection module are repeatedly called after a preset time interval until it is detected that no preset time interval has elapsed after the target area has been determined.

[0146] In one embodiment of the present invention, the target region determination module includes:

[0147] The first processing submodule is used to determine the horizontal distance between the sound source and the image acquisition device based on the location information of the sound source, and to divide the image frame into M*N blocks on average; wherein, the image acquisition device is used to acquire the image frame, and M and N are positive integers;

[0148] The second processing submodule is used to determine a target region, including at least one target block, based on the horizontal distance M and N, with the sound source as the center.

[0149] In one embodiment of the present invention, the brightness information determination module includes:

[0150] The acquisition submodule is used to acquire the brightness information corresponding to at least one target block in the target area.

[0151] The calculation submodule is used to calculate the average brightness information based on the brightness information corresponding to at least one target block, and use it as the brightness information of the target area.

[0152] In one embodiment of the present invention, the brightness adjustment module includes:

[0153] The photometric weight determination submodule is used to calculate the first photometric weight corresponding to at least one target block in the target area based on the brightness information and the minimum brightness information of the target area when the brightness information of the target area is detected to be no more than the minimum brightness information threshold.

[0154] The adjustment submodule is used to adjust the brightness of at least one target area based on each first photometric weight.

[0155] In one embodiment of the present invention, the brightness adjustment module includes:

[0156] The photometric weight determination submodule is also used to calculate the second photometric weight corresponding to at least one target block in the target area based on the brightness information of the target area and the maximum brightness information threshold when the brightness information of the target area is detected to exceed the maximum brightness information threshold.

[0157] The adjustment submodule is also used to adjust the brightness of at least one target area based on each of the second photometric weights.

[0158] The image processing apparatus of this embodiment can execute the image processing method shown in the foregoing embodiments of this application, and its implementation principle is similar, so it will not be described again here.

[0159] In this embodiment of the invention, the target area of ​​the sound source in the image is determined based on the location information of the sound source. Then, the brightness information of the target area is determined. When the brightness information does not meet the brightness information threshold, the brightness information is adjusted. Thus, by first determining the target area of ​​the sound source in the image based on its location information, then acquiring the brightness information of the target area, and detecting whether the brightness information of the target area meets the brightness information threshold, and if not, adjusting the brightness information of the target area, dynamic brightness adjustment of the sound source area in the image is achieved, ensuring appropriate brightness of the sound source area and thereby improving the quality of video surveillance.

[0160] Furthermore, by dynamically adjusting the brightness using the brightness information and brightness range of the target area, the accuracy of the metering weight can be improved. In this way, when the difference between the brightness information of the target area and the minimum or maximum brightness information threshold is large, a faster brightness adjustment can be performed, thereby shortening the brightness adjustment time and making the image brightness change more quickly. When the difference between the brightness information and the minimum or maximum brightness information threshold is small, a slower brightness adjustment can be performed to prevent the adjustment range from being too large, which would cause the brightness information to fail to accurately reach the optimal brightness range and require repeated adjustments.

[0161] Furthermore, by detecting whether a preset time interval has elapsed after the target area has been identified, the area of ​​the sound source in the image is continuously refreshed. At the same time, combined with dynamic brightness adjustment, the target area is dynamically adjusted in real time, thereby enabling dynamic and focused monitoring of the sound source.

[0162] This application provides an electronic device comprising: a memory and a processor; at least one program stored in the memory, which, when executed by the processor, can achieve the following compared to existing technologies: In this embodiment, the target area of ​​the sound source in the image is determined based on the location information of the sound source, and then the brightness information of the target area is determined. When the brightness information is detected to not meet a brightness information threshold, the brightness information is adjusted. Thus, by first determining the target area of ​​the sound source in the image based on the location information of the sound source, then obtaining the brightness information of the target area, and detecting whether the brightness information of the target area meets the brightness information threshold, if not, the brightness information of the target area can be adjusted. This achieves dynamic brightness adjustment of the sound source area in the image, ensuring appropriate brightness of the sound source area, thereby improving the quality of video surveillance.

[0163] In one alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7 The illustrated electronic device 7000 includes a processor 7001 and a memory 7003. The processor 7001 and the memory 7003 are connected, for example, via a bus 7002. Optionally, the electronic device 7000 may further include a transceiver 7004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 7004 is not limited to one type, and the structure of the electronic device 7000 does not constitute a limitation on the embodiments of this application.

[0164] Processor 7001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 7001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0165] Bus 7002 may include a pathway for transmitting information between the aforementioned components. Bus 7002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 7002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0166] The memory 7003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0167] The memory 7003 stores application code (computer program) that executes the solution of this application, and its execution is controlled by the processor 7001. The processor 7001 executes the application code stored in the memory 7003 to implement the content shown in the foregoing method embodiments.

[0168] Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers.

[0169] This application provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.

[0170] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0171] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An image processing method, characterized in that, include: The target area of ​​the sound source in the image is determined based on the location information of the sound source. The brightness information of the target area is determined; When the brightness information of the target area is detected to be inconsistent with the brightness information threshold, the brightness information of the target area is adjusted. The determination of the target area of ​​the sound source in the video frame based on the sound source's location information includes: Based on the location information of the sound source, the horizontal distance D between the sound source and the image acquisition device is determined, and the image frame is divided into M equal parts. N blocks; wherein, the image acquisition device is used to acquire the image frame, and M and N are positive integers; Centered on the sound source, the area (μ) M / D)×(μ N / D) target blocks are selected as the target region, where μ is a positive integer. M / D and μ N / D is rounded to the nearest integer.

2. The image processing method according to claim 1, characterized in that, Before the step of detecting that the brightness information of the target area does not meet the brightness information threshold, the method further includes: The detection checks whether a preset time interval has elapsed after the target area has been identified. If not, then detect whether the brightness information of the target area meets the brightness information threshold; if yes, then repeatedly execute the process of determining the target area of ​​the sound source in the image based on the location information of the sound source, determining the brightness information of the target area, and detecting whether a preset time interval has elapsed after determining the target area, until it is detected that no preset time interval has elapsed after determining the target area.

3. The image processing method according to claim 1 or 2, characterized in that, Determining the brightness information of the target area includes: Obtain the brightness information corresponding to at least one target block in the target area; The average brightness information is calculated based on the brightness information corresponding to each of the at least one target block, and is used as the brightness information of the target area.

4. The image processing method according to claim 1, characterized in that, When the brightness information of the target area is detected to not meet the brightness information threshold, the brightness information of the target area is adjusted, including: When the brightness information of the target area is detected to be no more than the minimum brightness information threshold, the first photometric weight corresponding to at least one target block in the target area is calculated based on the brightness information of the target area and the minimum brightness information. The brightness of the at least one target region is adjusted based on each of the first photometric weights.

5. The image processing method according to claim 1, characterized in that, When the brightness information of the target area is detected to not meet the brightness information threshold, the brightness information of the target area is adjusted, including: When the brightness information of the target area is detected to exceed the highest brightness information threshold, the second photometric weight corresponding to at least one target block in the target area is calculated based on the brightness information of the target area and the highest brightness information threshold. The brightness of the at least one target region is adjusted based on each of the second photometric weights.

6. An image processing apparatus, characterized in that, include: The target region determination module is used to determine the target region of the sound source in the image based on the location information of the sound source; A brightness information determination module is used to determine the brightness information of the target area; A brightness adjustment module is used to adjust the brightness information of the target area when the brightness information of the target area is detected to be less than the brightness information threshold. The determination of the target area of ​​the sound source in the video frame based on the sound source's location information includes: Based on the location information of the sound source, the horizontal distance D between the sound source and the image acquisition device is determined, and the image frame is divided into M equal parts. N blocks; wherein, the image acquisition device is used to acquire the image frame, and M and N are positive integers; Centered on the sound source, the area (μ) M / D)×(μ N / D) target blocks are selected as the target region, where μ is a positive integer. M / D and μ N / D is rounded to the nearest integer.

7. The image processing apparatus according to claim 6, characterized in that, Also includes: The time detection module is used to detect whether a preset time interval has elapsed after the target area has been determined, before the brightness information of the target area is detected to be insufficient to meet the brightness information threshold. The brightness detection module is used to detect whether the brightness information meets the brightness information threshold after the preset time interval has elapsed since the target area has been determined. After the target area is determined, the preset time interval is elapsed, and the target area determination module, the brightness information determination module, and the brightness detection module are repeatedly called until it is detected that no preset time interval has elapsed after the target area is determined.

8. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to: perform the image processing method according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the image processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Exposure control method, system and equipment for inhibiting motion bright light source

    CN110708472A

  • Whistling vehicle automatic identification device and method based on sound array

    CN111243283A

  • System and method for calculating longitude and latitude of any position of camera video picture

    CN111385467A