Image processing method, image processing device and storage medium

By determining the target area in image processing and using the vignetting intensity parameter and random amount to calculate the brightness drop value, the problem of balancing efficiency and effect in existing methods is solved, and an efficient and natural vignetting effect is achieved.

CN120751248AActive Publication Date: 2025-10-03HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410748639.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2025-10-03
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

Existing methods for adding vignetting to images cannot simultaneously take into account processing efficiency and effects. Some methods have high computational complexity, resulting in low efficiency, while some methods have poor effects.

Method used

By obtaining the image to be processed and the vignetting intensity parameters, the target area is determined, and the brightness drop value of the pixel point is calculated using the vignetting intensity parameters and the random amount. The brightness value of the vignetting area of ​​the image is adjusted, and the calculation process is optimized using technologies such as two-dimensional arrays and parabolic interpolation.

Benefits of technology

While ensuring good image vignetting processing effects, the processing efficiency is significantly improved, the amount of calculation is reduced, and a natural vignetting transition is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751248A_ABST
    Figure CN120751248A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image processing method, an image processing device and a storage medium, and aims to improve the image vignetting processing efficiency under the condition of ensuring a good image vignetting processing effect. The image processing method provided by the invention comprises the following steps: acquiring a to-be-processed image and a vignetting intensity parameter; determining a target area from the vignetting adding area; determining a brightness decline value of each pixel point in the target area by using the vignetting intensity parameter and the vignetting intensity random quantity of the target area; and adjusting the brightness value of each pixel point in the vignetting adding area by using the brightness decline value of each pixel point in the target area. In the implementation scheme, the vignetting intensity random quantity is introduced when the to-be-processed image is subjected to vignetting processing, so that the image vignetting processing effect is improved; and when the to-be-processed image is subjected to vignetting processing, only the brightness decline value of the target area needs to be calculated, and the brightness decline value of each pixel point in the vignetting adding area does not need to be calculated, so that the image vignetting processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, an image processing device, and a storage medium. Background Art

[0002] Vignetting refers to the darkening of the corners of the image when photographing a scene. In the hands of some photographers or designers, appropriate vignetting can be used as a visual language to enhance the three-dimensionality and visual impact of the image.

[0003] However, some of the existing methods for adding vignetting to images have a large amount of computation, resulting in low efficiency in image vignetting processing, while other methods have a poor effect in image vignetting processing. That is, the existing methods for adding vignetting to images cannot simultaneously take into account both the efficiency and effect of image vignetting processing. Summary of the Invention

[0004] The present application provides an image processing method, an image processing device and a storage medium, the purpose of which is to improve the efficiency of image vignetting processing while ensuring a good image vignetting processing effect.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A first aspect of the present application provides an image processing method, the method comprising:

[0007] Acquire an image to be processed and a vignetting intensity parameter, wherein the vignetting intensity parameter is an initial value of brightness reduction of a vignetting area in the image to be processed;

[0008] Determine a target area from the dark corner adding area, wherein the target area includes at least one corner of the image to be processed;

[0009] Determining a brightness drop value of each pixel in the target area using the vignetting intensity parameter and a random amount of vignetting intensity in the target area, wherein the brightness drop value of each pixel in the target area is positively correlated with a distance between each pixel in the target area and a center point of the image to be processed;

[0010] The brightness value of each pixel in the dark corner adding area is adjusted using the brightness reduction value of each pixel in the target area.

[0011] In the above implementation scheme, a random amount of vignetting intensity is introduced when performing vignetting on the image to be processed, so that after the brightness drop value generated based on the vignetting intensity parameter and the random amount of vignetting intensity is used to adjust the brightness value of each pixel point in the vignetting added area of ​​the image to be processed, the image vignetting transition in the adjusted image to be processed is smooth and natural, thereby improving the image vignetting processing effect; and when performing brightness adjustment on the image to be processed, it is only necessary to calculate the brightness drop value of the target area in the vignetting added area, without calculating the brightness drop value of each pixel point in the vignetting added area, thereby reducing the amount of computation during image vignetting processing and improving the image vignetting processing efficiency, thereby improving the image vignetting processing efficiency while ensuring a good image vignetting processing effect.

[0012] In a possible implementation of the first aspect of the present application, the determining of the target area from the vignetting area includes: determining attribute data of the image to be processed, the attribute data including length and width; creating a two-dimensional array based on the attribute data, the two-dimensional array being used to record the brightness drop value of each pixel in the target area, each element in the two-dimensional array corresponding to a pixel in the target area. In the above implementation scheme, the target area can be determined from the vignetting area by constructing a two-dimensional array including the position information of the target area, so that after calculating the brightness drop value of the target area, the brightness drop value of each pixel in the vignetting area can be determined based on the brightness drop value of the target area, thereby making it possible to calculate the brightness drop value of the target area in the vignetting area when performing vignetting processing on the image to be processed, without calculating the brightness drop value of each pixel in the vignetting area, thereby reducing the amount of computation during image vignetting processing and improving the efficiency of image vignetting processing, thereby improving the efficiency of image vignetting processing while ensuring a good image vignetting effect.

[0013] In a possible implementation of the first aspect of the present application, determining the brightness drop value of each pixel in the target area using the vignetting intensity parameter and the vignetting intensity random amount of the target area includes: performing parabolic interpolation based on the vignetting intensity parameter and the distance between each pixel in the target area and the center point of the image to be processed to obtain the brightness drop value to be adjusted for each pixel in the target area; generating the vignetting intensity random amount of the target area; and subtracting the brightness drop value to be adjusted for each pixel in the target area from the vignetting intensity random amount to obtain the brightness drop value for each pixel in the target area. In the above implementation, parabolic interpolation can be first performed based on the vignetting intensity parameter and the position of each pixel in the target area to obtain the brightness drop value to be adjusted for each pixel in the target area; and then further adjusting the brightness drop value to be adjusted for each pixel in the target area based on the generated vignetting intensity random amount to obtain the brightness drop value for each pixel in the target area, so that after adjusting the brightness value of each pixel in the vignetting addition area in the image to be processed based on the brightness drop value of each pixel in the target area, the image vignetting transition in the adjusted image to be processed is smooth and natural, thereby improving the image vignetting processing effect.

