Automatic exposure control method and device

By sub-region division and weight allocation of the initial image of the camera in extreme aerial motion, the automatic exposure statistics value is calculated and the exposure parameters are adjusted, the problem of insufficient exposure of ground targets when the camera exists at the same time in the sky and the ground is achieved, and clear ground is achieved Target display.

CN114140449BActive Publication Date: 2025-02-07BRIGATES MICROELECTRONICS (KUNSHAN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111482126.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-02-07
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

In extreme air movement, it is difficult for the camera to automatically distinguish the sky from the ground when the sky is higher than the ground brightness, resulting in insufficient exposure of the ground targets and being unable to see clearly.

Method used

By acquiring the initial image and dividing it into several sub-regions, the first weight is allocated according to the positional relationship between the sub-regions and the boundary line, the automatic exposure statistics value is calculated based on the pixel value and weight of the sub-regions, and the exposure time, gain and aperture are adjusted to ensure the ground target. Get the right exposure.

Benefits of technology

It realizes automatic exposure control when the sky and the ground are present at the same time, ensuring that the ground targets are clearly visible and improving the shooting effect of the camera in extreme aerial motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140449B_ABST
    Figure CN114140449B_ABST
Patent Text Reader

Abstract

A method and device for controlling automatic exposure, the method comprising: obtaining an initial image, the initial image comprising a first area, a second area and a dividing line between the first area and the second area; dividing the initial image into a plurality of sub-areas; assigning a first weight to each sub-area according to a positional relationship between each sub-area and the dividing line; obtaining an automatic exposure statistical value according to a pixel value of each sub-area and the first weight assigned to each sub-area; and adjusting the exposure according to a difference between the automatic exposure statistical value and a preset value. The method can clearly see a darker ground area target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to an automatic exposure control method and device. Background Art

[0002] Cameras used in aerial extreme sports, such as paragliding and wing flying, often encounter scenes that include the sky, the ground, and the horizon. For safety reasons, the camera needs to see the targets on the ground clearly to assist athletes in making direction adjustments. However, when the sky brightness is much higher than the ground brightness, the ground targets will be underexposed, making them too dark to be seen clearly.

[0003] Therefore, it is necessary to provide a solution that enables the camera to automatically distinguish between the sky and the ground, and then use automatic exposure control to help see the ground targets clearly. Summary of the invention

[0004] The technical problem solved by the present invention is to provide a method and device for controlling automatic exposure, which can help to see ground targets clearly through automatic exposure control.

[0005] To solve the above technical problems, the technical solution of the present invention provides a method for controlling automatic exposure, comprising: acquiring an initial image, wherein the initial image comprises a first area and a second area, wherein a dividing line is provided between the first area and the second area; dividing the initial image to acquire a plurality of sub-areas; assigning a first weight to each sub-area according to a positional relationship between each sub-area and the dividing line; acquiring an automatic exposure statistical value according to a pixel value of each sub-area and the first weight assigned to each sub-area; adjusting the exposure according to a gap between the automatic exposure statistical value and a preset value, wherein the method for adjusting the exposure comprises: when the automatic exposure statistical value is greater than the preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistical value is less than the preset value, increasing one or more of the exposure time, gain and aperture.

[0006] Optionally, a method for assigning a first weight to each sub-region based on a positional relationship between each sub-region and the dividing line includes: obtaining a first angle through which an initial image is rotated relative to a preset horizontal line direction; obtaining a rotated edge image, wherein the dividing line of the rotated edge image is parallel to the preset horizontal line; obtaining the row number of the pixel row where the dividing line is located in the rotated edge image; obtaining the coordinates of the rotation center point of each sub-region of the rotated edge image; comparing the vertical coordinate of the rotation center point of each sub-region with the row number of the pixel row where the dividing line is located to obtain a comparison result; and assigning a first weight to each sub-region based on the comparison result.

[0007] Optionally, the method for acquiring a first angle through which the initial image is rotated relative to a preset horizontal line direction includes: acquiring, according to a three-axis gyroscope sensor, a first angle through which the initial image is rotated relative to a preset horizontal line direction.

[0008] Optionally, the method for obtaining a rotated edge image includes: performing a rotation operation on the initial image to obtain a rotated image, wherein a rotation angle of the rotation operation is a first angle in the opposite direction; and extracting an edge of the rotated image to obtain a rotated edge image.

[0009] Optionally, the method for obtaining a rotated edge image includes: extracting the edge of the initial image to obtain an edge image; performing a rotation operation on the edge image to obtain a rotated edge image, wherein a rotation angle of the rotation operation is a first angle in the opposite direction.

[0010] Optionally, the method for obtaining the row number of the pixel row where the boundary line is located in the rotated edge image includes: obtaining the pixel average value of each row in the rotated edge image; and obtaining the row where the pixel average value is the largest as the pixel row where the boundary line is located.

[0011] Optionally, based on the comparison result, the method of assigning a first weight to each sub-region includes: if the longitudinal coordinate of the rotation center point of the sub-region is greater than or equal to the row number of the pixel row where the dividing line is located, it is judged that most or all of the sub-region is located below the dividing line, and a larger first weight is assigned to the sub-region; if the longitudinal coordinate of the rotation center point of the sub-region is less than the row number of the pixel row where the dividing line is located, it is judged that the sub-region is located above the dividing line, and a smaller first weight is assigned to the sub-region.

[0012] Optionally, the method for obtaining the rotation center point coordinates of each sub-region of the rotated edge image includes: obtaining the center point coordinates of each sub-region of the initial image; calculating the center point coordinates of each sub-region of the initial image according to the rotation angle, and obtaining the rotation center point coordinates of each sub-region of the rotated edge image.

[0013] Optionally, the rotation center coordinates of each sub-region of the rotated edge image in,

[0014] (rxi, ryi) is the coordinate of the rotation center point of the i-th sub-region of the rotated edge image,

[0015] (blkxi, blkyi) are the coordinates of the center point of the i-th sub-region of the initial image, w and h are the width and height of the initial image, W and H are the width and height of the rotated image, and θ is the first angle.

[0016] Optionally, the method for obtaining automatic exposure statistics based on pixel values ​​of each sub-region and a first weight assigned to each sub-region includes: obtaining a pixel average value of each sub-region based on the pixel values ​​of each sub-region; obtaining an automatic exposure statistics based on the pixel average value of each sub-region and a first weight assigned to each sub-region, the automatic exposure statistics being a weighted average value of the pixel average value of each sub-region and the first weight corresponding to each sub-region.

[0017] Optionally, the automatic exposure statistics Among them, AEC_ave is the automatic exposure statistic, blk_avei is the pixel average value of the i-th sub-region, w1i is the first weight of the i-th sub-region, i is a natural number from 1 to N, and N is the number of divided sub-regions.

[0018] Optionally, the automatic exposure control method further includes: acquiring a contrast ratio of each of the sub-regions; and assigning a second weight to each of the sub-regions according to the contrast ratio.

[0019] Optionally, the method for obtaining automatic exposure statistics based on pixel values ​​of each sub-region, a first weight assigned to each sub-region, and a second weight assigned to each sub-region includes: obtaining a pixel average value of each sub-region based on the pixel values ​​of each sub-region; obtaining automatic exposure statistics based on the pixel average value of each sub-region, a first weight assigned to each sub-region, and a second weight assigned to each sub-region, the automatic exposure statistics being a weighted average value of the pixel average value of each sub-region and the corresponding first weight and second weight.

[0020] Optionally, the automatic exposure statistics Among them, AEC_ave is the automatic exposure statistic, blk_avei is the pixel average value of the i-th sub-area, w1i is the first weight of the i-th sub-area, w2i is the second weight of the i-th sub-area, i is a natural number from 1 to N, and N is the number of divided sub-areas.

[0021] Optionally, the method of assigning the second weight to each sub-region according to the contrast includes: the greater the contrast, the greater the second weight assigned to the sub-region; the smaller the contrast, the smaller the second weight assigned to the sub-region.

[0022] Optionally, the method further includes: applying the adjusted exposure time, gain and aperture to obtain the next frame of initial image.

[0023] Optionally, the method of dividing the initial image to obtain a plurality of sub-regions includes: according to the number of pixels of the initial image, evenly dividing the region of the initial image to obtain a plurality of sub-regions.

[0024] Optionally, the gain includes analog gain and digital gain.

[0025] Optionally, the dividing line is the horizon, the first area is the area below the horizon, and the second area is the area above the horizon.

[0026] Correspondingly, the technical solution of the present invention also provides an automatic exposure control device, including: an image acquisition module, used to acquire an initial image, the initial image includes a first area, a second area and a dividing line dividing the first area and the second area; an image division module, used to divide the initial image; a first weight assignment module, used to assign a first weight to each sub-area according to the positional relationship between each sub-area and the dividing line; an automatic exposure statistical value calculation module, used to acquire an automatic exposure statistical value according to the pixel value of each sub-area and the first weight assigned to each sub-area; an automatic exposure adjustment module, used to adjust the exposure according to the gap between the automatic exposure statistical value and a preset value, and the method for adjusting the exposure includes: when the automatic exposure statistical value is greater than the preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistical value is less than the preset value, increasing one or more of the exposure time, gain and aperture.

[0027] Optionally, the automatic exposure control device also includes: a direction judgment module, used to obtain a first angle through which the initial image is rotated relative to a preset horizontal line direction; an image rotation module, used to obtain a rotated edge image, wherein the dividing line of the rotated edge image is parallel to the preset horizontal line, and the rotation angle is the first angle in the opposite direction.

[0028] Optionally, the image rotation module is also used to: obtain the coordinates of the rotation center point of each sub-area of ​​the rotated edge image; the first weight allocation module includes: a boundary line judgment block, used to obtain the row number of the pixel row where the boundary line is located in the rotated edge image; a comparison block, used to compare the vertical coordinate of the rotation center point of each sub-area with the row number of the pixel row where the boundary line is located to obtain a comparison result; an allocation block, used to allocate a first weight to each sub-area according to the comparison result.

[0029] Optionally, the direction determination module includes a three-axis gyroscope sensor.

[0030] Optionally, the automatic exposure control device also includes: a pixel average value acquisition module, used to obtain the pixel average value of each sub-region according to the pixel value of each sub-region; the automatic exposure statistical value calculation module, used to obtain the automatic exposure statistical value according to the pixel average value of each sub-region and the first weight assigned to each sub-region, and the automatic exposure statistical value is the weighted average value of the pixel average value of each sub-region and the first weight corresponding to each sub-region.

[0031] Optionally, the automatic exposure control device also includes: a contrast acquisition module, used to acquire the contrast of each of the sub-areas; a second weight assignment module, used to assign a second weight to each sub-area according to the contrast; the automatic exposure statistical value calculation module is also used to acquire the automatic exposure statistical value according to the pixel average value of each sub-area, the first weight assigned to each sub-area and the second weight assigned to each sub-area, and the automatic exposure statistical value is the weighted average of the pixel average value of each sub-area and the corresponding first weight and second weight.

[0032] Optionally, the gain includes analog gain and digital gain.

[0033] Optionally, the dividing line is the horizon, the first area is the area below the horizon, and the second area is the area above the horizon.

[0034] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0035] The method of the technical solution of the present invention divides the initial image to obtain a plurality of sub-areas, and assigns a first weight to each sub-area according to the positional relationship between each sub-area and the dividing line. When assigning weights to each sub-area, a first weight associated with the positional relationship between each sub-area and the dividing line is added, so that when a first area and a second area of ​​different brightness exist in the camera image at the same time, a larger first weight can be assigned to the target in the darker area, so that the darker area can obtain a more appropriate exposure, so that the target in the darker area can be seen clearly.

