Image processing method and device, terminal and readable storage medium
By performing the first image processing and scene recognition on the image data, and combining hardware and software algorithms for adaptive processing, the problem of insufficient image enhancement effect in the prior art is solved, and a more refined image enhancement effect and lower function are achieved Consumption.
Patent Information
- Application Number
- CN202111415409.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2041-11-25
AI Technical Summary
The existing image enhancement scheme cannot express the specific scenes of the current picture in detail, resulting in the image enhancement effect not being fine enough.
By acquiring image data, performing first image processing and scene recognition, correcting and enhancing processing is performed based on the recognition results, and adaptive image processing is performed in combination with hardware and software algorithms to achieve fine enhancement effects for different scenes.
The fineness of the image enhancement effect is improved, so that the processed image sharpness is greater than that of the original image, and the enhancement effect is more in line with the needs of specific scenes and reduce unnecessary power consumption and overhead.
Smart Images

Figure CN114119412B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and more specifically, to an image processing method, an image processing device, a terminal, and a non-volatile computer-readable storage medium. Background Art
[0002] Image enhancement solutions based on image signal processing (ISP) can usually only adjust the enhancement effect according to the brightness of the ambient light, the average brightness of the image, or the ISO value of the picture. These values can only reflect the brightness of the ambient light or the brightness of the picture to a certain extent, and cannot express the specific scene of the current picture in detail, resulting in the image enhancement effect being not fine enough. Summary of the invention
[0003] The embodiments of the present application provide an image processing method, an image processing device, a terminal and a non-volatile computer-readable storage medium, which are at least used to solve the problem that the image enhancement effect is not fine enough.
[0004] The image processing method of the embodiment of the present application includes: acquiring image data; performing a first image processing on the image data to obtain a processed image, the clarity of the processed image is greater than the clarity of the image data; performing scene recognition on the processed image to obtain a scene recognition result of the processed image; and determining to perform the first image processing and / or the second image processing on the processed image according to the scene recognition result to obtain a target image; wherein the first image processing is used to correct the image data and enhance the processed image, and the second image processing is used to enhance the processed image.
[0005] The image processing device of the embodiment of the present application includes an acquisition module, a first processing module, a recognition module, a second processing module and a scheduling module. The acquisition module is used to acquire image data. The first processing module is used to perform a first image processing on the image data to obtain a processed image, and the clarity of the processed image is greater than the clarity of the image data. The recognition module is used to perform scene recognition on the processed image to obtain a scene recognition result of the processed image. The scheduling module is used to determine whether to use the first processing module to perform the first image processing on the processed image and / or to use the second processing module to perform the second image processing on the processed image according to the scene recognition result to obtain a target image; wherein the first image processing is used to perform correction processing on the image data and enhancement processing on the processed image, and the second image processing is used to enhance processing on the processed image.
[0006] The terminal of the embodiment of the present application includes one or more processors, a memory and one or more programs. Among them, one or more of the programs are stored in the memory and executed by one or more of the processors, and the program includes instructions for executing the image processing method described in the embodiment of the present application. The image processing method includes: performing a first image processing on the image data to obtain a processed image, the clarity of the processed image is greater than the clarity of the image data; performing scene recognition on the processed image to obtain a scene recognition result of the processed image; and determining to perform the first image processing and / or the second image processing on the processed image according to the scene recognition result to obtain a target image; wherein the first image processing is used to correct the image data and enhance the processed image, and the second image processing is used to enhance the processed image.
[0007] The non-volatile computer-readable storage medium of the embodiment of the present application contains a computer program. When the computer program is executed by one or more processors, the processor executes the following image processing method: performing a first image processing on the image data to obtain a processed image, the clarity of the processed image is greater than the clarity of the image data; performing scene recognition on the processed image to obtain a scene recognition result of the processed image; and determining to perform the first image processing and / or the second image processing on the processed image based on the scene recognition result to obtain a target image; wherein the first image processing is used to perform correction processing on the image data and enhancement processing on the processed image, and the second image processing is used to enhance processing on the processed image.
[0008] In the image processing method, image processing device, terminal and non-volatile computer-readable storage medium of the present application, scene recognition is performed on the processed image obtained by the first image processing, and the enhancement effect corresponding to the scene in the processed image can be accurately obtained according to the scene recognition result, so that the processed image is subjected to a separate first image processing or a second image processing based on the scene recognition result, or the processed image is subjected to a first image processing and a second image processing based on the scene recognition result, so that the enhancement effect of the target image is more refined.
[0009] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0011] Figure 1is a flowchart of an image processing method of certain embodiments of the present application;
[0012] Figure 2 is a schematic diagram of the structure of an image processing device in some embodiments of the present application;
[0013] Figure 3 is a schematic diagram of the structure of a terminal in some implementation modes of the present application;
[0014] Figure 4 is a schematic diagram of the process of the first image processing in the image processing method in certain embodiments of the present application;
[0015] Figure 5 is a processing flow diagram of an image processing method of certain embodiments of the present application;
[0016] Figures 6 to 8 is a flowchart of an image processing method of certain embodiments of the present application;
[0017] Fig. 9 It is a connection diagram of a non-volatile computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION
[0018] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.
[0019] See also Figure 1 The present application provides an image processing method, which includes:
[0020] 01: Get image data;
[0021] 03: performing a first image processing on the image data to obtain a processed image, wherein the clarity of the processed image is greater than the clarity of the image data;
[0022] 05: Perform scene recognition on the processed image to obtain a scene recognition result of the processed image; and
[0023] 07: Determine to perform first image processing and / or second image processing on the processed image according to the scene recognition result to obtain a target image; wherein the first image processing is used to correct the image data and enhance the processed image, and the second image processing is used to enhance the processed image.
[0024] Please combine Figure 2The present application also provides an image processing device 10, which includes an acquisition module 11, a first processing module 13, an identification module 15, a scheduling module 17 and a second processing module 19. The acquisition module 11 is used to execute the method in 01, that is, the acquisition module 11 is used to acquire image data. The first processing module 13 is used to execute the methods in 03 and 07, that is, the first processing module 13 is used to perform a first image processing on the image data to obtain a processed image, and the clarity of the processed image is greater than the clarity of the image data. The identification module 15 is used to execute the method in 05, that is, the identification module 15 is used to perform scene recognition on the processed image to obtain a scene recognition result of the processed image. The scheduling module 17 is used to execute the method in 07, that is, the scheduling module 17 is used to determine, according to the scene recognition result, whether to use the first processing module 13 to perform the first image processing on the processed image and / or to use the second processing module 19 to perform the second image processing on the processed image to obtain a target image; wherein the first image processing is used to perform correction processing on the image data and enhancement processing on the processed image, and the second image processing is used to enhance processing on the processed image.
[0025] Please combine Figure 3 The present application also provides a terminal 100, which includes one or more processors 30, a memory 50 and one or more programs. Among them, one or more programs are stored in the memory 50 and executed by one or more processors 30, and the program includes instructions for executing the image processing method of the embodiment of the present application. That is, when one or more processors 30 execute the program, the processor 30 can implement the methods in 01, 03, 05 and 07. That is, one or more processors 30 are used to: obtain image data; perform a first image processing on the image data to obtain a processed image, and the clarity of the processed image is greater than the clarity of the image data; perform scene recognition on the processed image to obtain a scene recognition result of the processed image; and determine to perform a first image processing and / or a second image processing on the processed image according to the scene recognition result to obtain a target image; wherein the first image processing is used to correct the image data and enhance the processed image, and the second image processing is used to enhance the processed image.
[0026] Specifically, the terminal 100 may include but is not limited to a mobile phone, a laptop computer, a smart TV, a tablet computer, a smart watch, or a computer. The image processing device 10 may be an integration of functional modules integrated in the terminal 100. This application only takes the case where the terminal 100 is a mobile phone as an example for explanation. When the terminal 100 is other types of devices, the situation is similar to that of a mobile phone and will not be described in detail.
[0027] The scheduling module 17 or the processor 30 determines to perform the first image processing and / or the second image processing on the processed image according to the scene recognition result, including: the scheduling module 17 or the processor 30 determines to use the first image processing method to process the processed image according to the scene recognition result; or, the scheduling module 17 or the processor 30 determines to use the second image processing method to process the processed image according to the scene recognition result; or, the scheduling module 17 or the processor 30 determines to use the first image processing method and the second image processing method to process the processed image according to the scene recognition result. Among them, the first processing module 13 can also be used to perform the first image processing on the processed image, and the second processing module 19 is used to perform the second image processing on the processed image.
[0028] Image enhancement solutions based on image signal processing (ISP) can usually only adjust the enhancement effect according to the brightness of the ambient light, the average brightness of the image, or the ISO value of the picture. These values can only reflect the brightness of the ambient light or the brightness of the picture to a certain extent, and cannot express the specific scene of the current picture in detail, resulting in the image enhancement effect being not fine enough.
[0029] In the image processing method, image processing device 10 and terminal 100 of the present application, scene recognition is performed on the processed image obtained by the first image processing, and the enhancement effect corresponding to the scene in the processed image can be accurately obtained according to the scene recognition result, so that the processed image is subjected to a separate first image processing or a second image processing based on the scene recognition result, or the processed image is subjected to a first image processing and a second image processing based on the scene recognition result, so that the enhancement effect of the target image is more refined.
[0030] The acquisition module 11 or the processor 30 acquires image data of the scene, and the acquired image data may be a Bayer format image (RGB image) obtained through lens module processing; the image data is subjected to first image processing by the first processing module 13 or the processor 30, and the obtained processed image has a high image quality, and the recognition module 15 or the processor 30 can more accurately identify details in the image when performing scene recognition.
[0031] See also Figure 4In some embodiments, the first image processing includes one or more methods of DefectPixelCorrection (DPC), Black Level Correction (BLC), Denoise, Lens Shade Correction (LSC), Automatic White Balance (AWB), Demosiac, Color Correction Matrix (CCM), Gamma Correction (GC), Edge Enhancement (EE) and Color Space Matrix (CSM).
[0032] Among them, after the acquisition module 11 or the processor 30 acquires the image data, it can perform any one or more combinations of the methods in the first image processing on the image data. Preferably, all the methods in the first image processing can be enabled to process the image data, so as to adapt to more scenes, and enable the processed images obtained based on different scenes to ensure good image quality, so that the clarity of the processed image is greater than the clarity of the image data, so that the scene information recognized by the recognition module 13 or the processor 30 is more accurate.
[0033] Specifically, the image data obtained by the acquisition module 11 or the processor 30 has some bad pixels of the image sensor, resulting in output white spots or black spots. The first processing module 13 can automatically detect bad spots and automatically repair them when performing bad pixel correction on the image data; or establish a bad pixel list to repair bad pixels at fixed positions to repair white spots in the processed image under a completely dark environment, or black spots in the processed image under a high-brightness environment. BLC is mainly used to reduce the influence of dark current on the image signal. The reference dark current signal can be subtracted from the obtained image signal to make the contrast of the processed image better. Denoise mainly removes noise caused by factors such as illumination level, image sensor and image signal conversion, so that the processed image is clearer as a whole and retains more details. Due to the physical properties of the lens itself, the brightness around the image gradually decreases relative to the central brightness. The LSC method is used to compensate for the brightness around the image. AWB is mainly used to compensate for white pixels in the image, thereby restoring white objects obtained in any scene, so that the white objects in the processed image are closer to the white objects in the scene. Demosiac can interpolate image data by methods such as nearest neighbor interpolation and bilinear interpolation. Color correction is used to correct the deviation in the color of RGB data in the image data. Color correction can be performed through a 3*3 color change matrix. Gamma correction performs nonlinear operations on the grayscale values of the image data, so that the grayscale value of the processed image is exponentially related to the grayscale value of the image data, which is convenient for the human eye to recognize the image. The EE method is used to improve the edge clarity of the image, making the edge information of the processed image more prominent.
[0034] See also Figure 5 In some embodiments, the second image processing includes a first sub-processing and a second sub-processing, the first sub-processing includes multiple different first execution methods, the second sub-processing includes multiple different second execution methods, the first execution method is different from the second execution method, and the first execution method and the second execution method are both used to perform the second image processing according to the scene recognition result to obtain the target image.
[0035] The second processing module 19 includes a hardware enhancement module 191 and a software algorithm enhancement module 193. The first sub-processing is performed by the hardware enhancement module 191, and the second sub-processing is performed by the software algorithm enhancement module 193, so as to avoid using a unified hardware enhancement module 191 to implement all enhancement methods (including the first execution method and the second execution method), or using a unified software algorithm enhancement module 193 to implement all enhancement methods, which results in increased power consumption of the image processing device 10 or the terminal 100.
[0036] Please combine Figure 5, the first sub-processing includes multiple first execution methods for implementing different functions, and the second sub-processing includes multiple second execution methods for implementing different functions, and each first execution method and multiple second execution methods are different. Among them, the scheduling module 17 needs to enhance multiple different image effects according to the scene recognition results, and each image effect corresponds to a first execution method or a second execution method, that is, an image effect can be achieved by using a first execution method or a second execution method. For example, one image effect to be achieved is the contrast of the processed image. The scheduling module 17 finds a first execution method or a second execution method with a contrast adjustment function from multiple first execution methods and multiple second execution methods to achieve contrast enhancement of the processed image. Among them, if the method with the contrast adjustment function is the first execution method, at this time, the software algorithm enhancement module corresponding to the second sub-processing can be turned off to reduce power consumption.
[0037] In an embodiment of the present application, the first sub-processing includes first execution methods such as dolFusion, color enhancement, and contrast enhancement, and the second sub-processing includes second execution methods such as single-frame dynamic processing, highlight suppression, regional noise reduction, and portrait beauty. dolFusion can be used for dual-frame image fusion of dolSensor to achieve the purpose of improving image dynamics. Color enhancement improves the color of the image through a hardware enhancement module. Single-frame dynamic processing is applicable to single-frame images obtained based on scenes with mostly normal light to achieve the purpose of improving image dynamics. Highlight suppression can be used to suppress the highlight area of the image to balance the brightness of the image. Portrait beauty is used to optimize the face effect in the image, making the face area in the image more beautiful.
[0038] The scheduling module 17 decides whether to use the first sub-processing or the second sub-processing in the second image processing, or a combination of the first sub-processing and the second sub-processing according to the scene recognition result, so as to achieve the purpose of adaptively and accurately adjusting the image effect of the processed image and avoid unnecessary power consumption overhead.
[0039] In the present application, the first image processing and the second image processing can set corresponding enhancement methods according to actual needs. By comparing the effects of different enhancement methods implemented by the first image processing or the second image processing, the enhancement methods can be divided into the first image processing or the second image processing to perform targeted enhancement processing on the processed image, so as to minimize unnecessary power consumption.
[0040] See also Figure 6 In some embodiments, 07: determining to perform first image processing and / or second image processing on the processed image according to the scene recognition result to obtain a target image includes:
[0041] 071: Determine the parameters to be adjusted for processing the image according to the scene recognition result; and
[0042] 073: Determine, according to the parameter to be adjusted, to perform first image processing and / or second image processing on the processed image to obtain a target image.
[0043] Please combine Figure 2 , the scheduling module 17 can be used to execute the methods in 071 and 073. That is, the first processing module 13 and the scheduling module 17 can be used to: determine the parameters to be adjusted for processing the image according to the scene recognition result; and determine to perform the first image processing and / or the second image processing on the processed image according to the parameters to be adjusted to obtain the target image.
[0044] Please combine Figure 3 , the processor 30 is used to execute the methods in 071 and 073. That is, the processor 30 is used to: determine the parameters to be adjusted for processing the image according to the scene recognition result; and determine to perform the first image processing and / or the second image processing on the processed image according to the parameters to be adjusted to obtain the target image.
[0045] Specifically, the image processing device 10 or the terminal 100 stores image effects corresponding to a variety of different scenes, wherein the image effects include enhancement effects and weakening effects. The present application takes the enhancement effect as an example for explanation. The scheduling module 17 or the processor 30 finds the target scene stored in the image processing device 10 or the terminal 100 that is closest to the scene recognition result based on the scene recognition result, and the parameters to be adjusted for the processed image can be obtained by comparing the enhancement effect corresponding to the target scene with the actual effect of the processed image. The scheduling module 17 decides to use the first image processing and / or the second image processing to enhance the processed image based on the parameters to be adjusted, so that a specific enhancement processing method can be found more accurately based on the scene recognition result, avoiding unnecessary power consumption.
[0046] See also Figure 7 In some embodiments, 073: performing a first image processing and / or a second image processing on the processed image according to the parameter to be adjusted to obtain a target image, including:
[0047] 0731: Detect whether there is an execution method corresponding to the parameter to be adjusted in the second image processing;
[0048] 0733: When the parameter value of the parameter to be adjusted is less than the preset threshold value, and there is no execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform the first image processing on the processed image according to the parameter to be adjusted to update the processed image, and perform scene recognition on the updated processed image to obtain an updated scene recognition result. If the parameter to be adjusted of the updated processed image obtained according to the updated scene recognition result is greater than or equal to the preset threshold value, use the updated processed image as the target image. If the parameter to be adjusted of the updated processed image is less than the preset threshold value, return to the detection step; and
[0049] 0735: When the parameter value of the parameter to be adjusted is less than a preset threshold value and there is an execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform second image processing on the processed image according to the parameter to be adjusted to obtain a target image.
[0050] Please combine Figure 2 , the identification module 15 and the scheduling module 17 can also be used to execute the methods in 0731, 0733 and 0735. That is, the scheduling module 17 is used to: detect whether there is an execution method corresponding to the parameter to be adjusted in the second image processing. When the parameter value of the parameter to be adjusted is less than the preset threshold value, and there is no execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform the first image processing on the processed image according to the parameter to be adjusted to update the processed image. The identification module 15 can also be used to: perform scene recognition on the updated processed image to obtain an updated scene recognition result. The scheduling module 17 is also used to: if the parameter to be adjusted of the updated processed image obtained according to the updated scene recognition result is greater than or equal to the preset threshold value, then use the updated processed image as the target image, and if the parameter to be adjusted of the updated processed image is less than the preset threshold value, then return to the detection step. When the parameter value of the parameter to be adjusted is less than the preset threshold value, and there is an execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform the second image processing on the processed image according to the parameter to be adjusted to obtain the target image.
[0051] Please combine Figure 3, the processor 30 is also used to execute the methods in 0731, 0733 and 0735. That is, the processor 30 is also used to: detect whether there is an execution method corresponding to the parameter to be adjusted in the second image processing; when the parameter value of the parameter to be adjusted is less than the preset threshold value, and there is no execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform the first image processing on the processed image according to the parameter to be adjusted to update the processed image, and perform scene recognition on the updated processed image to obtain an updated scene recognition result, if the parameter to be adjusted of the updated processed image obtained according to the updated scene recognition result is greater than or equal to the preset threshold value, then use the updated processed image as the target image, if the parameter to be adjusted of the updated processed image is less than the preset threshold value, then return to the detection step; when the parameter value of the parameter to be adjusted is less than the preset threshold value, and there is an execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform the second image processing on the processed image according to the parameter to be adjusted to obtain the target image.
[0052] It should be noted that different preset thresholds correspond to different parameters to be adjusted, and the preset thresholds can be obtained according to the image effect in the target scene corresponding to the scene recognition result. For example, when the image effect corresponding to the parameter to be adjusted is image brightness, and the target image brightness in the target scene is 10, the preset threshold can be plus or minus 10% of the target image brightness, that is, the value range of the preset threshold is [9, 11], for example, the preset threshold is 9.0, 9.1, 9.3, 9.6, 9.8, 10.2, 10.5, 10.6, 10.8, 11.0, etc.
[0053] Please combine Figure 4 and Figure 5In one embodiment, when the only parameter to be adjusted is the edge clarity in the image, the scheduling module 17 or the processor 30 searches for multiple execution methods (including the first execution method and the second execution method) in the second image processing according to the parameter to be adjusted, and determines whether there is an execution method corresponding to the parameter to be adjusted. The multiple execution methods in the second image processing include the first execution method and the second execution method. If the scheduling module 17 or the processor 30 determines that there is no corresponding execution method in the second image processing, it proves that there is a method corresponding to the parameter to be adjusted in the first image processing. At this time, the second processing module 19 can be turned off to reduce the power consumption of the image processing device 10 or the terminal 100. When the parameter to be adjusted does not reach the corresponding preset threshold, the scheduling module 17 or the processor 30 searches for the EE method in the first image processing to adjust the edge clarity of the processed image to be greater than or equal to the preset threshold of the clarity, thereby enhancing the edge clarity in the processed image. For the processed image after the edge clarity is adjusted, the recognition module 15 or the processor 30 needs to perform scene recognition on the updated processed image again to obtain the updated scene recognition result. The scheduling module 17 or the processor 30 obtains the updated parameter to be adjusted (i.e., edge definition) of the image to be processed again according to the updated scene recognition result, and compares the difference between the parameter value of the updated parameter to be adjusted and the preset threshold value. If the parameter value of the updated parameter to be adjusted is still less than the preset threshold value, the methods in 0731 and 0733 are executed cyclically to ensure that the target image obtained by adjusting the processed image achieves the predetermined enhancement effect, so that the enhancement effect of the target image is more refined.
[0054] For the parameters to be adjusted corresponding to other image effects, after the scheduling module 17 or the processor 30 performs the first image processing or the second image processing for the first time, it is necessary to perform scene recognition on the updated processed image again, and compare the difference between the updated parameters to be adjusted and the preset threshold value to ensure that the enhancement effect of the obtained target image is more refined. And when the scheduling module 17 or the processor 30 determines to use the first processing module 13 to perform the first image processing, the scheduling module 17 or the processor 30 turns off the second processing module 19 to reduce the power consumption when the second processing module 19 is turned on.
[0055] In another embodiment, if the parameter to be adjusted includes edge definition and contrast. When the parameter to be adjusted is edge definition, the scheduling module 17 or the processor 30 detects that there is no execution method corresponding to edge definition in the second image processing, and the parameter value of the parameter to be adjusted corresponding to edge definition is less than the preset threshold of edge definition, then it is determined to use the EE method in the first image processing to process the processed image to update the processed image. The recognition module 15 performs scene recognition on the updated processed image, and recognizes that the contrast of the updated processed image is less than the preset threshold corresponding to the contrast, then the scheduling module 17 or the processor 30 executes method 0731 when the parameter to be adjusted is contrast. At this time, it is detected that there is a corresponding execution method in the second image processing (contrast enhancement in the first sub-processing), and the parameter value of the parameter to be adjusted corresponding to the contrast is less than the preset threshold of the contrast, then the scheduling module 17 or the processor 30 determines to use the second image processing to adjust the updated processed image to obtain the target image.
[0056] It should be noted that after the updated processed image is subjected to the second image processing, scene recognition can be performed again on the processed image after the second image processing to ensure that all parameters to be adjusted in the processed image meet the preset thresholds corresponding to the parameters to be adjusted in the target scene, so that the enhancement effect of the final target image is more refined.
[0057] See also Figure 8 In some embodiments, 0735: when the parameter value of the parameter to be adjusted is less than a preset threshold value and there is an execution method corresponding to the parameter to be adjusted in the second image processing, determining to perform the second image processing on the processed image according to the parameter to be adjusted to obtain the target image includes:
[0058] 07351: when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the first sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determining to perform the first sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or
[0059] 07353: when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the second sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determining to perform the second sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or
[0060] 07355: When the parameter value of the parameter to be adjusted is less than a preset threshold, and both the first sub-processing and the second sub-processing in the second image processing have execution methods corresponding to the parameter to be adjusted, the first sub-processing and the second sub-processing are performed on the processed image according to the parameter to be adjusted to obtain the target image.
[0061] Please combine Figure 2 , the scheduling module 17 is also used to execute the methods in 07351, 07353 and 07355. That is, the scheduling module 17 is also used to: when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the first sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determine to perform the first sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the second sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determine to perform the second sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the first sub-processing and the second sub-processing in the second image processing both have execution methods corresponding to the parameter to be adjusted, determine to perform the first sub-processing and the second sub-processing on the processed image according to the parameter to be adjusted to obtain the target image.
[0062] Please combine Figure 3 , the processor 30 is also used to execute the methods in 07351, 07353 and 07355. That is, the processor 30 is also used to: when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the first sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determine to perform the first sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the second sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determine to perform the second sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or when the parameter value of the parameter to be adjusted is less than the preset threshold value, and the first sub-processing and the second sub-processing in the second image processing both have execution methods corresponding to the parameter to be adjusted, determine to perform the first sub-processing and the second sub-processing on the processed image according to the parameter to be adjusted to obtain the target image.
[0063] Specifically, when the parameter value of the parameter to be adjusted is less than the preset threshold, and there is an execution method corresponding to the parameter to be adjusted in the second image processing, the scheduling module 17 or the processor 30 turns on the closed second processing module 19 and turns off the first processing module 13.
[0064] Please combine Figure 5 Furthermore, the scheduling module 17 or the processor 30 determines whether it is necessary to shut down the hardware enhancement module 191 or the software algorithm module 193 in the second processing module 19 according to the parameter to be adjusted, or to turn on the hardware enhancement module 191 and the software algorithm module 193 at the same time so that the parameter value of the parameter to be adjusted is greater than or equal to the preset threshold.
[0065] For example, the parameters to be adjusted include chromaticity and brightness of the face area, and the chromaticity is less than a preset threshold corresponding to the chromaticity, and the brightness of the face area is less than a preset threshold corresponding to the brightness of the face area. The scheduling module 17 or the processor 30 determines the color enhancement method in the first sub-processing and the portrait beautification method in the second sub-processing according to the parameters to be adjusted to adjust the processed image, so that the overall chromaticity in the processed image is more coordinated while ensuring that the face area achieves a beautiful effect.
[0066] For example, when the processed image is an image obtained in a backlit scene, and the parameter to be adjusted is the dynamic range of the image, the scheduling module 17 or the processor 30 uses the dolFusion method in the first sub-processing to adjust the processed image according to the parameter to be adjusted. At this time, the scheduling module 17 or the processor 30 turns on the hardware enhancement module 191 to avoid turning on the hardware enhancement module 191 when acquiring image data and performing the first image processing on the image data, resulting in high power consumption of the image processing device 10 or the terminal 100. In the present application, whether to turn on the hardware enhancement module 191 is determined in real time based on the parameter to be adjusted obtained from the scene recognition result, so as to ensure the dynamic range of the target image obtained in the backlit scene and reduce unnecessary power consumption. In addition, when the scene recognition result indicates that most of the light in the backlit scene is normal, the dynamic range of the single-frame processed image can be used, and the single-frame dynamic processing method in the second sub-processing can be used to achieve the purpose of improving the dynamic range of the processed image, thereby avoiding the use of the high-power dolFusion method and avoiding the ghost phenomenon of the image caused by improper processing of the dolFusion method.
[0067] See also Fig. 9 The present application also provides a non-volatile computer-readable storage medium 200 including a computer program 201. When the computer program 201 is executed by one or more processors 30, the processor 30 executes the image processing methods in 01, 03, 05, 07, 071, 073, 0731, 0733, 0735, 07351, 07353 and 07355.
[0068] In the description of this specification, the descriptions with reference to the terms "certain embodiments", "in an example", "exemplarily", etc., mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0069] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0070] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. An image processing method, characterized in that: include: Get image data; Performing a first image processing on the image data to obtain a processed image, wherein the clarity of the processed image is greater than the clarity of the image data; Performing scene recognition on the processed image to obtain a scene recognition result of the processed image; and Determining, according to the scene recognition result, to perform the first image processing and / or the second image processing on the processed image to obtain a target image; wherein the first image processing is used to perform correction processing on the image data and enhancement processing on the processed image, and the second image processing is used to enhance processing on the processed image; determining, according to the scene recognition result, to perform the first image processing and / or the second image processing on the processed image to obtain a target image, comprises: Determining the parameters to be adjusted for the processed image according to the scene recognition result; Detecting whether there is an execution method corresponding to the parameter to be adjusted in the second image processing; In the case where the parameter value of the parameter to be adjusted is less than a preset threshold value, and there is no execution method corresponding to the parameter to be adjusted in the second image processing, determining to perform the first image processing on the processed image according to the parameter to be adjusted to update the processed image, and performing scene recognition on the updated processed image to obtain an updated scene recognition result, if the parameter to be adjusted of the updated processed image obtained according to the updated scene recognition result is greater than or equal to the preset threshold value, taking the updated processed image as the target image, and if the parameter to be adjusted of the updated processed image is less than the preset threshold value, returning to the detection step; and When the parameter value of the parameter to be adjusted is less than a preset threshold and there is an execution method corresponding to the parameter to be adjusted in the second image processing, it is determined according to the parameter to be adjusted that the second image processing is performed on the processed image to obtain the target image.
2. The image processing method according to claim 1, characterized in that: The first image processing includes one or more methods of bad pixel correction, black level correction, noise reduction, lens shading correction, automatic white balance, pixel interpolation, color correction, gamma correction, edge enhancement and color reconstruction.
3. The image processing method according to claim 1, characterized in that: The second image processing includes a first sub-processing and a second sub-processing, the first sub-processing is performed by a hardware enhancement module, and the second sub-processing is performed by a software algorithm enhancement module.
4. The image processing method according to claim 3, characterized in that: The first sub-processing includes multiple different first execution methods, and the second sub-processing includes multiple different second execution methods. The first execution method is different from the second execution method. The first execution method and the second execution method are both used to perform the second image processing according to the scene recognition result to obtain the target image.
5. The image processing method according to claim 1, characterized in that: When the parameter value of the parameter to be adjusted is less than a preset threshold value and there is an execution method corresponding to the parameter to be adjusted in the second image processing, determining to perform the second image processing on the processed image according to the parameter to be adjusted to obtain the target image includes: When the parameter value of the parameter to be adjusted is less than a preset threshold value and the first sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determining to perform the first sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or When the parameter value of the parameter to be adjusted is less than a preset threshold value and the second sub-processing in the second image processing has an execution method corresponding to the parameter to be adjusted, determining to perform the second sub-processing on the processed image according to the parameter to be adjusted to obtain the target image; or When the parameter value of the parameter to be adjusted is less than a preset threshold value, and the first sub-processing and the second sub-processing in the second image processing both have execution methods corresponding to the parameter to be adjusted, then the first sub-processing and the second sub-processing are determined to be performed on the processed image according to the parameter to be adjusted to obtain the target image.
6. An image processing device, characterized in that: include: An acquisition module, used for acquiring image data; A first processing module, configured to perform a first image processing on the image data to obtain a processed image, wherein the clarity of the processed image is greater than the clarity of the image data; A recognition module, used for performing scene recognition on the processed image to obtain a scene recognition result of the processed image; A second processing module; and a scheduling module, configured to determine, according to the scene recognition result, whether to use the first processing module to perform the first image processing on the processed image and / or to use the second processing module to perform the second image processing on the processed image to obtain a target image, and to determine, according to the scene recognition result, parameters to be adjusted for the processed image; Detect whether there is an execution method corresponding to the parameter to be adjusted in the second image processing; when the parameter value of the parameter to be adjusted is less than a preset threshold value and there is no execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform the first image processing on the processed image according to the parameter to be adjusted to update the processed image, and perform scene recognition on the updated processed image to obtain an updated scene recognition result, if the parameter to be adjusted of the updated processed image obtained according to the updated scene recognition result is greater than or equal to the preset threshold value, then use the updated processed image as the target image, if the parameter to be adjusted of the updated processed image is less than the preset threshold value, return to the detection step; and when the parameter value of the parameter to be adjusted is less than the preset threshold value and there is an execution method corresponding to the parameter to be adjusted in the second image processing, determine to perform the second image processing on the processed image according to the parameter to be adjusted to obtain the target image; wherein the first image processing is used to correct the image data and enhance the processed image, and the second image processing is used to enhance the processed image.
7. A terminal, characterized in that: The terminal comprises: One or more processors, memory; and One or more programs, wherein one or more of the programs are stored in the memory and executed by one or more of the processors, and the programs include instructions for executing the image processing method according to any one of claims 1 to 5.
8. A non-volatile computer-readable storage medium storing a computer program, which, when executed by one or more processors, implements the image processing method according to any one of claims 1 to 5.