[0014] In a possible implementation of the first aspect of the present application, the random amount of vignetting intensity follows a normal distribution with an expected value of 0. In the above implementation, the random amount of vignetting intensity in the target area can be a random amount normally distributed near 0, which is used to further adjust the vignetting intensity parameter input by the user to determine the brightness drop value of each pixel in the target area. That is, by utilizing the random amount of vignetting intensity in the target area, when vignetting is performed on the image to be processed based on the brightness drop value of each pixel in the target area determined based on the vignetting intensity parameter and the random amount of vignetting intensity, the vignetting transition in the resulting target image is smooth and natural, thereby improving the image vignetting effect.

[0015] In a possible implementation of the first aspect of the present application, the multiple pixel points included in the target area are divided into multiple pixel point sets, and the random amount of dark corner intensity of each pixel point in each pixel point set is the same. In the above implementation scheme, when generating the random amount of dark corner intensity of the target area, the pixel points in the target area can be first divided into multiple pixel point sets, each pixel point set includes multiple pixel points, and the same random amount of dark corner intensity can be determined for each pixel point in each pixel point set, that is, the multiple pixel points in the target area can be assigned the same random amount of dark corner intensity, that is, the multiple pixel points in the target area only need to generate one random amount of dark corner intensity, so that the image dark corner transition in the target image can be made smooth and natural, and the image dark corner processing effect can be improved, while further reducing the amount of computation during image dark corner processing and improving the image dark corner processing efficiency.

[0016] In a possible implementation of the first aspect of the present application, the brightness value of each pixel point in the dark corner adding area is adjusted by using the brightness drop value of each pixel point in the target area, including: determining the brightness drop value of the dark corner adding area according to the brightness drop value of the target area; reading the brightness channel parameters of each pixel point in the dark corner adding area; and adjusting the brightness channel parameters of each pixel point in the dark corner adding area according to the brightness drop value of the dark corner adding area. In the above implementation scheme, after generating the brightness drop value of each pixel point in the target area, the brightness drop value of each pixel point in the entire dark corner adding area can be further generated based on the brightness drop value of each pixel point in the target area, and then the brightness channel parameters of each pixel point in the dark corner adding area can be adjusted based on the brightness drop value of each pixel point in the dark corner adding area, without having to calculate and generate the brightness drop value corresponding to each pixel point in the entire dark corner adding area from the beginning, thereby reducing the amount of computation during image dark corner processing and improving the efficiency of image dark corner processing.

[0017] In a possible implementation of the first aspect of the present application, the brightness drop value of the dark corner adding area is determined based on the brightness drop value of the target area, including: respectively determining the corresponding pixel points of each pixel point in the target area in other areas of the dark corner adding area, the corresponding pixel points and each pixel point in the target area are centrally symmetric about the center point of the image to be processed; and determining the brightness drop value of each pixel point in the target area as the brightness drop value of the corresponding pixel point. In the above implementation scheme, the corresponding pixel points of each pixel point in the target area in other areas of the dark corner adding area can be determined based on the principle of central symmetry, and then the brightness drop value of each pixel point in the target area can be directly determined as the brightness drop value of the corresponding pixel point to obtain the brightness drop value of each pixel point in the dark corner adding area, without having to calculate and generate the brightness drop value corresponding to each pixel point in the entire dark corner adding area from the beginning, thereby reducing the amount of computation during image dark corner processing and improving the efficiency of image dark corner processing.

[0018] In a possible implementation of the first aspect of the present application, after adjusting the brightness value of each pixel in the vignetting area using the brightness drop value of each pixel in the target area, the method includes: obtaining attribute data of the image to be processed, the attribute data including length and width; establishing a correspondence between the attribute data, the vignetting intensity parameter and the brightness drop value of each pixel in the target area; and storing the correspondence and the brightness drop value of each pixel in the target area in a database. In the above implementation scheme, after determining the brightness drop value of each pixel in the target area, the brightness drop value of each pixel in the target area and the correspondence between the brightness drop value of each pixel in the target area and the attribute data and vignetting intensity parameter of the image to be processed can be stored in the database, so that when processing images with the same attribute data and the same vignetting intensity parameter in the future, the brightness drop value of each pixel in the corresponding target area can be directly obtained from the database for image vignetting processing without recalculating the brightness drop value of each pixel in the target area, thereby reducing the amount of computation during image vignetting processing and improving the efficiency of image vignetting processing.

[0019] In a possible implementation of the first aspect of the present application, before determining the target area from the vignetting area, the method further includes: determining the attribute data of the image to be processed, the attribute data including the length and width; if the brightness drop value of each pixel in the target area corresponding to the attribute data and the vignetting intensity parameter is stored in the database, obtaining the brightness drop value of each pixel in the target area from the database; if the brightness drop value of each pixel in the target area corresponding to the attribute data and the vignetting intensity parameter is not stored in the database, executing the step of determining the target area from the vignetting area. In the above implementation scheme, before determining the target area from the vignetting area, it is possible to first determine in the database whether there is a brightness drop value of each pixel in the target area corresponding to the attribute data and the vignetting intensity parameter of the image to be processed. If so, the brightness drop value of each pixel in the corresponding target area can be directly called from the database, thereby eliminating the need to recalculate and generate the brightness drop value of each pixel in the target area, further reducing the amount of calculation during image vignetting processing and improving the efficiency of image vignetting processing.

[0020] A second aspect of the present application provides an image processing device, the device comprising:

[0021] An acquisition module, configured to acquire an image to be processed and a vignetting intensity parameter, wherein the vignetting intensity parameter is an initial value of brightness reduction of a vignetting area in the image to be processed;

[0022] A first determining module is configured to determine a target area from the vignetting area, wherein the target area includes at least one corner of the image to be processed;

[0023] a second determining module, configured to determine a brightness drop value of each pixel in the target area by using the vignetting intensity parameter and a random amount of vignetting intensity in the target area, wherein the brightness drop value of each pixel in the target area is positively correlated with a distance between each pixel in the target area and a center point of the image to be processed;

[0024] The adjustment module is used to adjust the brightness value of each pixel point in the dark corner adding area by using the brightness reduction value of each pixel point in the target area.

[0025] A third aspect of the present application provides an image processing device, comprising: a memory and at least one processor. The memory is configured to store a program, and the at least one processor is configured to execute a computer program or computer instructions stored in the memory, so that the image processing device implements an image processing method provided in the first aspect of the present application.