[0036] Furthermore, when weights are assigned to each sub-region, a first weight associated with the positional relationship between each sub-region and the boundary line and a second weight related to the contrast are added. Under the dual assignment rule of the second weight and the first weight, areas with rich details can be exposed more appropriately, so that more image details can be seen clearly. When a first area and a second area with different brightness exist in the camera image at the same time, the darker area can be exposed more appropriately, so that ground targets can be seen clearly. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figures 1 to 7 is a flow chart of a method for controlling automatic exposure in one embodiment of the present invention;

[0038] Figure 8 and Fig. 9 is a flow chart of a method for controlling automatic exposure in another embodiment of the present invention;

[0039] Fig.10 and Fig.11 is a schematic structural diagram of an automatic exposure control device in one embodiment of the present invention;

[0040] Fig.12It is a schematic structural diagram of an automatic exposure control device in another embodiment of the present invention;

[0041] Figures 13 to 16 4 is a schematic diagram of a scene of the automatic exposure control method in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] As described in the background art, it is necessary to provide a solution that enables a camera to automatically distinguish between the sky and the ground, and then help to see the ground target clearly through automatic exposure control.

[0043] Specifically, the existing automatic exposure control (AEC) technology divides the picture into multiple areas and sets different weights for each area according to the scene. However, the existing technology is not suitable for situations where the camera is frequently inverted or rotated, such as often occurs in extreme aerial sports such as paragliding and wing flying.

[0044] The technical solution of the present invention provides an automatic exposure control method and device, which divides the initial image to obtain a plurality of sub-areas, and assigns a first weight to each sub-area according to the positional relationship between each sub-area and the dividing line. When assigning weights to each sub-area, a first weight associated with the positional relationship between each sub-area and the dividing line is added, so that when a first area and a second area with different brightness exist in a camera image at the same time, a larger first weight can be assigned to a target in the darker area, so that the darker area obtains a more appropriate exposure, so that the target in the darker area can be seen clearly.

[0045] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0046] Figures 1 to 7 4 is a flow chart of a method for controlling automatic exposure in one embodiment of the present invention.

