Image adjusting method, electronic device and non-transient computer readable storage medium
By adjusting the brightness value of the block in the image when the target range is not within the target range, the problem of overexposed bright parts in the image adjustment method is solved, and the accuracy of feature extraction is improved.
Patent Information
- Application Number
- CN202410419174.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-13
- Filing Date
- 2024-04-09
- Publication Date
- 2025-05-13
AI Technical Summary
Existing image adjustment methods may cause overexposed bright parts of the image when adjusting exposure and gain, resulting in missing features.
By calculating the brightness values of multiple blocks of the image, and adjusting the brightness values of these blocks when the brightness values are not within the target range to generate the adjusted block so that their brightness values are within the target range.
It effectively avoids overexposure of bright parts of the image, retains the details of the image, and improves the accuracy of feature extraction.
Smart Images

Figure CN119996839A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to an image adjustment method, an electronic device, and a non-transitory computer-readable storage medium. Specifically, embodiments of the present disclosure relate to an image adjustment method, an electronic device, and a non-transitory computer-readable storage medium including a simultaneous localization and mapping (SLAM) system. Background Art
[0002] Most image adjustment methods control exposure and gain and apply the adjusted exposure and gain to the entire image. However, an image may contain some bright portions as well as dark portions in the entire image. If the adjusted exposure and gain are applied to the entire image, the bright portions of the adjusted image may be overexposed and details of the image may be lost. When an electronic device extracts features from the adjusted image, the features located in the overexposed portions of the adjusted image may be omitted. Summary of the invention
[0003] Some embodiments of the present disclosure are related to an image adjustment method, which is applicable to an electronic device. The image adjustment method includes the following steps: calculating multiple block brightness values of multiple blocks of an image; when the first block brightness value of the first block is not within a target brightness value range, adjusting the first block brightness value of a first block of the multiple blocks to generate a first adjusted block, so that the first adjusted block brightness value of the first adjusted block is within the target brightness value range; and replacing the first block of the image with the multiple first adjusted blocks to obtain an adjusted image.
[0004] In some embodiments, the method further includes extracting a plurality of features according to the adjusted image.
[0005] In some embodiments, the method further includes: expanding the first block to obtain a first area; when the first block brightness value of the first block is not within the target brightness value range, adjusting a first area brightness value of the first area to generate a first adjusted area; and replacing the first area of the image with the first adjusted area to obtain the adjusted image.
[0006] In some embodiments, the first region includes the first block and the first region is larger than the first block.
[0007] In some embodiments, the method further includes: when the first block brightness value of the first block is not within the target brightness value range, determining whether a first gradient value of the first block is higher than a gradient threshold; and when the first block brightness value of the first block is not within the target brightness value range and the first gradient value of the first block is higher than a gradient threshold, adjusting the first block brightness value of the first block of the plurality of blocks to generate the first adjusted block, so that the first adjusted block brightness value is within the target brightness value range.
[0008] In some embodiments, the method further includes: expanding the first block to obtain a first area; when the first block brightness value of the first block is not within the target brightness value range and a first gradient value of the first block is higher than a gradient threshold, adjusting a first area brightness value corresponding to a first area of the first block to generate a first adjusted area, so that the first adjusted block brightness value is within the target brightness value range; and replacing the first area of the image with the first adjusted area to obtain the adjusted image.
[0009] In some embodiments, the method further includes: when the first block brightness value of the first block is not within the target brightness value range and the first gradient value of the first block is not higher than the gradient threshold, maintaining the first block brightness value of the first block of the plurality of blocks.
[0010] Some embodiments of the present disclosure are related to an electronic device, including a camera and a processor. The camera is used to capture an image of a real space. The processor is coupled to the camera. The processor is used to: calculate multiple block brightness values of multiple blocks of the image; when the first block brightness value of the first block is not within a target brightness value range, adjust the first block brightness value of the first block of the multiple blocks to generate a first adjusted block, so that the first adjusted block brightness value of the first adjusted block is within the target brightness value range; and replace the first block of the image with the first adjusted block to obtain an adjusted image.
[0011] In some embodiments, the processor is further configured to extract a plurality of features according to the adjusted image.
[0012] In some embodiments, the processor is further configured to: expand the first block to obtain a first area; when the first block brightness value of the first block is not within the target brightness value range, adjust a first area brightness value of the first area to generate a first adjusted area; and replace the first area of the image with the first adjusted area to obtain the adjusted image.
[0013] Another aspect of the present disclosure discloses a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to perform the aforementioned image adjustment method.
[0014] It should be noted that the above description and the subsequent detailed description are exemplary embodiments of the present invention and are used to assist in the explanation and understanding of the invention content claimed in the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to make the above and other purposes, features, advantages and embodiments of the present disclosure more clearly understood, the accompanying drawings are described as follows:
[0016] Figure 1 is a schematic diagram of an electronic device according to some embodiments of the present disclosure.
[0017] Figure 2 is a flow chart of an image adjustment method according to some embodiments of the present disclosure.
[0018] Figure 3 It is a schematic diagram of one step of an image adjustment method shown in some embodiments of the present disclosure.
[0019] Figure 4A It is a schematic diagram of a region to be adjusted according to some embodiments of the present disclosure.
[0020] Figure 4B is a schematic diagram of an adjusted area according to some embodiments of the present disclosure.
[0021] Figure 5A It is a schematic diagram of a brightness value histogram of a region before adjustment according to some embodiments of the present disclosure.
[0022] Figure 5B It is a schematic diagram of a histogram of brightness values of an adjusted area according to some embodiments of the present disclosure.
[0023] Figure 6 It is a schematic diagram of one step of an image adjustment method shown in some embodiments of the present disclosure.
[0024] Figure 7 is a schematic diagram of an adjusted image according to some embodiments of the present disclosure.
[0025] Explanation of symbols:
[0026] 100: Electronic devices
[0027] 110: Camera
[0028] 130: Processor
[0029] 150: Storage device
[0030] 200: Image adjustment method
[0031] S210, S220, S230, S240, S245: Steps
[0032] S250,S260,S270,S280,S290: Steps
[0033] P11, P12, P13, P14, P15: Block
[0034] P21, P22, P23, P24, P25: Block
[0035] P31, P32, P33, P34, P35: Block
[0036] P41, P42, P43, P44, P45: Block
[0037] A11, A12, A13, A14, A15: Area
[0038] A21, A22, A23, A24, A25: Area
[0039] A31, A32, A33, A34, A35: Area
[0040] A41,A42,A43,A44,A45: Area
[0041] BL1, BL2, BL3, BL4: Boundary lines
[0042] IMGA: Imaging
[0043] CP: Center part
[0044] EP:Edge
[0045] A32A: Adjusted area
[0046] P32A: Adjusted block
[0047] 500A: Brightness value histogram
[0048] 500B: Brightness value histogram
[0049] IMGB: Image
[0050] IMGC: Imaging DETAILED DESCRIPTION
[0051] The following disclosure provides many different embodiments or examples for implementing different features of the present disclosure. The elements and configurations in the specific examples are used to simplify the present disclosure in the following discussion. Where appropriate, the same reference numerals are used between the drawings and in the corresponding text descriptions to represent the same or similar elements.
[0052] It should be understood that in the description herein and the appended claims, although the terms "first", "second", etc. may be used to describe various elements, these elements should not be limited to these terms being used only to distinguish one element from another. For example, a first element may be referred to as a second element, and, similarly, a second element may be referred to as a first element without departing from the scope of the embodiments.
[0053] It should be understood that in the description herein and the appended claims, the terms "include" or "comprises", "have" or "contains" and similar terms should be interpreted as open-ended, that is, meaning including but not limited to.
[0054] It should be understood that in the description herein and the claims that follow, "and / or" includes any and all combinations of one or more of the associated listed items.
[0055] See also Figure 1 . Figure 1 1 is a schematic diagram of an electronic device 100 according to some embodiments of the present disclosure. The electronic device 100 can be used to execute a simultaneous positioning and map creation system. The simultaneous positioning and map creation system includes steps such as image capture, feature extraction from the image, and positioning the feature. The details of the simultaneous positioning and map creation system are not described in detail here.
[0056] Specifically, in some embodiments, the electronic device 100 can be applied to a virtual reality (VR) / mixed reality (MR) / augmented reality (AR) system. For example, the electronic device 100 can be implemented through an independent head mounted device (HMD) or a VIVE head mounted device or a tracking device (self-tracking device). Specifically, the independent head mounted device or the VIVE head mounted device or the tracking device can process positioning data such as position and rotation, image processing, or other data calculations.
[0057] like Figure 1 As shown, the electronic device 100 includes a camera 110, a processor 130, and a storage device 150. The storage device 150 stores one or more programs and can be executed by the processor 130 to perform the image adjustment method.
[0058] The processor 130 is electrically connected to the camera 110 and the storage device 150. In some embodiments, the processor 130 can be implemented by one or more processing circuits, such as a central processing circuit and / or a microprocessor circuit, but the embodiments of the present disclosure are not limited thereto. In some embodiments, the storage device 150 includes one or more storage units, each of which includes or includes a plurality of computer-readable storage media. The computer-readable storage medium may include a read-only memory (ROM), a flash memory, a disk, a hard disk, an optical disk, a portable disk, a portable drive device, a tape, a database accessible from a network, and / or any storage medium with the same function that can be thought of by a person of ordinary skill in the art to which the present disclosure belongs.
[0059] The camera 110 is used to obtain one or more images of the real space in which the electronic device 100 operates. In some embodiments, the camera 110 can be implemented by a camera circuit device or any other camera circuit. It should be noted that, Figure 1 The embodiments shown in the drawings are only used as examples, and the embodiments of the present disclosure are not limited thereto.
[0060] See also Figure 2 In order to better understand the present invention, Figure 2 The detailed steps of the electronic device 100 are discussed with reference to the illustrated embodiment. Figure 2 is a flow chart of an image adjustment method 200 according to some embodiments of the present disclosure. It should be noted that the image adjustment method 200 can be applied to Figure 1 The electronic device 100 shown in FIG. 1 is an electronic device with the same or similar structure. Figure 1 The embodiment shown in FIG. 2 is used as an example to describe the image adjustment method 200 of some embodiments of the present disclosure. However, the present disclosure is not limited to application to Figure 1 The embodiment shown in FIG. Figure 2 As shown, the image adjustment method 200 includes steps S210 to S290.
[0061] In step S210, an image in real space is captured. Figure 1 In some embodiments, the camera 110 captures the image and transmits the image to the processor 130 .
[0062] In step S220, a plurality of blocks in the image are selected. In some embodiments, step S220 is performed by Figure 1 The processor 130 in executes.
[0063] Please also read Figure 3 . Figure 3 is a schematic diagram of one step in an image adjustment method 200 according to some embodiments of the present disclosure.
[0064] Figure 3 The image IMGA in is the original image obtained by the camera 110. Figure 3 As shown, the image IMGA includes a plurality of blocks P11 to P45 . The blocks P11 to P45 are selected by the processor 130 .
[0065] Blocks P11 to P45 are scattered in the image IMGA, and Figure 3 The number and positions of the blocks P11 to P45 shown in FIG. 4 are for illustration purposes only, and the embodiments of the present invention are not limited thereto.
[0066] In some embodiments, these blocks are only located in the central portion CP of the image IMGA, but not in the edge portion EP of the image IMGA, which is not used during feature extraction because the edge portion EP of the image IMGA contains image distortion.
[0067] The definition of the edge part EP and the center part CP depends on the distortion of the image IMGA. Figure 3 In the embodiment of the present invention, the central portion CP is the portion of the image IMGA within the boundary lines BL1 to BL4, and the edge portion EP is the portion of the image IMGA outside the boundary lines BL1 to BL4.
[0068] In some embodiments, the number of blocks P11 to P45 is defined by the processor 130 before the image adjustment method 200. The number of blocks P11 to P45 depends on and is proportional to the resolution of the image IMGA. In some embodiments, the number of blocks P11 to P45 is defined by the processor 130 before the image adjustment method 200.
[0069] In step S230, a plurality of block brightness values of the block are calculated. In some embodiments, step S230 is performed by Figure 1 The processor 130 in the embodiment is executed. Calculate the brightness values of the plurality of blocks. In some embodiments, step S230 is performed by Figure 1 The processor 130 in executes.
[0070] In some embodiments, in step S230, the processor 130 calculates the block brightness value of each block P11 to P45. In some embodiments, when obtaining the block brightness value of each block P11 to P45, the processor 130 samples the pixels of each block P11 to P45 to calculate the block brightness value of each block P11 to P45.
[0071] Taking block P11 as an example, in some embodiments, the processor 130 selects a plurality of pixels of block P11, and the processor 130 calculates an average brightness value according to the brightness values of the selected pixels. The average brightness value is used as the brightness value of block P11.
[0072] In some embodiments of the present invention, the block brightness value represents the average brightness value of the pixels of the block, and the region brightness value represents the average brightness value of the pixels of the region.
[0073] Please refer to Figure 3 In some embodiments, the image IMGA is divided into a plurality of regions. In some embodiments, only the central portion CP of the image IMGA is divided into a plurality of regions A11 to A45, such as Figure 3 shown.
[0074] like Figure 3 As shown, the areas A11 to A45 do not overlap with each other. Each block P11 to P45 corresponds to one of the areas A11 to A45. That is, each area A11 to A45 contains one of the blocks P11 to P45. The areas A11 to A45 are extended from the blocks P11 to P45 and are larger than the blocks P11 to P45.
[0075] In some other embodiments, the blocks P11 to P45 are the same size as the corresponding areas A11 to A15. It should be noted that any size of the corresponding areas A11 to A45 extending from the blocks P11 to P45 is within the scope of the embodiments of the present disclosure.
[0076] In some embodiments, in step S230 , after calculating the block brightness values of the blocks P11 to P45 , the block brightness values of the blocks P11 to P45 are used as the area brightness values of the areas A11 to A45 corresponding to the blocks P11 to P45 .
[0077] Please refer back to Figure 2 In step S240, it is determined whether the brightness value of each block is within the target brightness value range. In some embodiments, step S240 is performed as follows Figure 1 The processor 130 shown executes: When the block brightness value is not within the target brightness value range, step S280 is executed. On the contrary, when the block brightness value is within the target brightness value range, step S245 is executed.
[0078] In some embodiments, the target brightness value range includes an upper limit and a lower limit. A block brightness value that is higher than the upper limit or lower than the lower limit is determined to be not within the target brightness value range.
[0079] In step S245, the gradient value of the block is calculated. In some embodiments, step S245 is performed as follows Figure 1 The processor 130 is shown executing.
[0080] For example, see also Figure 2 as well as Figure 3In some embodiments, the processor 130 determines in step S240 that the block brightness value of the block P32 is not within the target brightness value range. When determining that the block brightness value of the block P32 is not within the target brightness value range, the processor 130 further recalculates the brightness value of the block P32.
[0081] The following Figure 3 The block P32 shown is used as an example for explanation. The steps of other blocks are similar to the steps of block P32.
[0082] In step S250, it is determined whether the gradient value of each block is higher than the gradient threshold. In some embodiments, step S250 is performed by the processor 130. When the gradient value of the block is higher than the gradient threshold, step S250 is performed. On the other hand, when the gradient value of the block is not equal to the gradient threshold, step S280 is performed.
[0083] In step S260, the corresponding area is obtained by expanding the block, and the regional brightness value of the area corresponding to the block is adjusted so that the brightness value of the adjusted block is within the target block brightness value range. Figure 1 The processor 130 is shown executing.
[0084] Please also see Figure 3 For example, in some embodiments, the block brightness value of block P32 is not within the target block brightness value range and the gradient value of block P32 is higher than the gradient threshold, such as Figure 1 The processor 130 shown expands the block P32 to obtain the corresponding area A32 , and then the processor 130 adjusts the area brightness value of the area A32 .
[0085] The processor 130 does not expand the block P32 and only adjusts the block brightness value of the block P32.
[0086] In some embodiments, when the block brightness value of block P32 is not higher than the lower limit of the target brightness value range, the processor 130 increases the regional brightness value of area A32. On the other hand, when the regional brightness value of block P32 reaches the upper limit of the target brightness value range, the processor 130 decreases the regional brightness value of area A32.
[0087] Please also see Figure 4A and Figure 4B . Figure 4A It is a schematic diagram of a region A32 to be adjusted according to some embodiments of the present disclosure. Figure 4B is a schematic diagram of an adjusted area A32A according to some embodiments of the present disclosure.
[0088] In one embodiment, the processor 130 obtains the area A32 corresponding to the block P32 from the original image IMGA, such as Figure 3 After adjusting the regional brightness value of region A32, the processor 130 generates an adjusted region A32A, as shown in FIG. Figure 4B shown.
[0089] In some embodiments, after adjusting the regional brightness value of region A32 and generating the adjusted region A32A, the processor 130 calculates the block brightness value of the adjusted block P32A to ensure that after adjustment, the adjusted block brightness value of the adjusted block P32A is within the target brightness value range.
[0090] In some other embodiments, the adjusted block brightness value of the adjusted block P32A is used as the adjusted region brightness value of the adjusted region A32A.
[0091] In some embodiments, the processor 130 adjusts the regional brightness value of the region A32 according to the brightness value histogram of the region A32. However, any method of adjusting the brightness value of the image is within the scope of the embodiments of the present disclosure.
[0092] Please also see Figure 5A and Figure 5B . Figure 5A is a schematic diagram of a brightness value histogram 500A of a region before adjustment according to some embodiments of the present disclosure. Figure 5B is a schematic diagram of a brightness value histogram 500B of an adjusted region according to some embodiments of the present disclosure.
[0093] In some embodiments, the brightness value histogram 500A is Figure 4A The brightness value histogram of the middle area A32 is shown in FIG. 500B , while the brightness value histogram 500B is shown in FIG. Figure 4B : A histogram of the brightness values of the adjusted area A32A.
[0094] like Figure 5A As shown, most of the brightness values fall at a lower brightness value, resulting in the block brightness value of the block P32 corresponding to the area A32 not being higher than the lower limit of the target brightness value range. After adjusting the area brightness value of the area A32 by balancing the pixel values of the area A32, since the pixel brightness values of the adjusted area A32A are relatively average between different brightness values, the block brightness value of the adjusted block P32A corresponding to the adjusted area A32A is higher.
[0095] After adjusting the brightness value of region A32 by equalizing the pixel values of region A32, the brightness value of region A32A after adjustment is higher than that of region A32, and the contrast value or brightness value of region A32A after adjustment is higher.
[0096] In step S270, the adjusted region is applied to the image to obtain an adjusted image. In some embodiments, step S270 is performed by Figure 1 The processor 130 in executes.
[0097] For example, in some embodiments, the processor 130 performs the following operations: Figure 4B The adjusted area A32A shown replaces the area A32 of the image IMGA, and the processor 130 generates the following Figure 6 The adjusted image IMGB is shown.
[0098] In the embodiment of the adjusted image IMGB, only the area A32 is replaced by the adjusted area A32A. However, other areas whose block brightness values are not within the target brightness value range and whose block gradient values are higher than the gradient threshold value are also replaced by the adjusted area.
[0099] Please refer again Figure 3 In one embodiment, the block brightness values of blocks P11, P12, P13, P21, P22, P25, P31, P32 and P42 are not within the target value range, while the other blocks are within the target value range. In addition, in blocks P11, P12, P13, P21, P22, P25, P31, P32, P42, the gradient values of blocks P12, P22, P32 and P42 are all higher than the gradient threshold. Then, only the areas A12, A22, A32 and A42 corresponding to blocks P12, P22, P32 and P42 are adjusted and replaced by the corresponding adjusted areas.
[0100] like Figure 7 As shown, after the regions A12, A22, A32 and A42 are replaced by the adjusted regions A12A, A22A, A32A and A42A, an adjusted image IMGC is generated.
[0101] Please refer again Figure 2 In step S280, the original brightness value is maintained. For example, please refer to Figure 3. The block brightness values of blocks P14, P15, P23, P24, P33, P34, P35, P41, P43, P44 and P45 are all within the target value range. The block brightness values of blocks P11, P13, P21, P25 and P31 are not within the target value range, but the gradient values of blocks P11, P13, P21, P25 and P31 are not higher than the gradient threshold. The block brightness values of blocks P14, P15, P23, P24, P33, P34, P35, P41, P43, P44, P45 and P11, P13, P21, P25, P31 remain unchanged and are maintained. In addition, the brightness values of the areas A14, A15, A23, A24, A33, A34, A35, A41, A43, A44, A45 corresponding to blocks P14, P15, P23, P24, P33, P34, P35, P41, P43, P44, P45 and P11, P13, P21, P25, P31 and A11, A13, A21, A25, A31 also remain unchanged and are maintained.
[0102] Please refer again Figure 2 In step S290, a plurality of features are extracted based on the adjusted image. In some embodiments, Figure 1 The processor 130 shown is based on Figure 7 The image IMGC shown extracts multiple features. The feature extraction method is not described in detail here. If the brightness value is not adjusted in step S260, in step S290, feature extraction is performed based on the original image captured in step S210.
[0103] like Figure 7 As shown, since the brightness value of the area containing trees is higher after adjustment, the features of the trees can be extracted more accurately.
[0104] The embodiments of the present case provide an image adjustment method, an electronic device, and a non-transitory computer-readable storage medium. Based on the block brightness values of the blocks of the image, the features in the blocks that are too bright or too dark or cannot be distinguished when extracting features can be identified and selected. By adjusting the selected blocks, the brightness values of the areas corresponding to the selected blocks can be adjusted independently. After the areas corresponding to the selected blocks are independently adjusted, the brightness values of the adjusted areas are all within the target brightness value range. When the brightness value of the area is adjusted, the contrast of the area is higher, and more features can be extracted, thereby improving the quality of the simultaneous positioning and mapping system. In addition, for areas that are originally within the target brightness value range, the brightness values will not be adjusted, and these areas will not be affected.
[0105] Furthermore, since regions with higher gradient values contain higher contrast and are more likely to contain more features, processing time and processing load can be reduced by selecting and adjusting regions corresponding to higher gradient values and not adjusting regions corresponding to lower gradient values.
[0106] In an environment with uneven lighting conditions, the embodiment of the present invention can independently adjust the area of the captured image, so that more features can be extracted from the captured image.
[0107] It should be noted that, unless otherwise specified, the steps of the above-mentioned image adjustment method 200 have no particular order. In addition, the steps may also be executed simultaneously, or the execution time may at least partially overlap.
[0108] Furthermore, according to various embodiments of the present disclosure, the steps of the image adjustment method 200 may be appropriately added, replaced, and / or eliminated.
[0109] Various functional components or blocks have been described herein. As will be appreciated by those skilled in the art, the functional blocks will preferably be implemented by circuits (whether dedicated circuits or general purpose circuits, operating under the control of one or more processing circuits and coded instructions), which typically include transistors or other circuit elements that are configured to control the circuits according to the functions and steps described herein.
[0110] Although embodiments of the present invention have been described in considerable detail, other embodiments are possible. Therefore, the scope of the appended claims should not be limited to the description of the embodiments contained herein.
[0111] Although the present invention is disclosed in the above embodiments, it is not intended to limit the present invention. Anyone skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. An image adjustment method, applicable to an electronic device, characterized in that: The image adjustment method comprises: Calculating a plurality of block brightness values of a plurality of blocks of an image; When the first block brightness value of the first block is not within a target brightness value range, adjusting a first block brightness value of a first block of the plurality of blocks to generate a first adjusted block, so that a first adjusted block brightness value of the first adjusted block is within the target brightness value range; as well as The first block of the image is replaced with the first adjusted block to obtain an adjusted image.
2. The image adjustment method according to claim 1, wherein: Also includes: A plurality of features are extracted according to the adjusted image.
3. The image adjustment method according to claim 1, wherein: Also includes: Expanding the first block to obtain a first area; When the first block brightness value of the first block is not within the target brightness value range, adjusting a first region brightness value of the first area to generate a first adjusted area; as well as The first area of the image is replaced by the first adjusted area to obtain the adjusted image.
4. The image adjustment method according to claim 3, wherein: The first region includes the first block and the first region is larger than the first block.
5. The image adjustment method according to claim 1, wherein: Also includes: When the first block brightness value of the first block is not within the target brightness value range, determining whether a first gradient value of the first block is higher than a gradient threshold; as well as When the first block brightness value of the first block is not within the target brightness value range and the first gradient value of the first block is higher than a gradient threshold, the first block brightness value of the first block of the plurality of blocks is adjusted to generate the first adjusted block, so that the first adjusted block brightness value is within the target brightness value range.
6. The image adjustment method according to claim 5, wherein: Also includes: Expanding the first block to obtain a first area; When the first block brightness value of the first block is not within the target brightness value range and a first gradient value of the first block is higher than a gradient threshold, adjusting a first region brightness value corresponding to a first region of the first block to generate a first adjusted region, so that the first adjusted block brightness value is within the target brightness value range; as well as The first area of the image is replaced by the first adjusted area to obtain the adjusted image.
7. The image adjustment method according to claim 5, wherein: Also includes: When the first block brightness value of the first block is not within the target brightness value range and the first gradient value of the first block is not higher than the gradient threshold, the first block brightness value of the first block of the plurality of blocks is maintained.
8. An electronic device, characterized in that: Include: a camera for capturing an image of a real space; and a processor coupled to the camera, wherein the processor is configured to: Calculating a plurality of block brightness values of a plurality of blocks of the image; When the first block brightness value of the first block is not within a target brightness value range, adjusting a first block brightness value of a first block of the plurality of blocks to generate a first adjusted block, so that a first adjusted block brightness value of the first adjusted block is within the target brightness value range; as well as The first block of the image is replaced with the first adjusted block to obtain an adjusted image.
9. The electronic device as claimed in claim 8, characterized in that: The processor is further configured to: A plurality of features are extracted according to the adjusted image.
10. The electronic device as claimed in claim 8, characterized in that The processor is further configured to: expand the first block to obtain a first area; When the first block brightness value of the first block is not within the target brightness value range, adjusting a first region brightness value of the first area to generate a first adjusted area; as well as The first area of the image is replaced by the first adjusted area to obtain the adjusted image.
11. A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to perform an image adjustment method, characterized in that: The image adjustment method comprises: Calculating a plurality of block brightness values of a plurality of blocks of an image; When the first block brightness value of the first block is not within a target brightness value range, adjusting a first block brightness value of a first block of the plurality of blocks to generate a first adjusted block, so that a first adjusted block brightness value of the first adjusted block is within the target brightness value range; as well as The first block of the image is replaced with the first adjusted block to obtain an adjusted image.