[0026] The fourth aspect of the present application is a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement an image processing method provided by the first aspect of the present application.

[0027] A fifth aspect of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute an image processing method as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0029] Figure 2 A flowchart of an image processing method provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of a visual interface provided in an embodiment of the present application;

[0031] Figure 4 A schematic diagram of region division of an image to be processed provided in an embodiment of the present application;

[0032] Figure 5 A schematic diagram of the positions of pixels in a target area provided in an embodiment of the present application;

[0033] FIG6( a ) is a schematic diagram showing the effect of an image without adding a random amount of vignetting intensity according to an embodiment of the present application;

[0034] FIG6( b ) is a schematic diagram showing the effect of adding a random amount of vignetting intensity to an image according to an embodiment of the present application;

[0035] Figure 7 A schematic diagram of a target image provided in an embodiment of the present application;

[0036] Figure 8 A schematic diagram of the positions of pixel points in a dark corner adding area provided in an embodiment of the present application;

[0037] Figure 9 A flowchart of another image processing method provided in an embodiment of the present application;

[0038] Figure 10 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.

[0040] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0041] The "multiple" involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first" and "second" are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or order.

[0042] Vignetting refers to the darkening of the corners of the image when photographing a scene. In the hands of some photographers or designers, appropriate vignetting can be used as a visual language to enhance the three-dimensionality and visual impact of the image.

[0043] Currently, commonly used methods for adding vignetting to images include Gaussian blur algorithms, vignetting lens model algorithms, linear / nonlinear interpolation algorithms, inpainting algorithms, and deep learning algorithms. The Gaussian blur algorithm works by applying a Gaussian blur effect to the four corners of an image, with the degree of blur controlled by a user-set radius parameter. While this algorithm offers a natural effect, it also suffers from high computational complexity and poor real-time performance, resulting in low vignetting efficiency. The vignetting lens model algorithm simulates the vignetting effect produced by a real lens. It constructs a mathematical model based on lens specifications (focal length, aperture, etc.) and calculates the transmittance coefficient for each pixel based on image coordinates to achieve vignetting. While the vignetting lens model algorithm offers an accurate physical model, it also suffers from complex parameter settings and high computational complexity, resulting in low vignetting efficiency. Linear / nonlinear interpolation algorithms achieve image vignetting by setting the four corners to black and then performing linear / nonlinear interpolation on the rest of the image. However, linear interpolation is fast but produces a harsh effect, resulting in poor vignetting. Nonlinear interpolation produces a natural effect but requires a high computational load, resulting in low vignetting efficiency. Inpainting algorithms, based on partial differential equations or sample-guided inpainting techniques, first paint the four corners black and then restore the pixels near them using local image features. The advantage of inpainting algorithms is a natural transition, but the disadvantage is computational complexity, resulting in low vignetting efficiency. Deep learning algorithms utilize convolutional neural networks for supervised training on a large number of vignetted images. The network learns the mapping between the vignetted images and the original image to achieve image vignetting. The advantage of deep learning algorithms is that they facilitate parameter adjustment, but the disadvantage is that they require a large amount of labeled training data, resulting in low vignetting efficiency.

[0044] From the above introduction, it can be seen that some of the existing methods for adding vignetting to images have a large amount of computation, resulting in low efficiency in image vignetting processing, while other methods have a poor effect in image vignetting processing. In other words, the existing methods for adding vignetting to images cannot simultaneously take into account both the efficiency and effect of image vignetting processing.

[0045] To overcome the above problems, the embodiments of the present application provide an image processing method, an image processing device, and a storage medium, the purpose of which is to improve the efficiency of image vignetting processing while ensuring a good image vignetting processing effect.

[0046] The electronic device applicable to the image processing method provided by the present application and the specific process of the method are described below in conjunction with embodiments.

[0047] The image processing method provided in the embodiments of the present application can be applied to electronic devices with screens, such as mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The screens of the electronic devices can be OLED screens, etc. The electronic devices in the embodiments of the present application can be image processing devices or other devices. The present application does not impose any restrictions on the specific type of electronic devices.

[0048] For example, Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0049] The electronic device may include a processor 310 , an external memory interface 320 , an internal memory 321 , a display screen 330 , a camera 340 , an antenna 1 , an antenna 2 , a mobile communication module 350 , and a wireless communication module 360 ​​.

[0050] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0051] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0052] It is understood that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0053] External memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with processor 310 via external memory interface 320 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0054] The internal memory 321 can be used to store computer executable program code, and the executable program code includes instructions. The processor 310 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 321. The internal memory 321 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory (UFS), etc. The processor 310 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 321, and / or the instructions stored in the memory provided in the processor.

[0055] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor.

[0056] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0057] The mobile communication module 350 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for electronic devices. The mobile communication module 350 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 350 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 350 can be provided in the processor 310. In some embodiments, at least some of the functional modules of the mobile communication module 350 can be provided in the same device as at least some of the modules of the processor 310.

[0058] In some embodiments, the electronic device initiates or receives a call request via the mobile communication module 350 and the antenna 1 .

[0059] Furthermore, an operating system runs on the aforementioned components, such as the iOS operating system, the Android operating system, and the Windows operating system. Application programs can be installed and run on the operating system. Those skilled in the art will clearly understand that, for ease of description and brevity, the explanation and beneficial effects of the relevant contents of any of the aforementioned electronic devices can be referred to the corresponding method embodiments provided below, and will not be further elaborated here.

[0060] See also Figure 2 , Figure 2 The figure is a flow chart of an image processing method provided in an embodiment of the present application. The image processing method provided in an embodiment of the present application mainly includes the following steps:

[0061] 201. Obtain an image to be processed and a vignetting intensity parameter.

[0062] The vignetting intensity parameter is an initial value for adjusting the brightness of the vignetting area in the image to be processed.