[0047] Please refer to Figure 1 , the automatic exposure control method comprises:

[0048] Step S1: Acquire an initial image, wherein the initial image includes a first area and a second area, and a boundary line is formed between the first area and the second area;

[0049] Step S2: dividing the initial image to obtain a plurality of sub-regions;

[0050] Step S3: assigning a first weight to each sub-region according to the positional relationship between each sub-region and the boundary line;

[0051] Step S4: obtaining an automatic exposure statistic value according to the pixel value of each sub-region and the first weight assigned to each sub-region;

[0052] Step S5: adjusting the exposure according to the difference between the automatic exposure statistic and the preset value, wherein the method for adjusting the exposure includes: when the automatic exposure statistic is greater than the preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistic is less than the preset value, increasing one or more of the exposure time, gain and aperture.

[0053] The preset value is a parameter set manually and can be set based on experience or experiments.

[0054] When assigning weights to each sub-area, the method adds a first weight associated with the positional relationship between each sub-area and the dividing line, so that when a first area and a second area of ​​different brightness exist in the camera image at the same time, a larger first weight can be assigned to the target in the darker area, so that the darker area obtains a more appropriate exposure, thereby allowing the target in the darker area to be seen clearly.

[0055] Next, each step is analyzed and explained.

[0056] Please continue to refer to Figure 1 , executing step S1: acquiring an initial image P1, wherein the initial image P1 includes a first area and a second area, and a boundary line is provided between the first area and the second area.

[0057] The first area and the second area have different brightness. In this embodiment, the dividing line is the horizon, the second area is the area above the horizon, and the first area is the area below the horizon.

[0058] The initial image P1 is a grayscale image or an RGB image.

[0059] In this embodiment, the initial image P1 is a grayscale image.

[0060] In this embodiment, the image captured by the camera is a grayscale image, and the resolution of the initial image P1 is 512×768 pixels.

[0061] In this embodiment, the initial image P1 is acquired by an image acquisition module, and the image acquisition module may be a camera.

[0062] Fig.13 For a scene diagram of the initial image P1, please refer to Fig.13 The initial image P1 includes a first region I and a second region II, and a boundary line L between the first region I and the second region II.

[0063] The first area I is the area below the horizon L, that is, the first area I is the ground area, the second area II is the area above the horizon L, that is, the second area II is the sky area, and the angle between the dividing line L and the preset horizontal line X is a first angle θ.

[0064] Please continue to refer to Figure 1 , execute step S2: divide the initial image P1 to obtain a number of sub-areas blki, where i=1, 2, 3...N, and N is an integer greater than 1.

[0065] In this embodiment, the method of dividing the initial image P1 to obtain a plurality of sub-regions blki includes: according to the number of pixels of the initial image P1, evenly dividing the region of the initial image P1 to obtain a plurality of sub-regions blki.

[0066] Fig.14 It is a schematic diagram of dividing the initial image P1 into several sub-areas blki.

[0067] Please refer to Fig.14 , the number of pixels in any sub-region blki is an integer. For example, if the initial image P1 is an image of 512x768 pixels, it is divided into 8x12 rectangular sub-regions blki by the image division module, and the size of each sub-region blki is 64x64 pixels.

[0068] In this embodiment, the image division module is used to divide the initial image P1.

[0069] Please continue to refer to Figure 1 , execute step S3: assign a first weight w1i to each sub-region blki according to the positional relationship between each sub-region blki and the boundary line L. Figure 2 In this embodiment, according to the positional relationship between each sub-region and the boundary line, the method of allocating the first weight to each sub-region includes:

[0070] Step S31: obtaining a first angle at which the initial image is rotated relative to a preset horizontal line direction;

[0071] Step S32: acquiring a rotating edge image, wherein the boundary line of the rotating edge image is parallel to a preset horizontal line;

[0072] Step S33: obtaining the row number of the pixel row where the boundary line is located in the rotated edge image;

[0073] Step S34: obtaining the coordinates of the rotation center points of each sub-region of the rotation edge image;

[0074] Step S35: Compare the ordinate of the rotation center point of each sub-region with the row number of the pixel row where the boundary line is located to obtain a comparison result;

[0075] Step S36: assigning a first weight to each sub-region according to the comparison result.

[0076] In this embodiment, the dividing line L is the horizon, the second area II is the area above the horizon, and the first area I is the area below the horizon. A first weight associated with the positional relationship between each sub-area and the dividing line is added, so that when there are both a sky area and a ground area in the camera picture, a larger first weight can be assigned to the target on the ground area, so that the ground area can obtain a more appropriate exposure, so that the ground target can be seen clearly.

[0077] Next, each step is analyzed and explained.

[0078] Please continue to refer to Figure 2 , execute step S31: obtain a first angle through which the initial image is rotated relative to a preset horizontal line direction.

[0079] The method for acquiring a first angle through which an initial image is rotated relative to a preset horizontal line direction includes: acquiring a first angle through which an initial image is rotated relative to a preset horizontal line direction according to a three-axis gyroscope sensor.

[0080] The angle between the boundary line L of the initial image P1 and the horizontal line X is a first angle θ (eg Fig.13 shown).

[0081] The three-axis gyroscope is a device fixed inside the camera. When the camera is facing the horizon and the horizon is horizontal in the picture, the roll angle is corrected to 0 degrees. During the aerial movement, the camera will pitch, yaw and roll with the athlete. At this time, the roll angle output by the three-axis gyroscope is equal to the first angle θ of the current image rotation relative to the horizon.

[0082] Please continue to refer to Figure 2 , execute step S32: obtain a rotating edge image, wherein the boundary line of the rotating edge image is parallel to a preset horizontal line.

[0083] Please refer to Figure 3 In this embodiment, the method for obtaining a rotating edge image includes:

[0084] Step S321: extracting the edge of the initial image to obtain an edge image;

[0085] Step S322: performing a rotation operation on the edge image to obtain a rotated edge image, wherein the rotation angle of the rotation operation is a first angle in the opposite direction.

[0086] Please refer to Fig.15 , Fig.15 : is a scene diagram of the edge image P2, wherein edge pixels are represented by white bright spots, and in this embodiment, an 8-bit image is used, so the image edge pixel value is 255, and the non-edge pixels are black, with a value of 0.

[0087] Please refer to Fig.16 , Fig.16 Schematic diagram of the scene for obtaining the rotated edge image P3, the edge image P2 is reversely rotated by a first angle θ so that the dividing line L in the edge image P2 is parallel to the preset horizontal line X; the area F1 around the rotated edge image P3 is filled with black pixels, so that the rotated edge image P3 and the area F1 filled with black pixels form a rectangular image, whose origin O is at the upper left corner of the rectangular image.

[0088] In another embodiment, the method for obtaining a rotated edge image includes: performing a rotation operation on the initial image to obtain a rotated image, wherein the rotation angle of the rotation operation is a first angle in the opposite direction; and extracting an edge of the rotated image to obtain a rotated edge image.