[0063] In an embodiment of the present application, the image to be processed and the vignetting intensity parameter can be obtained first. The image to be processed can be an image that needs to be subjected to image vignetting processing, and the image to be processed input by the user can be obtained, or the image to be processed can be obtained from a database. The vignetting intensity parameter can be the initial value of the brightness adjustment of each pixel point in the vignetting area of ​​the image to be processed set by the user. The vignetting area can be the area in the image to be processed that needs to add image vignetting, that is, it can be the area in the image to be processed that needs brightness adjustment. The vignetting area can be the entire area of ​​the image to be processed, or it can be a partial area in the image to be processed. The user can manually set the vignetting area in the image to be processed, or the vignetting area can be a pre-set default area, which is not limited in the embodiment of the present application. The vignetting area can include the four corners of the image to be processed. It is understandable that the user can instantly transmit the image to be processed through the visual interface, or input an image search instruction through the visual interface, so that the electronic device can extract the image to be processed from the database according to the image search instruction input by the user. The user can also input the vignetting intensity parameter through the visual interface so that the electronic device can perform image vignetting processing on the image to be processed according to the user's needs. Figure 3 As shown, the user can determine and input the vignetting intensity parameter by adjusting the parameter bar on the visual interface. The user can also input the vignetting intensity parameter through the parameter input box on the visual interface.

[0064] Specifically, the image to be processed may be in YUV format. The YUV format is an important image color encoding method. It is designed based on the different sensitivities of the human visual system to brightness and chromaticity. "Y" represents brightness, i.e., grayscale values; "U" and "V" represent chromaticity, which are used to describe image color and saturation. The YUV format is an efficient image color encoding method that achieves effective compression and transmission of image data by separating brightness and chromaticity information and utilizing the difference in the human eye's sensitivity to the two. It has a wide range of applications in video encoding, transmission, and image processing.

[0065] 202. Determine a target area from the dark corner addition area.

[0066] The target area at least includes a corner of the image to be processed.

[0067] In the embodiment of the present application, since the image vignetting in the image to be processed can be centrally symmetrical about the center point of the image to be processed, the target area can be first determined from the vignetting area, and the target area includes a corner of the image to be processed, so that it is only necessary to calculate the brightness drop value of each pixel point in the target area in the vignetting area to deduce the brightness drop value of each pixel point in the entire vignetting area, without calculating the brightness drop value of each pixel point in the vignetting area, thereby reducing the amount of computation during image vignetting processing and improving the image vignetting processing efficiency, thereby improving the image vignetting processing efficiency while ensuring a good image vignetting processing effect.

[0068] In one possible implementation of an embodiment of the present application, attribute data of an image to be processed is determined, the attribute data including length and width; a two-dimensional array is created based on the attribute data, the two-dimensional array being used to record the brightness drop value of each pixel within the target area, with each element in the two-dimensional array corresponding to a pixel within the target area. In an embodiment of the present application, a two-dimensional array including the location information of the target area can be created based on the length and width of the image to be processed, thereby determining the target area from the vignetting area. After calculating the brightness drop value of the target area, the brightness drop value of each pixel within the vignetting area can be determined based on the brightness drop value of the target area. Consequently, when performing vignetting on the image to be processed, only the brightness drop value of the target area within the vignetting area needs to be calculated, without calculating the brightness drop value of each pixel within the vignetting area. This reduces the computational complexity during image vignetting and improves the efficiency of image vignetting, thereby ensuring a good vignetting effect. The two-dimensional array can also be used to record the brightness drop value of each pixel within the target area, i.e., each element in the two-dimensional array corresponds to a pixel within the target area. A two-dimensional array is a data structure that can be viewed as an array composed of multiple one-dimensional arrays that share the same index set. Two-dimensional arrays are commonly used to represent tabular data, matrices, images, and more. In image processing, two-dimensional arrays are a core data structure for representing and manipulating image data.

[0069] Specifically, if Figure 4 As shown, when the dark corner adding area is the entire area of ​​the image to be processed, the target area can be at least one of the upper left area, upper right area, lower left area and lower right area of ​​the image to be processed, that is, the upper left area of ​​the image to be processed can be used as the target area, or the upper left area and the upper right area can be used as the target area at the same time, or the upper left area, the upper right area and the lower right area can be used as the target area at the same time.

[0070] 203. Determine the brightness drop value of each pixel in the target area using the dark corner intensity parameter and the dark corner intensity random amount of the target area.

[0071] The brightness drop value of each pixel in the target area is positively correlated with the distance between each pixel in the target area and the center point of the image to be processed.

[0072] In the embodiment of the present application, in order to make the transition of dark corners in the target image smooth and natural, the brightness drop value of each pixel in the target area obtained by adjusting the dark corner intensity parameter and the random amount of dark corner intensity in the target area can be positively correlated with the distance between the pixel in the target area and the center point of the image to be processed, that is, the brightness drop value of the pixel in the target area close to the center point of the image to be processed can be less than or equal to the brightness drop value of the pixel in the target area far from the center point of the image to be processed. Figure 5 As shown, the distance from the first pixel point a in the target area to the center point of the image to be processed is greater than the distance from the second pixel point b in the target area to the center point of the image to be processed, and the brightness drop value of the first pixel point a can be greater than or equal to the brightness drop value of the second pixel point b.

[0073] It will be appreciated that the random amount of vignetting intensity in the target area can be a random amount normally distributed around 0, used to further adjust the vignetting intensity parameter input by the user to determine the brightness reduction value for each pixel in the target area. Specifically, by utilizing the random amount of vignetting intensity in the target area, when vignetting is performed on the image to be processed based on the brightness reduction value for each pixel in the target area determined based on the vignetting intensity parameter and the random amount of vignetting intensity, the resulting vignetting transition in the target image is smooth and natural, thereby improving the image vignetting effect.

[0074] Specifically, the effect of introducing a random amount of vignetting intensity can be seen in the comparison between Figure 6(a) and Figure 6(b). Figure 6(a) is a schematic diagram of the effect without adding a random amount of vignetting intensity, and Figure 6(b) is a schematic diagram of the effect with the introduction of a random amount of vignetting intensity. By comparing Figures 6(a) and 6(b), it can be seen that the brightness of the vignetting area in Figure 6(a) does not change significantly, and the image vignetting transition is relatively abrupt; while in Figure 6(b), the closer the vignetting area is to the center point of the image to be processed, the higher the brightness is, and the brightness of the pixel point gradually increases as the distance from the center point of the image to be processed decreases, that is, the vignetting transition is softer, smoother and more natural.

[0075] In addition, a two-dimensional array can be created to record the random amount of vignetting intensity in the target area. The size of this two-dimensional array can be the product of the width and height of the image to be processed divided by 16. This array can be named the random amount table of vignetting intensity. The random amount table of vignetting intensity can include the position information of each pixel in the target area and the random amount of vignetting intensity for each pixel in the target area.

[0076] In one possible implementation of the embodiment of the present application, parabolic interpolation can be performed based on the vignetting intensity parameter and the distance between each pixel in the target area and the center point of the image to be processed to obtain the brightness reduction value to be adjusted for each pixel in the target area; a random amount of vignetting intensity can be generated for the target area; and the brightness reduction value to be adjusted for each pixel in the target area can be subtracted from the random amount of vignetting intensity to obtain the brightness reduction value for each pixel in the target area. It can be understood that in the embodiment of the present application, the vignetting intensity parameter can be first used as the initial brightness reduction value of the pixel in the target area farthest from the center point of the image to be processed, that is, the initial brightness reduction value of the pixel corresponding to the corner of the image to be processed, and then the initial brightness reduction value of the pixel closest to the center point of the image to be processed in the target area is determined to be 0 or another default value. Finally, parabolic interpolation is performed based on the initial brightness reduction value of the pixel corresponding to the corner of the image to be processed, the initial brightness reduction value of the pixel closest to the center point of the image to be processed in the target area, and the distance between each pixel in the target area and the center point of the image to be processed to obtain the brightness reduction value to be adjusted for each pixel in the target area. Afterwards, in order to further make the dark corner transition in the target image smooth and natural, a random amount of dark corner intensity in the target area can be generated, and the brightness reduction value to be adjusted of each pixel point in the target area can be further adjusted based on the random amount of dark corner intensity in the target area to obtain the brightness reduction value of each pixel point in the target area.

[0077] Specifically, the random amount of dark corner intensity of the target area can be generated by a random function or the like. There can be multiple random amounts of dark corner intensity of the target area. The number of random amounts of dark corner intensity of the target area can be the same as the number of pixels in the target area, or it can be one-nth of the number of pixels in the target area, where n is a positive integer. That is, multiple adjacent pixels in the target area can share a random amount of dark corner intensity to further adjust the brightness reduction value to be adjusted, thereby further reducing the amount of computation during image dark corner processing. In one implementation, n can be 4, that is, four adjacent pixels in the target area can share a random amount of dark corner intensity. After determining the random amount of dark corner intensity of each pixel in the target area, the brightness reduction value of each pixel in the target area can be obtained by subtracting the brightness reduction value to be adjusted of each pixel in the target area from the random amount of dark corner intensity.

[0078] For example, the dark corner intensity parameter input by the user is 50. After parabolic interpolation, the brightness reduction value to be adjusted of the first pixel point a is 45, and the brightness reduction value to be adjusted of the second pixel point b is 40. According to the generated dark corner intensity random amount, the dark corner intensity random amount of the first pixel point a is determined to be 2, and the dark corner intensity random amount of the second pixel point b is 1. At this time, it can be determined that the brightness reduction value of the first pixel point a is 43, and the brightness reduction value of the second pixel point is 39.

[0079] In a possible implementation of an embodiment of the present application, the multiple pixel points included in the target area are divided into multiple pixel point sets, and the random amount of dark corner intensity of each pixel point in each pixel point set is the same. It can be understood that when generating the random amount of dark corner intensity of the target area, the pixel points in the target area can be divided into multiple pixel point sets first, each pixel point set includes multiple pixel points, and the same random amount of dark corner intensity can be determined for each pixel point in each pixel point set, that is, the multiple pixel points in the target area can be assigned the same random amount of dark corner intensity, that is, the multiple pixel points in the target area only need to generate one random amount of dark corner intensity, so that the image dark corner transition in the target image can be smooth and natural, and the image dark corner processing effect can be improved. At the same time, the amount of computation during image dark corner processing can be further reduced, thereby improving the image dark corner processing efficiency. Specifically, each pixel point set can include 4 pixel points.

[0080] In addition, a two-dimensional array can be created to record the brightness drop value of each pixel in the target area. The size of this two-dimensional array can be the product of the width and height of the image to be processed divided by 4. This array can be named a vignetting intensity lookup table. Each element in the vignetting intensity lookup table corresponds to a pixel in the target area, and each element can also correspond to the brightness drop value of a pixel in the target area.

[0081] 204. Adjust the brightness value of each pixel in the dark corner adding area using the brightness reduction value of each pixel in the target area.

[0082] In an embodiment of the present application, after generating the brightness drop value of each pixel point in the target area, the brightness value of each pixel point in the dark corner adding area in the image to be processed can be adjusted according to the brightness drop value of each pixel point in the target area, so that the image dark corner can be added to the image to be processed to obtain the target image containing the image dark corner, so that when adjusting the brightness of the image to be processed, it is only necessary to calculate the brightness drop value of the target area in the dark corner adding area, without calculating the brightness drop value of each pixel point in the dark corner adding area, which reduces the amount of calculation during image dark corner processing and improves the image dark corner processing efficiency, thereby improving the image dark corner processing efficiency while ensuring a good image dark corner processing effect. Specifically, based on the principle that the image dark corner is centrally symmetrical about the center point of the image to be processed, the brightness drop value of each pixel point in the entire dark corner adding area can be determined according to the brightness drop value of each pixel point in the target area, and then the brightness value of the dark corner adding area in the image to be processed can be adjusted based on the brightness drop value of each pixel point in the dark corner adding area to obtain the target image containing the image dark corner. Figure 7 As shown, Figure 7 A schematic diagram of a target image.

[0083] In a possible implementation of the embodiment of the present application, the brightness drop value of the vignetting area can be determined based on the brightness drop value of the target area; the brightness channel parameters of each pixel in the vignetting area can be read; and the brightness channel parameters of each pixel in the vignetting area can be adjusted based on the brightness drop value of the vignetting area. It can be understood that when the image to be processed is in YUV format, the brightness drop value of each pixel in the entire vignetting area can be determined based on the brightness drop value of each pixel in the target area based on the principle that the image vignetting is centrally symmetric about the center point of the image to be processed, and a vignetting intensity lookup table can be created to store the brightness drop value of each pixel in the vignetting area. The Y channel data of the image to be processed can be read out row by row, and then the brightness of each pixel in the vignetting area should be reduced by looking up the vignetting intensity lookup table, and the brightness channel parameters of each pixel in the vignetting area can be subtracted from the brightness drop value to adjust and apply the brightness channel parameters, thereby adding image vignetting to the image to be processed and obtaining a target image containing image vignetting.