[0089] Please continue to refer to Figure 2 , execute step S33: obtain the row number of the pixel row where the boundary line is located in the rotated edge image.

[0090] Please refer to Figure 4 In this embodiment, the method for obtaining the row number of the pixel row where the boundary line is located in the rotated edge image includes:

[0091] Step S331: obtaining the average pixel value of each row in the rotated edge image;

[0092] Step S332: Obtain the row with the largest pixel average value as the pixel row where the boundary line is located.

[0093] Please continue to refer to Fig.16 , calculate the pixel average of the rotated edge image P3 row by row, and the area F1 filled with black pixels is not involved in the calculation. The row with the largest average value is the row where the dividing line L is located, and its row number is recorded as row_h.

[0094] In this embodiment, when judging the row where the dividing line L is located by the pixel average value, the top several rows and the bottom several rows in the rotated edge image P3 can be excluded in advance, because the number of pixels involved in the calculation of these rows is very small, and it is easy to cause a large average value due to the existence of a small number of edges, resulting in misjudgment. For example, the number of rows can be set to 30 rows, which can be determined by experiments and experience.

[0095] Please continue to refer to Figure 2 , execute step S34: obtain the coordinates of the rotation center point of each sub-region of the rotated edge image.

[0096] Please refer to Figure 5 In this embodiment, the method for obtaining the coordinates of the rotation center points of each sub-region of the rotating edge image includes:

[0097] Step S341: obtaining the coordinates of the center points of each sub-region of the initial image;

[0098] Step S342: Calculate the coordinates of the center points of each sub-region of the initial image according to the rotation angle to obtain the coordinates of the rotation center points of each sub-region of the rotated edge image.

[0099] The rotation center coordinates of each sub-region of the rotation edge image in,

[0100] (rxi, ryi) is the coordinate of the rotation center point of the i-th sub-region of the rotated edge image,

[0101] (blkxi, blkyi) is the coordinate of the center point of the i-th sub-region of the initial image, w and h are the width and height of the initial image, W and H are the width and height of the rotated edge image, and θ is the first angle.

[0102] Please continue to refer to Figure 5 , execute step S341: obtain the center point coordinates (blkxi, blkyi) of each sub-region blki of the initial image P1, where i=1, 2, ..., N. N is the number of divided sub-regions.

[0103] The calculation method of the center point coordinates (blkxi, blkyi) of each sub-region blki is: the horizontal coordinate blkxi of the center point is equal to the average of the horizontal coordinates of the first column and the last column of the current sub-region blki, The ordinate of the center point blkyi is equal to the average of the ordinates of the first and last rows of the current sub-area blki.

[0104] Among them: blkxi is the horizontal coordinate of the center point of sub-region blki; blkx1i is the horizontal coordinate of the first column of pixels in sub-region blki; blkx2i is the horizontal coordinate of the last column of pixels in sub-region blki; blkyi is the vertical coordinate of the center point of sub-region blki; blky1i is the vertical coordinate of the first row of pixels in sub-region blki; blky2i is the vertical coordinate of the last row of pixels in sub-region blki. The origin of the coordinate is in the upper left corner of the image.

[0105] For example, see Fig.14 ,by Fig.14Take the sub-region blki in the 5th row and the 7th column as an example. The size of each sub-region blki is 64x64 pixels. The horizontal coordinate of the first column of pixels is: blkx1_55_=64*6+1=385; the horizontal coordinate of the last column of pixels is: blkx2_55=64*7=448; therefore, the horizontal coordinate of its center point is:

[0106]

[0107] The vertical coordinate of the first row of pixels is: blky1_55 = 64*4 + 1 = 257; the vertical coordinate of the last row of pixels is: blky2_55 = 64*5 = 320; therefore, the vertical coordinate of the center point is:

[0108]

[0109] Please continue to refer to Figure 5 , execute step S342: calculate the center point coordinates (blkxi, blkyi) of each sub-region blki of the initial image P1 according to the rotation angle θ, and obtain the rotation center point coordinates (rxi, ryi) of each sub-region blki of the rotated edge image P3.

[0110] The rotation center point coordinates (rxi, ryi) are the coordinates of the center point of the sub-region blki in the rotated edge image P3 after rotation. The rotation center point coordinates (rxi, ryi) facilitate subsequent judgment of whether each sub-region blki is below the dividing line L or above the dividing line L.

[0111] The formula for the rotation transformation of the center point coordinates (blkxi, blkyi) of the sub-region blki is:

[0112]

[0113] Among them, (rxi, ryi) is the coordinate of the rotation center point of the i-th sub-region of the rotated edge image,

[0114] (blkxi, blkyi) are the coordinates of the center point of the i-th sub-region of the initial image, w and h are the width and height of the initial image P1, in this example w = 768 pixels, h = 512 pixels; W and H are the width and height of the rotated edge image P3, and θ is the first angle. In this embodiment:

[0115] W=w·abs(cos(θ))+h·abs(sin(θ)), H=w·abs(sin(θ))+h·abs(cos(θ)).

[0116] Please continue to refer to Figure 2, execute step S35: compare the ordinate ryi of the rotation center point of each sub-region blki with the row number row_h of the pixel row where the dividing line L is located to obtain a comparison result.

[0117] Please continue to refer to Figure 2 , execute step S36: assign a first weight w1i to each sub-region blki according to the comparison result.

[0118] Please refer to Figure 6 In this embodiment, according to the comparison result, the method of allocating the first weight w1i to each sub-region blki includes:

[0119] Step S361: if the ordinate ryi of the rotation center point of the sub-region blki is greater than or equal to the row number row_h of the pixel row where the dividing line L is located, it is determined that most or all of the sub-region blki is located below the dividing line L, and a larger first weight w1i is assigned to the sub-region blki;

[0120] Step S362: If the ordinate ryi of the rotation center point of the sub-region blki is smaller than the row number row_h of the pixel row where the dividing line L is located, it is determined that the sub-region blki is located above the dividing line L, and a smaller first weight w1i is assigned to the sub-region blki.

[0121] A larger first weight w1i is assigned to the sub-area blki on the first zone I below the dividing line L, so that when there are both the sky area and the ground area in the camera picture, a larger first weight can be assigned to the target on the ground area, so that the ground area can obtain more appropriate exposure, so that the ground target can be seen clearly.

[0122] In this embodiment, the specific value of the first weight w1i is:

[0123] The first weight w1i is an integer that is easy to calculate.

[0124] Please continue to refer to Figure 1 , execute step S4: obtain the automatic exposure statistic AEC_ave according to the pixel value of each sub-region blki and the first weight w1i assigned to each sub-region blki.

[0125] Please refer to Figure 7 In this embodiment, the method of obtaining the automatic exposure statistic value AEC_ave according to the pixel value of each sub-region blki and the first weight assigned to each sub-region blki includes:

[0126] Step S41: obtaining the average pixel value of each sub-region according to the pixel value of each sub-region;

[0127] Step S42: obtaining an automatic exposure statistic according to the pixel average value of each sub-region and the first weight assigned to each sub-region, wherein the automatic exposure statistic is a weighted average value of the pixel average value of each sub-region and the first weight corresponding to each sub-region.

[0128] Please continue to refer to Figure 7 , execute step S41: according to the pixel value of each sub-region blki, obtain the pixel average value blk_avei of each sub-region blki.

[0129] In one embodiment, the initial image P1 is a grayscale image; the method for obtaining the pixel average value blk_avei of each sub-region blki includes: obtaining the average value of the grayscale value of each pixel in the sub-region blki, and the average value of the grayscale value of each pixel is the pixel average value blk_avei.

[0130] The method for obtaining the average grayscale value of each pixel in the sub-area blki includes: obtaining the sum of the grayscale values ​​of each pixel in each sub-area blki; dividing the sum of the grayscale values ​​by the number of pixels to obtain the average grayscale value of each pixel.

[0131] In another embodiment, the initial image P1 is an RGB image; the method for obtaining the pixel average value blk_avei of each sub-region blki includes: obtaining the average value of the brightness value of each pixel in the sub-region blki, and the average value of the brightness value of each pixel is the pixel average value blk_avei.

[0132] When the initial image P1 is an RGB image, the brightness value=(R+2G+B) / 4, where R is a red value, G is a green value, and B is a blue value.

[0133] The method for obtaining the average brightness value of each pixel in the sub-area blki includes: obtaining the sum of the brightness values ​​of each pixel in each sub-area blki; dividing the sum of the brightness values ​​by the number of pixels to obtain the average brightness value of each pixel.

[0134] Please continue to refer to Figure 7 , execute step S42: obtain the automatic exposure statistic AEC_ave according to the pixel average value blk_avei of each sub-region blki and the first weight w1i assigned to each sub-region blki, wherein the automatic exposure statistic AEC_ave is the weighted average value of the pixel average value blk_avei of each sub-region blki and the first weight w1i corresponding to each sub-region blki.

[0135] The automatic exposure statistics Among them, AEC_ave is the automatic exposure statistic, blk_avei is the pixel average value of the i-th sub-region, w1i is the first weight of the i-th sub-region, i is a natural number from 1 to N, and N is the number of divided sub-regions.

[0136] Please continue to refer to Figure 1 , execute step S5: adjust the exposure according to the gap between the automatic exposure statistic AEC_ave and the preset value, the method for adjusting the exposure includes: when the automatic exposure statistic AEC_ave is greater than the preset value, reduce one or more of the exposure time, gain and aperture; when the automatic exposure statistic AEC_ave is less than the preset value, increase one or more of the exposure time, gain and aperture.

[0137] In this embodiment, the gain includes analog gain and digital gain.

[0138] Please continue to refer to Figure 1 , further comprising executing step S6: applying the adjusted exposure time, gain and aperture to obtain the next frame of initial image.

[0139] The automatic exposure control process is performed frame by frame, and the adjusted exposure time, gain and aperture are applied to the next initial image frame.

[0140] When the method assigns weights to each sub-region blki, a first weight w1i associated with the positional relationship between each sub-region blki and the dividing line L is added, so that when there are both a sky area and a ground area in the camera image, a larger first weight can be assigned to the target on the ground area, so that the ground area can obtain a more appropriate exposure, thereby clearly seeing the ground target.

[0141] Figure 8 and Fig. 9 is a flow chart of a method for controlling automatic exposure in another embodiment of the present invention.

[0142] Please refer to Figure 8 , Figure 8 For Figure 1 Based on the schematic diagram, the automatic exposure control method includes:

[0143] Step S100: acquiring an initial image, wherein the initial image includes a first area and a second area, and a boundary line is formed between the first area and the second area;

[0144] Step S200: dividing the initial image to obtain a plurality of sub-regions;

[0145] Step S300: assigning a first weight to each sub-region according to the positional relationship between each sub-region and the boundary line;

[0146] Step S400: assigning a second weight to each sub-region according to the contrast of each sub-region;

[0147] Step S500: obtaining an automatic exposure statistic value according to the pixel value of each sub-region, the first weight assigned to each sub-region, and the second weight assigned to each sub-region;

[0148] Step S600: adjusting the exposure according to the difference between the automatic exposure statistical value and the preset value, wherein the method for adjusting the exposure includes: when the automatic exposure statistical value is greater than the preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistical value is less than the preset value, increasing one or more of the exposure time, gain and aperture;

[0149] Step S700: applying the adjusted exposure time, gain and aperture to obtain the next frame of initial image.

[0150] The preset value is a parameter set manually and can be set based on experience or experiments.

[0151] When the method allocates weights to each sub-region blki, a first weight w1i associated with the positional relationship between each sub-region blki and the boundary line L and a second weight w2i related to the contrast are added. Under the dual allocation rule of the second weight w2i and the first weight w1i, a region with rich details can obtain a more appropriate exposure, so that more image details can be seen clearly. When a first region I and a second region II with different brightness exist in the camera image at the same time, the darker region can obtain a more appropriate exposure, so that the ground target can be seen clearly.

[0152] In this embodiment, the dividing line L is the horizon, the second area II is the area above the horizon, and the first area I is the area below the horizon. Under the dual allocation rule of the second weight w2i and the first weight w1i, the method can make the area with rich details obtain more appropriate exposure, so that more image details can be seen clearly, so that when there are both sky and ground areas in the camera picture, the ground area can obtain more appropriate exposure, so that the ground target can be seen clearly.

[0153] Next, each step is analyzed and explained. For the specific process of step S100, step S200, step S300, step S600 and step S700, please refer to Figures 1 to 6 The above is not repeated here.

[0154] Before executing step S400, the method further includes: obtaining a contrast Di of each of the sub-regions blki, where i=1, 2, 3...N, and N is the number of divided sub-regions.

[0155] In one embodiment, the initial image P1 is a grayscale image; the method for obtaining the contrast Di of each of the sub-regions blki includes: obtaining the standard deviation of the grayscale values ​​of all pixels in the sub-region blki, and the standard deviation of the grayscale values ​​of the pixels is the contrast Di.

[0156] In another embodiment, the initial image P1 is an RGB image; the method for obtaining the contrast Di of each sub-region blki includes: obtaining the standard deviation of the brightness values ​​of all pixels in the sub-region blki, and the standard deviation of the brightness values ​​of the pixels is the contrast Di.

[0157] The higher the contrast Di is, the richer the image details in the current sub-region blki are.

[0158] Please continue to refer to Figure 8 , execute step S400: assign a second weight w2i to each sub-region blki according to the contrast Di of each sub-region blki.