[0084] In a possible implementation of an embodiment of the present application, the corresponding pixel points of each pixel point in the target area in other areas of the vignetting area are determined respectively, wherein the corresponding pixel points are centrally symmetric with the pixel points in the target area about the center point of the image to be processed; and the brightness drop value of each pixel point in the target area is determined as the brightness drop value of the corresponding pixel point. It can be understood that the corresponding pixel points of each pixel point in the target area in other areas of the vignetting area can be determined based on the principle of central symmetry, and then the brightness drop value of each pixel point in the target area can be directly determined as the brightness drop value of the corresponding pixel point to obtain the brightness drop value of each pixel point in the vignetting area, without having to calculate and generate the brightness drop value corresponding to each pixel point in the entire vignetting area from the beginning, thereby reducing the amount of computation during image vignetting processing and improving the efficiency of image vignetting processing.

[0085] Specifically, the corresponding pixel points of each pixel point in the target area in other areas of the dark corner addition area can be determined based on the position information of each pixel point in the target area and the position information of each pixel point in the dark corner addition area. The position information can be, for example, coordinates. Figure 8 As shown, for example, the first pixel a is a pixel in the target area, the third pixel c, the fourth pixel d and the fifth pixel e are pixel points in other areas of the dark corner adding area, and the coordinates of the first pixel a in the coordinate system with the center point of the image to be processed as the origin are (-x, y), the coordinates of the third pixel c are (x, y), the coordinates of the fourth pixel d are (-x, -y), and the coordinates of the fifth pixel e are (x, -y). Based on the principle of central symmetry, it can be determined that the corresponding pixel points of the first pixel a in the target area in other areas of the dark corner adding area are the third pixel c, the fourth pixel d and the fifth pixel e. If the brightness drop value of the first pixel a is 49, the brightness drop values ​​of the third pixel c, the fourth pixel d and the fifth pixel e can be directly set to 49 without recalculating the brightness drop values ​​of the third pixel c, the fourth pixel d and the fifth pixel e, thereby reducing the amount of computation during image dark corner processing and improving the efficiency of image dark corner processing.

[0086] In a possible implementation method of an embodiment of the present application, attribute data of the image to be processed can be obtained, the attribute data including length and width; a correspondence between the attribute data, the dark corner intensity parameter and the brightness drop value of each pixel point in the target area is established; and the correspondence and the brightness drop value of each pixel point in the target area are stored in a database. In an embodiment of the present application, in order to further improve the efficiency of image vignetting processing, after generating the brightness drop value of the target area in the image to be processed, attribute data such as the length and width of the image to be processed can be obtained, and the brightness drop value of each pixel in the target area and the correspondence between the brightness drop value of each pixel in the target area and the attribute data and vignetting intensity parameter of the image to be processed can be stored in a database. Specifically, the brightness drop value of each pixel in the target area can be recorded in a table first and then the table can be stored, so that when the images with the same attribute data and the same vignetting intensity parameter are subsequently processed, that is, the length and width of the image to be processed input or indicated by the user are the same as the length and width of the previously processed image, and the vignetting intensity parameter input by the user is also the same, the brightness drop value of each pixel in the corresponding target area can be directly obtained from the database for image vignetting processing, without the need to recalculate the brightness drop value of each pixel in the target area, thereby reducing the amount of computation during image vignetting processing and improving the efficiency of image vignetting processing.

[0087] It can be seen from the examples of the aforementioned embodiments that in the embodiments of the present application, a random amount of dark corner intensity is introduced when performing dark corner processing on the image to be processed, so that after the brightness drop value generated based on the dark corner intensity parameter and the random amount of dark corner intensity is adjusted for the brightness value of each pixel point in the dark corner adding area of ​​the image to be processed, the adjusted image dark corner transition in the image to be processed is smooth and natural, thereby improving the image dark corner processing effect; and when performing brightness adjustment on the image to be processed, it is only necessary to calculate the brightness drop value of the target area in the dark corner adding area, without calculating the brightness drop value of each pixel point in the dark corner adding area, thereby reducing the amount of computation during image dark corner processing and improving the image dark corner processing efficiency, thereby being able to improve the image dark corner processing efficiency while ensuring a good image dark corner processing effect.

[0088] See also Figure 9 , Figure 9 The figure is a flow chart of another image processing method provided in an embodiment of the present application. The another image processing method provided in an embodiment of the present application mainly includes the following steps:

[0089] 901. Obtain an image to be processed and a vignetting intensity parameter.

[0090] The vignetting intensity parameter is an initial value of brightness reduction of the vignetting area in the image to be processed.

[0091] The above step 901 is similar to the above step 901 and will not be described in detail here.

[0092] 902. Determine attribute data of the image to be processed.

[0093] The attribute data includes length and width.

[0094] In the embodiment of the present application, after acquiring the image to be processed, attribute data of the image to be processed, including length and width, can be further determined to facilitate matching the image to be processed with the brightness drop values ​​of each pixel within the target area in the database. It is understood that the attribute data of the image to be processed may include not only length and width, but also image resolution, etc.

[0095] 903. If the database stores the brightness reduction value of each pixel in the target area corresponding to the attribute data and the vignetting intensity parameter, obtain the brightness reduction value of each pixel in the target area from the database.

[0096] In an embodiment of the present application, after determining the attribute data and vignetting intensity parameters of the image to be processed, the attribute data and vignetting intensity parameters of the image to be processed can be matched with the data in the database to determine whether the brightness drop value of each pixel in the corresponding target area can be matched. If so, the brightness drop value of each pixel in the target area is directly obtained from the database. It can be understood that the database stores the corresponding relationship between the attribute data, the vignetting intensity parameters and the brightness drop value of each pixel in the target area, as well as the brightness drop value of each pixel in a variety of target areas. The brightness drop value of each pixel in the target area is generated based on the vignetting intensity parameters of the image and the random amount of vignetting intensity, and can be used to perform vignetting on the image and perform vignetting on the image. The brightness drop value of each pixel in the target area can be stored in the database in the form of a table. That is, the attribute data and vignetting intensity parameters of the image to be processed can be matched with the corresponding relationship stored in the database to determine whether there is a brightness drop value of each pixel point in the target area corresponding to the attribute data and vignetting intensity parameters of the image to be processed. If so, the brightness drop value of each pixel point in the target area can be directly obtained from the database, and there is no need to recalculate and generate the brightness drop value of the target area, which further reduces the amount of calculation during image vignetting processing and improves the efficiency of image vignetting processing.

[0097] 904. If the database does not store the brightness drop value of each pixel in the target area corresponding to the attribute data and the vignetting intensity parameter, determine the target area from the vignetting addition area.

[0098] In an embodiment of the present application, after matching the attribute data and vignetting intensity parameters of the image to be processed with the corresponding relationship stored in the database, if the brightness drop value of each pixel point in the target area corresponding to the attribute data and vignetting intensity parameters of the image to be processed is not matched in the database, the target area can be determined from the vignetting added area.

[0099] The target area at least includes a corner of the image to be processed.

[0100] 905. Determine the brightness drop value of each pixel in the target area using the dark corner intensity parameter and the dark corner intensity random amount of the target area.

[0101] The brightness drop value of each pixel in the target area is positively correlated with the distance between each pixel in the target area and the center point of the image to be processed.

[0102] 906. Adjust the brightness value of each pixel in the dark corner adding area using the brightness reduction value of each pixel in the target area.

[0103] The above steps 904 to 906 are similar to steps 202 to 204 in the above embodiment and will not be described in detail here.

[0104] It can be seen from the examples of the aforementioned embodiments that in the embodiments of the present application, before determining the target area from the dark corner added area, it is possible to first determine in the database whether there are brightness drop values ​​for each pixel in the target area corresponding to the attribute data and dark corner intensity parameters of the image to be processed. If so, the brightness drop values ​​for each pixel in the corresponding target area can be directly called from the database, thereby eliminating the need to recalculate and generate the brightness drop values ​​for each pixel in the target area, further reducing the amount of computation during image dark corner processing and improving the efficiency of image dark corner processing. If the brightness drop value of each pixel point in the corresponding target area does not exist in the database, a random amount of vignetting intensity is introduced when performing vignetting on the image to be processed, so that after the brightness drop value generated based on the vignetting intensity parameter and the random amount of vignetting intensity is used to adjust the brightness value of each pixel point in the vignetting added area in the image to be processed, the image vignetting transition in the adjusted image to be processed is smooth and natural, thereby improving the image vignetting processing effect; and when performing brightness adjustment on the image to be processed, it is only necessary to calculate the brightness drop value of the target area in the vignetting added area, without calculating the brightness drop value of each pixel point in the vignetting added area, thereby reducing the amount of computation during image vignetting processing and improving the image vignetting processing efficiency, thereby improving the image vignetting processing efficiency while ensuring a good image vignetting processing effect.

[0105] Figure 10 This is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application, wherein the image processing device specifically includes:

[0106] An acquisition module 1001 is configured to acquire an image to be processed and a vignetting intensity parameter, wherein the vignetting intensity parameter is an initial value of brightness reduction of a vignetting area in the image to be processed;

[0107] A first determining module 1002 is configured to determine a target area from the vignetting area, where the target area includes at least one corner of the image to be processed;

[0108] A second determining module 1003 is configured to determine a brightness drop value of each pixel in the target area using the vignetting intensity parameter and the vignetting intensity random amount of the target area, wherein the brightness drop value of each pixel in the target area is positively correlated with a distance between each pixel in the target area and a center point of the image to be processed;

[0109] The adjustment module 1004 is configured to adjust the brightness value of each pixel in the vignetting area by using the brightness reduction value of each pixel in the target area.

[0110] In a possible implementation of the embodiment of the present application, the first determining module 1002 is specifically configured to:

[0111] Determining attribute data of the image to be processed, wherein the attribute data includes length and width;

[0112] A two-dimensional array is created according to the attribute data. The two-dimensional array is used to record the brightness drop value of each pixel in the target area. The two-dimensional array includes position information of the target area.

[0113] In a possible implementation of the embodiment of the present application, the second determining module 1003 is specifically configured to:

[0114] Perform parabolic interpolation based on the dark corner intensity parameter and the distance between each pixel in the target area and the center point of the image to be processed to obtain a brightness reduction value to be adjusted for each pixel in the target area;

[0115] generating a random amount of vignetting intensity in the target area;

[0116] The brightness reduction value to be adjusted of each pixel point in the target area is subtracted from the random amount of dark corner intensity to obtain the brightness reduction value of each pixel point in the target area.

[0117] In a possible implementation of the embodiment of the present application, the target area includes multiple pixel point sets, and the random amount of dark corner intensity of each pixel point in each pixel point set is the same.

[0118] In a possible implementation of the embodiment of the present application, the adjustment module 1004 is specifically configured to:

[0119] Determining a brightness reduction value of the vignetting area according to a brightness reduction value of the target area;

[0120] Read the brightness channel parameters of each pixel in the dark corner adding area;

[0121] The brightness channel parameter of each pixel point in the dark corner adding area is adjusted according to the brightness drop value of the dark corner adding area.

[0122] In a possible implementation of the embodiment of the present application, the adjustment module 1004 is specifically configured to:

[0123] Determine corresponding pixel points of each pixel point in the target area in other areas of the vignetting area, wherein the corresponding pixel points are symmetrical with each pixel point in the target area about a center point of the image to be processed;

[0124] The brightness drop value of each pixel in the target area is determined as the brightness drop value of the corresponding pixel.

[0125] In a possible implementation of the embodiment of the present application, the apparatus further includes:

[0126] The acquisition module 1001 is further configured to acquire attribute data of the image to be processed, wherein the attribute data includes length and width;

[0127] An establishing module, configured to establish a corresponding relationship between the attribute data, the dark corner intensity parameter, and the brightness drop value of each pixel point in the target area;

[0128] The storage module is used to store the corresponding relationship and the brightness drop value of each pixel in the target area in a database.

[0129] In a possible implementation of the embodiment of the present application, the apparatus further includes:

[0130] A third determining module is used to determine attribute data of the image to be processed, wherein the attribute data includes length and width;

[0131] The acquisition module 1001 is further configured to acquire the brightness drop value of each pixel in the target area corresponding to the attribute data and the vignetting intensity parameter from the database if the database stores the brightness drop value of each pixel in the target area.