[0159] The method of allocating the second weight w2i to each sub-region blki according to the contrast Di includes: the larger the contrast Di, the larger the second weight w2i allocated to the sub-region blki; the smaller the contrast Di, the smaller the second weight w2i allocated to the sub-region blki.

[0160] The sub-region blki with a higher contrast Di has richer image details, and assigning a larger second weight w2i can enable the region with rich details to obtain more appropriate exposure, so that more image details can be seen clearly.

[0161] In this embodiment, the second weight w2i of the sub-region blki is equal to its contrast Di, that is, w1i=Di, so the second weight w2i of each sub-region blki is the same as the contrast Di.

[0162] Please continue to refer to Figure 8 , execute step S500: obtain the automatic exposure statistic AEC_ave according to the pixel value of each sub-region blki, the first weight w1i assigned to each sub-region blki, and the second weight w2i assigned to each sub-region blki.

[0163] Please refer to Fig. 9 In this embodiment, the method for obtaining the automatic exposure statistic value AEC_ave according to the pixel value of each sub-region blki, the first weight w1i assigned to each sub-region blki, and the second weight w2i assigned to each sub-region blki includes:

[0164] Step S501: obtaining the average pixel value of each sub-region according to the pixel value of each sub-region;

[0165] Step S502: Obtain automatic exposure statistics according to the pixel average value of each sub-region, the first weight assigned to each sub-region, and the second weight assigned to each sub-region, wherein the automatic exposure statistics are the weighted average value of the pixel average value of each sub-region and the corresponding first weight and second weight.

[0166] For the calculation process of the pixel average value blk_avei of each sub-area blki, please refer to Figure 7 The above is not repeated here.

[0167] Please continue to refer to Fig. 9 , execute step S502: obtain the automatic exposure statistic AEC_ave according to the pixel average value blk_avei of each sub-region blki, the second weight w2i assigned to each sub-region blki, and the first weight w1i assigned to each sub-region blki.

[0168] The automatic exposure statistics Among them, AEC_ave is the automatic exposure statistic, blk_avei is the pixel average value of the i-th sub-area, w1i is the first weight of the i-th sub-area, w2i is the second weight of the i-th sub-area, i is a natural number from 1 to N, and N is the number of divided sub-areas.

[0169] Fig.10 and Fig.11 FIG. 4 is a schematic diagram of the structure of an automatic exposure control device in one embodiment of the present invention.

[0170] Please refer to Fig.10 , the automatic exposure control device comprises:

[0171] An image acquisition module 10 is used to acquire an initial image, wherein the initial image includes a first area, a second area, and a boundary line dividing the first area and the second area;

[0172] An image division module 20 is used to divide the initial image into several sub-regions;

[0173] A first weight allocation module 30, configured to allocate a first weight to each sub-region according to a positional relationship between each sub-region and the boundary line;

[0174] An automatic exposure statistic calculation module 40, configured to obtain an automatic exposure statistic according to the pixel value of each sub-region and a first weight assigned to each sub-region;

[0175] The automatic exposure adjustment module 50 is used to adjust the exposure according to the difference between the automatic exposure statistical value and the preset value. The method for adjusting the exposure includes: when the automatic exposure statistical value is greater than the preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistical value is less than the preset value, increasing one or more of the exposure time, gain and aperture.

[0176] When the automatic exposure control device assigns weights to each sub-area, a first weight associated with the positional relationship between each sub-area and the dividing line is added, so that when a first area and a second area of ​​different brightness exist in the camera image at the same time, a larger first weight can be assigned to the target in the darker area, so that the ground area can obtain a more appropriate exposure, thereby allowing the ground target to be clearly seen.

[0177] Next, each structure is described separately:

[0178] Please continue to refer to Fig.10 The image acquisition module 10 acquires an initial image, and the initial image includes a first area, a second area, and a boundary line dividing the first area and the second area.

[0179] The initial image is a grayscale image or an RGB image.

[0180] The first area and the second area have different brightness. In this embodiment, the dividing line is the horizon, the second area is the area above the horizon, and the first area is the area below the horizon.

[0181] In this embodiment, the image acquisition module 10 is generally a camera.

[0182] Fig.13 For a scene diagram of the initial image P1, please refer to Fig.13 The initial image P1 includes a first region I and a second region II, and a boundary line L between the first region I and the second region II.

[0183] In this embodiment, the first area I is an area below the horizon L, that is, the first area I is a ground area, and the second area II is an area above the horizon L, that is, the second area II is a sky area.

[0184] Therefore, when the automatic exposure control device assigns weights to each sub-area, a first weight associated with the positional relationship between each sub-area and the dividing line is added, so that when there are both a sky area and a ground area in the camera image, a larger first weight can be assigned to the target on the ground area, so that the ground area can obtain a more appropriate exposure, thereby allowing the ground target to be clearly seen.

[0185] Please continue to refer to Fig.10The image division module 20 is used to divide the initial image into several sub-areas.

[0186] In this embodiment, the number of pixels in any sub-region is an integer.

[0187] In one embodiment, the initial image is a grayscale image; the average value of the grayscale values ​​of each pixel in the sub-region is the pixel average value.

[0188] In another embodiment, the initial image is an RGB image; the average value of the brightness values ​​of each pixel in the sub-region is the pixel average value.

[0189] Please continue to refer to Fig.10 The first weight allocation module 30 is used to allocate a first weight to each sub-region according to the positional relationship between each sub-region and the boundary line.

[0190] Please continue to refer to Fig.10 In this embodiment, the automatic exposure control device also includes: a direction judgment module 60, used to obtain a first angle through which the initial image is rotated relative to a preset horizontal line direction; an edge extraction module 70, used to obtain an edge image of the initial image; an image rotation module 80, used to obtain a rotated edge image, wherein the dividing line of the rotated edge image is parallel to the preset horizontal line, and the rotation angle is the first angle in the opposite direction.

[0191] In this embodiment, the direction determination module 60 includes a three-axis gyroscope sensor.

[0192] In this embodiment, the direction determination module 60 is composed of a three-axis gyroscope sensor, which outputs three angle information: pitch angle, yaw angle, and roll angle.

[0193] The three-axis gyroscope is a device fixed inside the camera. When the camera is facing the horizon and the horizon is horizontal in the picture, the roll angle is corrected to 0 degrees. During the aerial movement, the camera will pitch, yaw and roll with the athlete. At this time, the roll angle output by the three-axis gyroscope is equal to the first angle θ of the current image rotation relative to the horizon.

[0194] In this embodiment, the edge extraction module 70 uses the Canny operator to extract two pixel values ​​in the edge image: the pixels representing the edge are white bright spots (for example, for an 8-bit image, the value is 255), and the non-edge pixels are black (the value is 0, for example, Fig.15 shown).

[0195] The image rotation module 80 rotates the edge image, and the rotation angle is a first angle θ in the opposite direction.

[0196] In this embodiment, the image rotation module 80 is further used to obtain the coordinates of the rotation center point of each sub-region of the rotated edge image.