[0132] The first determining module 1002 is specifically configured to determine a target area from the vignetting area if the database does not store brightness drop values ​​of pixels in the target area corresponding to the attribute data and the vignetting intensity parameter.

[0133] It can be seen from the examples of the aforementioned embodiments that in the embodiments of the present application, a random amount of dark corner intensity is introduced when performing dark corner processing on the image to be processed, so that after the brightness drop value generated based on the dark corner intensity parameter and the random amount of dark corner intensity is adjusted for the brightness value of each pixel point in the dark corner adding area of ​​the image to be processed, the adjusted image dark corner transition in the image to be processed is smooth and natural, thereby improving the image dark corner processing effect; and when performing brightness adjustment on the image to be processed, it is only necessary to calculate the brightness drop value of the target area in the dark corner adding area, without calculating the brightness drop value of each pixel point in the dark corner adding area, thereby reducing the amount of computation during image dark corner processing and improving the image dark corner processing efficiency, thereby being able to improve the image dark corner processing efficiency while ensuring a good image dark corner processing effect.

[0134] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.

[0136] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.

[0137] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0138] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the part that essentially contributes to the technical solution of the present application or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the process of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.

[0139] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An image processing method, characterized in that: The method comprises: Acquire an image to be processed and a vignetting intensity parameter, wherein the vignetting intensity parameter is an initial value of brightness reduction of a vignetting area in the image to be processed; Determine a target area from the dark corner adding area, wherein the target area includes at least one corner of the image to be processed; Determining a brightness drop value of each pixel in the target area using the vignetting intensity parameter and a random amount of vignetting intensity in the target area, wherein the brightness drop value of each pixel in the target area is positively correlated with a distance between each pixel in the target area and a center point of the image to be processed; The brightness value of each pixel in the dark corner adding area is adjusted using the brightness reduction value of each pixel in the target area.

2. The method according to claim 1, characterized in that The determining of the target area from the dark corner addition area includes: Determining attribute data of the image to be processed, wherein the attribute data includes length and width; A two-dimensional array is created according to the attribute data. The two-dimensional array is used to record the brightness drop value of each pixel in the target area. Each element in the two-dimensional array corresponds to a pixel in the target area.

3. The method according to claim 1, characterized in that Determining the brightness drop value of each pixel in the target area by using the dark corner intensity parameter and the dark corner intensity random amount of the target area includes: Perform parabolic interpolation based on the dark corner intensity parameter and the distance between each pixel in the target area and the center point of the image to be processed to obtain a brightness reduction value to be adjusted for each pixel in the target area; generating a random amount of vignetting intensity in the target area; The brightness reduction value to be adjusted of each pixel point in the target area is subtracted from the random amount of dark corner intensity to obtain the brightness reduction value of each pixel point in the target area.

4. The method according to claim 3, characterized in that The random amount of dark corner intensity obeys a normal distribution with an expectation of 0.

5. The method according to claim 3, characterized in that The plurality of pixels included in the target area are divided into a plurality of pixel sets, and the random amount of dark corner intensity of each pixel in each pixel set is the same.

6. The method according to claim 1, characterized in that The adjusting the brightness value of each pixel point in the dark corner adding area by using the brightness decrease value of each pixel point in the target area includes: Determining a brightness reduction value of the vignetting area according to a brightness reduction value of the target area; Read the brightness channel parameters of each pixel in the dark corner adding area; The brightness channel parameter of each pixel point in the dark corner adding area is adjusted according to the brightness drop value of the dark corner adding area.

7. The method according to claim 6, characterized in that The determining the brightness reduction value of the vignetting area according to the brightness reduction value of the target area includes: Determine corresponding pixel points of each pixel point in the target area in other areas of the vignetting area, wherein the corresponding pixel points are symmetrical with each pixel point in the target area about a center point of the image to be processed; The brightness drop value of each pixel in the target area is determined as the brightness drop value of the corresponding pixel.

8. The method according to any one of claims 1 to 7, characterized in that After adjusting the brightness value of each pixel point in the dark corner adding area by using the brightness decrease value of each pixel point in the target area, the method includes: Acquire attribute data of the image to be processed, wherein the attribute data includes length and width; Establishing a correspondence between the attribute data, the dark corner intensity parameter, and the brightness drop value of each pixel point in the target area; The corresponding relationship and the brightness drop value of each pixel in the target area are stored in a database.

9. The method according to claim 1, characterized in that Before determining the target area from the dark corner added area, the method further includes: Determining attribute data of the image to be processed, wherein the attribute data includes length and width; If the database stores the brightness drop value of each pixel point in the target area corresponding to the attribute data and the vignetting intensity parameter, obtaining the brightness drop value of each pixel point in the target area from the database; If the database does not store the brightness drop value of each pixel in the target area corresponding to the attribute data and the vignetting intensity parameter, the step of determining the target area from the vignetting adding area is performed.

10. An image processing device, characterized in that: The device comprises: An acquisition module, configured to acquire an image to be processed and a vignetting intensity parameter, wherein the vignetting intensity parameter is an initial value of brightness reduction of a vignetting area in the image to be processed; A first determining module is configured to determine a target area from the vignetting area, wherein the target area includes at least one corner of the image to be processed; a second determining module, configured to determine a brightness drop value of each pixel in the target area by using the vignetting intensity parameter and a random amount of vignetting intensity in the target area, wherein the brightness drop value of each pixel in the target area is positively correlated with a distance between each pixel in the target area and a center point of the image to be processed; The adjustment module is used to adjust the brightness value of each pixel point in the dark corner adding area by using the brightness reduction value of each pixel point in the target area.

11. An image processing device, characterized in that: The device comprises: Memory for storing computer programs or computer instructions; A processor, configured to execute the computer program or computer instructions stored in the memory, so that the apparatus performs the method according to any one of claims 1 to 9.

12. A computer storage medium, characterized in that Used to store a computer program, which, when executed, is used to implement the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and device for adjusting image contrast

    CN108009997A

  • High dynamic range video image processing method, computer device and computer readable storage medium

    CN113935911A

  • Image processing method and device, storage medium and electronic equipment

    CN114463210A

  • Vignetting elimination method, device and equipment and computer readable storage medium

    CN117392013A

  • Image signal processing for reducing lens flare

    US20220053153A1