[0197] Please refer to Fig.11 In this embodiment, the first weight allocation module 30 includes: a boundary line judgment block 301, which is used to obtain the row number of the pixel row where the boundary line is located in the rotated edge image; a comparison block 302, which is used to compare the vertical coordinate of the rotation center point of each sub-area with the row number of the pixel row where the boundary line is located to obtain a comparison result; an allocation block 303, which is used to allocate a first weight to each sub-area according to the comparison result.

[0198] The comparison result includes: if the vertical coordinate of the rotation center point of the sub-region is greater than or equal to the row number of the pixel row where the dividing line is located, it is judged that most or all of the sub-region is located below the dividing line, and a larger first weight is assigned to the sub-region; if the vertical coordinate of the rotation center point of the sub-region is less than the row number of the pixel row where the dividing line is located, it is judged that the sub-region is located above the dividing line, and a smaller first weight is assigned to the sub-region.

[0199] In this way, when both the sky and the ground area exist in the camera picture, a larger first weight can be assigned to the target on the ground area, so that the ground area can obtain more appropriate exposure, so that the ground target can be seen clearly.

[0200] Please continue to refer to Fig.10 In this embodiment, the automatic exposure control device further includes: a pixel average value acquisition module 90, which is used to acquire the pixel average value of each sub-area according to the pixel value of each sub-area.

[0201] In this embodiment, the automatic exposure statistic calculation module 40 is used to obtain the automatic exposure statistic according to the pixel average value of each sub-region and the first weight assigned to each sub-region, and the automatic exposure statistic is the weighted average of the pixel average value of each sub-region and the first weight corresponding to each sub-region.

[0202] Please continue to refer to Fig.10 The automatic exposure adjustment module 50 is used to adjust the exposure according to the gap between the automatic exposure statistical value and the preset value. The method for adjusting the exposure includes: when the automatic exposure statistical value is greater than the preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistical value is less than the preset value, increasing one or more of the exposure time, gain and aperture.

[0203] The gain includes analog gain and digital gain.

[0204] Fig.12 FIG. 4 is a schematic diagram of the structure of an automatic exposure control device in another embodiment of the present invention.

[0205] Please refer to Fig.12 , Fig.12 For Fig.10 Based on the schematic diagram, the automatic exposure control device also includes:

[0206] A contrast acquisition module 100, used to acquire the contrast of each sub-region;

[0207] The second weight allocation module 110 is configured to allocate a second weight to each sub-region according to the contrast.

[0208] In this embodiment, the automatic exposure statistic calculation module 40 is also used to obtain the automatic exposure statistic based on the pixel average value of each sub-region, the first weight assigned to each sub-region, and the second weight assigned to each sub-region. The automatic exposure statistic is the weighted average of the pixel average value of each sub-region and the corresponding first weight and second weight.

[0209] In this embodiment, the first area I is an area below the horizon L, that is, the first area I is a ground area, and the second area II is an area above the horizon L, that is, the second area II is a sky area.

[0210] When the automatic exposure control device allocates weights to each sub-region blki, the first weight w1i associated with the positional relationship between each sub-region blki and the dividing line L and the second weight w2i related to the contrast are added. Under the dual allocation rule of the second weight w2i and the first weight w1i, areas with rich details can obtain more appropriate exposure, so that more image details can be seen clearly. At the same time, when both the sky area and the ground area exist in the camera image, the ground area can obtain more appropriate exposure, so that the ground target can be seen clearly.

[0211] Next, each structure will be described separately.

[0212] Please continue to refer to Fig.12 The contrast acquisition module 100 is used to acquire the contrast of each of the sub-regions.

[0213] In one embodiment, the initial image is a grayscale image; the standard deviation of the grayscale values ​​of all pixels in the sub-region is the contrast.

[0214] In another embodiment, the initial image is an RGB image; the standard deviation of the brightness values ​​of all pixels in the sub-region is the contrast.

[0215] The higher the contrast, the richer the image details in the current sub-region.

[0216] Please continue to refer to Fig.12The second weight allocation module 110 is used to allocate a second weight to each sub-region according to the contrast.

[0217] The higher the contrast of a sub-region, the larger the second weight assigned to it; the lower the contrast of a sub-region, the smaller the second weight assigned to it. A higher weight is assigned to a sub-region with richer details and higher contrast.

[0218] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. A method for controlling automatic exposure, characterized in that: include: Acquire an initial image, the initial image comprising a first area and a second area, the first area and the second area having a dividing line therebetween, the dividing line being a horizon, the first area being an area below the horizon, and the second area being an area above the horizon; Dividing the initial image to obtain a plurality of sub-regions; Allocating a first weight to each sub-region according to the positional relationship between each sub-region and the boundary line includes: obtaining a first angle rotated by the initial image relative to a preset horizontal line direction; obtaining a rotated edge image, wherein the boundary line of the rotated edge image is parallel to the preset horizontal line; obtaining the row number of the pixel row where the boundary line is located in the rotated edge image; obtaining the coordinates of the rotation center point of each sub-region of the rotated edge image; comparing the ordinate of the rotation center point of each sub-region with the row number of the pixel row where the boundary line is located to obtain a comparison result; and allocating the first weight to each sub-region according to the comparison result; Acquire an automatic exposure statistical value according to the pixel value of each sub-region and a first weight assigned to each sub-region; Adjust the exposure based on the difference between the automatic exposure statistics and the preset value. The method for adjusting exposure includes: when the automatic exposure statistical value is greater than a preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistical value is less than the preset value, increasing one or more of the exposure time, gain and aperture.

2. The automatic exposure control method according to claim 1, characterized in that: The method for acquiring a first angle through which an initial image is rotated relative to a preset horizontal line direction includes: acquiring a first angle through which an initial image is rotated relative to a preset horizontal line direction according to a three-axis gyroscope sensor.

3. The automatic exposure control method according to claim 1, characterized in that: The method for obtaining a rotated edge image comprises: performing a rotation operation on the initial image to obtain a rotated image, wherein the rotation angle of the rotation operation is a first reverse angle; and extracting the edge of the rotated image to obtain a rotated edge image.

4. The automatic exposure control method according to claim 1, characterized in that: The method for obtaining a rotated edge image comprises: extracting the edge of the initial image to obtain an edge image; performing a rotation operation on the edge image to obtain a rotated edge image, wherein the rotation angle of the rotation operation is a first angle in the opposite direction.

5. The automatic exposure control method according to claim 1, characterized in that: The method for obtaining the row number of the pixel row where the boundary line is located in the rotating edge image includes: obtaining the pixel average value of each row in the rotating edge image; obtaining the row where the pixel average value is the largest as the pixel row where the boundary line is located.

6. The automatic exposure control method according to claim 1, characterized in that: According to the comparison result, the method of assigning a first weight to each sub-region includes: if the longitudinal coordinate of the rotation center point of the sub-region is greater than or equal to the row number of the pixel row where the dividing line is located, it is judged that most or all of the sub-region is located below the dividing line, and a larger first weight is assigned to the sub-region; if the longitudinal coordinate of the rotation center point of the sub-region is less than the row number of the pixel row where the dividing line is located, it is judged that the sub-region is located above the dividing line, and a smaller first weight is assigned to the sub-region.

7. The automatic exposure control method according to claim 1, characterized in that: The method for obtaining the rotation center point coordinates of each sub-region of the rotated edge image includes: obtaining the center point coordinates of each sub-region of the initial image; calculating the center point coordinates of each sub-region of the initial image according to the rotation angle, and obtaining the rotation center point coordinates of each sub-region of the rotated edge image.

8. The automatic exposure control method according to claim 7, characterized in that: The rotation center coordinates of each sub-region of the rotation edge image in, (rxi, ryi) is the coordinate of the rotation center point of the i-th sub-region of the rotated edge image, (blkxi, blkyi) is the coordinate of the center point of the i-th sub-region of the initial image, w and h are the width and height of the initial image, W and H are the width and height of the rotated edge image, and θ is the first angle.

9. The automatic exposure control method according to claim 1, characterized in that: The method for obtaining automatic exposure statistics based on pixel values ​​of each sub-region and a first weight assigned to each sub-region includes: obtaining a pixel average value of each sub-region based on the pixel values ​​of each sub-region; obtaining an automatic exposure statistics based on the pixel average value of each sub-region and a first weight assigned to each sub-region, wherein the automatic exposure statistics is a weighted average value of the pixel average value of each sub-region and the first weight corresponding to each sub-region.

10. The automatic exposure control method according to claim 9, characterized in that: The automatic exposure statistics Among them, AEC_ave is the automatic exposure statistic, blk_avei is the pixel average value of the i-th sub-region, w1i is the first weight of the i-th sub-region, i is a natural number from 1 to N, and N is the number of divided sub-regions.

11. The automatic exposure control method according to claim 1, characterized in that: The automatic exposure control method also includes: obtaining the contrast of each of the sub-areas; assigning a second weight to each sub-area according to the contrast; and obtaining an automatic exposure statistical value according to the pixel value of each sub-area, the first weight assigned to each sub-area, and the second weight assigned to each sub-area.

12. The automatic exposure control method according to claim 11, characterized in that: The method for obtaining automatic exposure statistics based on pixel values ​​of each sub-region, a first weight assigned to each sub-region, and a second weight assigned to each sub-region includes: obtaining a pixel average value of each sub-region based on the pixel values ​​of each sub-region; obtaining an automatic exposure statistics based on the pixel average value of each sub-region, a first weight assigned to each sub-region, and a second weight assigned to each sub-region, wherein the automatic exposure statistics is a weighted average value of the pixel average value of each sub-region and the corresponding first weight and second weight.

13. The automatic exposure control method according to claim 12, characterized in that: The automatic exposure statistics Among them, AEC_ave is the automatic exposure statistic, blk_avei is the pixel average value of the i-th sub-area, w1i is the first weight of the i-th sub-area, w2i is the second weight of the i-th sub-area, i is a natural number from 1 to N, and N is the number of divided sub-areas.

14. The automatic exposure control method according to claim 11, characterized in that: The method of assigning the second weight to each sub-region according to the contrast includes: the greater the contrast, the greater the second weight assigned to the sub-region; the smaller the contrast, the smaller the second weight assigned to the sub-region.

15. The automatic exposure control method according to claim 1, characterized in that: Also includes: The adjusted exposure time, gain, and aperture are applied to acquire the next initial image frame.

16. The automatic exposure control method according to claim 1, characterized in that: The method of dividing the initial image to obtain a plurality of sub-regions includes: according to the number of pixels of the initial image, evenly dividing the region of the initial image to obtain a plurality of sub-regions.

17. The automatic exposure control method according to claim 1, characterized in that: The gain includes analog gain and digital gain.

18. An automatic exposure control device, characterized in that: include: An image acquisition module, used to acquire an initial image, wherein the initial image includes a first area and a second area, wherein a dividing line is provided between the first area and the second area, wherein the dividing line is a horizon, wherein the first area is an area below the horizon, and the second area is an area above the horizon; An image division module, used for dividing the initial image to obtain a plurality of sub-regions; A first weight allocation module, used for allocating a first weight to each sub-region according to a positional relationship between each sub-region and a boundary line; A direction determination module, used for obtaining a first angle through which the initial image is rotated relative to a preset horizontal line direction; The image rotation module is used to obtain a rotated edge image, wherein the dividing line of the rotated edge image is parallel to a preset horizontal line, and the rotation angle is a first angle in the opposite direction. The image rotation module is also used to obtain the coordinates of the rotation center points of each sub-region of the rotated edge image; the first weight allocation module includes: a dividing line judgment block, which is used to obtain the row number of the pixel row where the dividing line is located in the rotated edge image; a comparison block, which is used to compare the ordinate of the rotation center point of each sub-region with the row number of the pixel row where the dividing line is located to obtain a comparison result; and an allocation block, which is used to allocate a first weight to each sub-region according to the comparison result; An automatic exposure statistic calculation module, used to obtain an automatic exposure statistic according to the pixel value of each sub-region and the first weight assigned to each sub-region; The automatic exposure adjustment module is used to adjust the exposure according to the difference between the automatic exposure statistical value and the preset value. The method for adjusting exposure includes: when the automatic exposure statistical value is greater than a preset value, reducing one or more of the exposure time, gain and aperture; when the automatic exposure statistical value is less than the preset value, increasing one or more of the exposure time, gain and aperture.

19. The automatic exposure control device according to claim 18, characterized in that: The direction determination module includes a three-axis gyroscope sensor.

20. The automatic exposure control device according to claim 18, characterized in that: The automatic exposure control device also includes: a pixel average value acquisition module, which is used to obtain the pixel average value of each sub-region according to the pixel value of each sub-region; the automatic exposure statistical value calculation module is used to obtain the automatic exposure statistical value according to the pixel average value of each sub-region and the first weight assigned to each sub-region, and the automatic exposure statistical value is the weighted average value of the pixel average value of each sub-region and the first weight corresponding to each sub-region.

21. The automatic exposure control device according to claim 20, characterized in that: The automatic exposure control device also includes: a contrast acquisition module, used to acquire the contrast of each of the sub-areas; a second weight assignment module, used to assign a second weight to each sub-area according to the contrast; the automatic exposure statistical value calculation module is also used to acquire the automatic exposure statistical value according to the pixel average value of each sub-area, the first weight assigned to each sub-area, and the second weight assigned to each sub-area, and the automatic exposure statistical value is the weighted average of the pixel average value of each sub-area and the corresponding first weight and second weight.

22. The automatic exposure control device according to claim 18, characterized in that: The gain includes analog gain and digital gain.

Citation Information

Patent Citations

  • Exposure control method, apparatus and movable platform

    WO2021007690A1