Image processing method and device and storage medium

By using underexposed images with continuous exposure at the same time but low exposure level, the spot area in the mobile phone camera is color rendered, the problem of color loss in the spot area is solved, the imaging effect is improved, and image processing with rich colors and strong hierarchy is achieved.

CN119893307APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311387892.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When simulating the bokeh effect of a SLR camera, the color of the spot area of ​​the mobile phone camera is missing, resulting in poor imaging effects and failing to meet user expectations.

Method used

By obtaining underexposed images that are continuously exposed at the same time but have low exposure levels, the spot area in the image to be processed is color rendered to fill in the area where the color is missing.

Benefits of technology

This makes the spot area in the processed image rich in color and strong sense of layering, improves the imaging effect, meets user expectations, and has low complexity, and consumes less mobile phone performance and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893307A_ABST
    Figure CN119893307A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device and a storage medium. The method comprises the following steps: acquiring a to-be-processed image and an underexposure image; wherein the underexposure image and the to-be-processed image are continuously exposed at the same time, and the exposure level is lower than that of the to-be-processed image; performing light spot detection on the to-be-processed image to obtain a light spot area; and performing color rendering processing on the light spot area according to the underexposure image to obtain a first image. Through the underexposure image, the light spot area in the to-be-processed image is subjected to color rendering processing, so that the problem of color missing of the light spot area in the to-be-processed image is solved, the light spot area in the processed first image is rich in color and high in layering sense, the imaging effect is improved, and user expectation is met; meanwhile, the color rendering processing can be completed by only one underexposure image, the complexity is low, and the performance and the power consumption of the mobile phone are relatively low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of mobile phone photography technology, existing technology can simulate the photography effects of traditional SLR cameras through image processing algorithms. Among them, the "portrait mode" in mobile phone cameras can simulate the bokeh effect of SLR cameras. Light spots are an important feature of the bokeh effect, with rich colors and strong layering. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, including:

[0005] Acquire an image to be processed and an underexposed image; wherein the underexposed image is continuously exposed at the same time as the image to be processed, and the exposure level is lower than that of the image to be processed;

[0006] Performing light spot detection on the image to be processed to obtain a light spot area;

[0007] According to the underexposed image, color rendering is performed on the light spot area to obtain a first image.

[0008] Optionally, the light spot area includes at least one, the color rendering process includes color filling, and performing color rendering process on the light spot area according to the underexposed image to obtain the first image includes:

[0009] For each of the light spot areas, determining a target area corresponding to the light spot area in the underexposed image;

[0010] The first image is obtained by color filling the light spot area according to the pixel information of each pixel point in the target area.

[0011] Optionally, filling the light spot area with color according to pixel information of each pixel point in the target area includes:

[0012] Determining an area to be filled in the light spot area;

[0013] According to the pixel information of the pixel points in the target area, the corresponding pixel points in the area to be filled are assigned values, so as to perform color filling processing on the area to be filled.

[0014] Optionally, determining the area to be filled in the light spot area includes:

[0015] Determine the distance between each pixel point in the light spot area and a preset pixel point;

[0016] Determining the pixel points to be filled according to the relationship between the distance and a preset distance threshold;

[0017] The area to be filled is determined according to the pixel points to be filled.

[0018] Optionally, the method further comprises:

[0019] Performing color enhancement processing on the light spot area in the first image to obtain a second image.

[0020] Optionally, performing color enhancement processing on the light spot area in the first image to obtain the second image includes:

[0021] Determine a region to be enhanced in the light spot region of the first image;

[0022] According to the preset light spot color contrast coefficient, color enhancement processing is performed on the area to be enhanced.

[0023] Optionally, the method further comprises:

[0024] In response to receiving an adjustment operation of the preset light spot color contrast coefficient by a user, the preset light spot color contrast coefficient is determined according to the adjustment operation.

[0025] Optionally, determining the area to be enhanced in the light spot area of ​​the first image includes:

[0026] Determine the distance between each pixel point in the light spot area and a preset pixel point;

[0027] Determining a pixel point to be enhanced according to a relationship between the distance and a preset distance interval;

[0028] The area to be enhanced is determined according to the pixel points to be enhanced.

[0029] Optionally, performing spot detection on the image to be processed to obtain a spot area includes:

[0030] Determine a target pixel point in the image to be processed whose pixel value is greater than a preset pixel threshold;

[0031] Determine a plurality of connected domains composed of the target pixel points by a connected domain detection method;

[0032] The light spot area is determined from the multiple connected domains.

[0033] Optionally, determining the light spot area from the multiple connected domains includes:

[0034] Determine at least one target connected domain from the multiple connected domains according to the number of pixels included in each of the connected domains, wherein the number of pixels included in each of the target connected domains is less than or equal to a preset number threshold;

[0035] Each of the target connected domains is used as the light spot area.

[0036] Optionally, the method further comprises:

[0037] According to the image to be processed, an alignment operation is performed on the underexposed image to obtain a target underexposed image;

[0038] The step of performing color rendering processing on the light spot area according to the underexposed image comprises:

[0039] According to the target under-exposed image, color rendering processing is performed on the light spot area.

[0040] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:

[0041] An image acquisition module is configured to acquire an image to be processed and an underexposed image; wherein the underexposed image is continuously exposed at the same time as the image to be processed, and has a lower exposure level than the image to be processed;

[0042] A light spot detection module is configured to perform light spot detection on the image to be processed to obtain a light spot area;

[0043] The color rendering module is configured to perform color rendering processing on the light spot area according to the underexposed image to obtain a first image.

[0044] According to a third aspect of an embodiment of the present disclosure, there is provided an image processing apparatus, including:

[0045] processor;

[0046] a memory for storing processor-executable instructions;

[0047] Wherein, the processor is configured to: execute the steps of the image processing method provided in the first aspect of the present disclosure.

[0048] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image processing method provided in the first aspect of the present disclosure are implemented.

[0049] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: through an underexposed image, color rendering is performed on the light spot area in the image to be processed, thereby solving the problem of color loss in the light spot area in the image to be processed, so that the light spot area in the processed first image has rich colors and a strong sense of layering, thereby improving the imaging effect and meeting user expectations; at the same time, only one underexposed image is required to complete the above-mentioned color rendering processing, which has low complexity and consumes less performance and power consumption of the mobile phone.

[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0052] Figure 1 The figure is a flowchart of an image processing method according to an exemplary embodiment.

[0053] Figure 2 is a flowchart of another image processing method according to an exemplary embodiment.

[0054] Figure 3 The figure is a block diagram of an image processing apparatus according to an exemplary embodiment.

[0055] Figure 4 The invention is a block diagram of a device for image processing according to an exemplary embodiment. DETAILED DESCRIPTION

[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0057] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the location and with the authorization given by the owner of the corresponding device.

[0058] Currently, the "portrait mode" in mobile phone cameras can simulate the bokeh effect of SLR cameras through image processing algorithms. The bokeh effect refers to the gradual loose blurring of the images outside the depth of field in an image with a shallow depth of field, which can help highlight the focused subject. In most cases, the highlight area outside the depth of field can form a light spot in the bokeh image. In a bokeh image with good imaging effect, the light spot has the characteristics of rich colors and strong layering, and has a photographic aesthetic.

[0059] Due to the limitations of mobile phone hardware, the dynamic range of mobile phone camera imaging is smaller than that of SLR cameras. In highlight areas, overexposure may easily cause loss of color information. Using these input data to simulate the bokeh imaging effect may easily make the light spots of the bokeh image pale and monotonous in color, lacking aesthetic appeal, and the imaging effect is unlikely to meet user expectations.

[0060] Existing technologies usually restore the original color of the overexposed area through multi-frame exposure fusion (usually using multi-frame exposure images of more than 6 frames for fusion), thereby achieving the purpose of improving the color of the light spot. However, the effect of the multi-frame exposure fusion method depends on the alignment effect of the multi-frame images. Ghosting is prone to occur during the fusion process, and the final imaging effect is unstable. In addition, the algorithm for processing multi-frame images is highly complex, requiring the mobile phone to have high memory, performance and power consumption.

[0061] To this end, the present disclosure provides an image processing method, device and storage medium. The specific implementation methods of the present disclosure are described in detail below with reference to the accompanying drawings.

[0062] Figure 1 is a flowchart of an image processing method according to an exemplary embodiment. Figure 1 As shown, the method may include the following steps:

[0063] S101: Acquire an image to be processed and an underexposed image; wherein the underexposed image and the image to be processed are continuously exposed at the same time, and the exposure level of the underexposed image is lower than that of the image to be processed.

[0064] For example, the image to be processed and the underexposed image are both 8-bit frames of images obtained by a mobile phone camera in "portrait mode", and the image format is a pixel format in which brightness parameters and chrominance parameters are separately represented, that is, YUV format.

[0065] S102: Perform light spot detection on the image to be processed to obtain a light spot area.

[0066] Among them, the reflection and refraction of light on objects during the imaging process will form various highlight spots (i.e., light spots) under the blur of the lens, and the area where these highlight spots are located is the light spot area.

[0067] S103: performing color rendering processing on the light spot area according to the underexposed image to obtain a first image.

[0068] In one embodiment of the present disclosure, color rendering is performed on the light spot area in the image to be processed according to the underexposed image, so that the light spot area in the processed first image has rich colors and a strong sense of layering, has a photographic aesthetic, and meets user expectations.

[0069] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: through an underexposed image, color rendering is performed on the light spot area in the image to be processed, thereby solving the problem of color loss in the light spot area in the image to be processed, so that the light spot area in the processed first image has rich colors and a strong sense of layering, thereby improving the imaging effect and meeting user expectations; at the same time, only one underexposed image is required to complete the above-mentioned color rendering processing, which has low complexity and consumes less performance and power consumption of the mobile phone.

[0070] As an optional implementation, the image processing method further includes: performing an alignment operation on the underexposed image according to the image to be processed to obtain a target underexposed image.

[0071] Although the underexposed image has insufficient exposure, it retains the correct color information in the image. In the subsequent image processing process, the color information of a certain position in the underexposed image can be used to perform color rendering on the light spot area at the corresponding position in the image to be processed. Therefore, it is necessary to first align the underexposed image to the image to be processed. In this way, according to the coordinate information of the pixel points in the image to be processed, the corresponding pixel points can be accurately located in the underexposed image, and then the corresponding color information can be accurately obtained to ensure the subsequent color rendering effect.

[0072] In one embodiment of the present disclosure, the alignment algorithm may be a more common image alignment algorithm, such as the LK (Lucas-Kanade) optical flow method, the dense inverse search (DIS) sparse optical flow method, an image alignment method based on deep learning, and the like.

[0073] Since the alignment operation can only achieve the overall alignment of the underexposed image and the image to be processed, in order to prevent the occurrence of ghost images (in the imaging optical system, there is one or more image points similar to the image point near the image point, and the image points other than the image point are collectively referred to as "ghost images"), it is also necessary to use a deghosting algorithm (for example, a deghost algorithm) to align the underexposed image with the local motion area of ​​the image to be processed.

[0074] At this time, S103 includes: performing color rendering processing on the light spot area according to the target under-exposed image.

[0075] It can be understood that, by using the target under-exposed image after the alignment processing, the light spot area in the image to be processed is subjected to color rendering processing to improve the color rendering effect.

[0076] As an optional implementation, S102 includes: determining target pixel points whose pixel values ​​are greater than a preset pixel threshold in the image to be processed; determining multiple connected domains composed of the target pixel points by a connected domain detection method; and determining the light spot area from the multiple connected domains.

[0077] In one embodiment of the present disclosure, the pixel points of the Y channel in the image to be processed are judged, and the pixel points whose pixel values ​​are greater than a preset pixel threshold are marked as target pixel points. Then, a connected domain detection method is used to determine multiple connected domains composed of the target pixel points, and then the spot area is determined from the multiple connected domains, wherein the preset pixel threshold can be, for example, the image bit width × 0.9.

[0078] For example, when the image to be processed is an 8-bit image, its image bit width is 255. At this time, the preset pixel threshold is 255×0.9, and the integer value is 230.

[0079] As an optional implementation, determining a light spot area from multiple connected domains includes: determining at least one target connected domain from the multiple connected domains based on the number of pixels contained in each connected domain, the number of pixels included in each target connected domain being less than or equal to a preset number threshold; and taking each target connected domain as a light spot area.

[0080] In one embodiment of the present disclosure, in the image to be processed, a smaller connected domain can form a light spot, while a larger connected domain is only a highlight area in the imaging. Therefore, it is necessary to determine the target connected domain of the same size by detecting the number of pixels in each connected domain, and determine the target connected domain as the light spot area.

[0081] For example, the preset number threshold is 600, and a connected domain with a number of pixels less than or equal to 600 is determined as a target connected domain.

[0082] As an optional implementation, the light spot area in the image to be processed includes at least one, and the color rendering processing includes color filling. S103 includes: for each light spot area, determining the target area corresponding to the light spot area in the underexposed image; and filling the light spot area with color according to the pixel information of each pixel point in the target area to obtain a first image.

[0083] In one embodiment of the present disclosure, the image to be processed includes at least one light spot area. First, in the underexposed image, a target area corresponding to each light spot area is determined, and then the light spot area is filled with color according to the pixel information of each pixel in the target area to obtain a first image. In this way, the color of the light spot area in the image to be processed is filled according to the color information in the underexposed image, so that the light spot area in the processed first image has rich colors and a strong sense of layering, thereby improving the imaging effect.

[0084] As an optional implementation, the light spot area is filled with color according to the pixel information of each pixel in the target area, including: determining the area to be filled in the light spot area; assigning values ​​to the corresponding pixels in the area to be filled according to the pixel information of the pixel in the target area, so as to fill the area to be filled with color.

[0085] In one embodiment of the present disclosure, an area to be filled is first determined in the spot area of ​​the image to be processed, wherein the pixels in the area to be filled are pixels with missing colors, and values ​​are assigned to the corresponding pixels in the area to be filled according to the pixel information of the pixels in the target area in the underexposed image (i.e., the values ​​of the u channel and v channel of the pixels), so that the pixels with missing colors have color information, thereby realizing color filling processing on the area to be filled.

[0086] As an optional implementation, determining the area to be filled in the spot area includes: determining the distance between each pixel point in the spot area and a preset pixel point; determining the pixel point to be filled based on the relationship between the distance and a preset distance threshold; and determining the area to be filled based on the pixel point to be filled.

[0087] In one embodiment of the present disclosure, the distance between each pixel point in the spot area and a preset pixel point is determined, and the pixel point to be filled is determined according to the relationship between the distance and a preset distance threshold, thereby determining the area to be filled.

[0088] For example, the preset pixel point is a pure white pixel point, the preset distance threshold is 3, and the pixel point to be filled is determined according to the following relationship:

[0089] abs(u x,y -128)+abs(v x,y -128)<3

[0090] Among them, u x,y is the value of a pixel in the u channel, v x,y is the value of a pixel in the v channel, abs(u x,y -128)+abs(v x,y -128) is the distance between the pixel and the pure white pixel.

[0091] As an optional implementation, the image processing method further includes: performing color enhancement processing on the light spot area in the first image to obtain a second image.

[0092] In one embodiment of the present disclosure, color enhancement processing is performed on the light spot area in the first image to obtain a second image, so that the color of the light spot area in the processed image to be processed (i.e., the second image) is bright, further improving the imaging effect.

[0093] As an optional implementation, color enhancement processing is performed on the spot area in the first image to obtain a second image, including: determining a region to be enhanced in the spot area of ​​the first image; and performing color enhancement processing on the region to be enhanced according to a preset spot color contrast coefficient.

[0094] In one embodiment of the present disclosure, a region to be enhanced is first determined in the spot area of ​​the first image, and then color enhancement processing is performed on the region to be enhanced according to a preset spot color contrast coefficient, so that the color of the region is bright, wherein the larger the preset spot color contrast coefficient is, the higher the contrast of the spot color after processing.

[0095] For example, the color enhancement process is performed on the area to be enhanced according to the following relationship:

[0096] u' x,y =α×(u x,y -128)+128

[0097] v' x,y =α×(v x,y -128)+128

[0098] Among them, u' x,y is the value of the pixel in the u channel after color enhancement, v' x,y is the value of the pixel in the v channel after color enhancement processing, and α is the preset spot color contrast coefficient.

[0099] In addition, since the pixel value ranges from 0 to 255, it is necessary to calculate u' x,y and v' x,y The values ​​are truncated, that is, the values ​​less than 0 after calculation are recorded as 0, and the values ​​greater than 255 are recorded as 255.

[0100] As an optional implementation, determining an area to be enhanced in the spot area of ​​the first image includes: determining the distance between each pixel point in the spot area and a preset pixel point; determining the pixel point to be enhanced based on the relationship between the distance and the preset distance interval; and determining the area to be enhanced based on the pixel point to be enhanced.

[0101] In an embodiment of the present disclosure, the distance between each pixel point in the spot area and the preset pixel point is determined, and the pixel point to be enhanced is determined according to the relationship between the distance and the preset distance interval, thereby determining the area to be enhanced.

[0102] For example, the preset pixel point is a pure white pixel point, the preset distance interval is [3,30), and the pixel point to be enhanced is determined according to the following relationship:

[0103] 3≤abs(u x,y -128)+abs(v x,y -128)<30

[0104] As an optional implementation manner, the image processing method further includes: in response to receiving an adjustment operation of a preset light spot color contrast coefficient by a user, determining the preset light spot color contrast coefficient according to the adjustment operation.

[0105] In one embodiment of the present disclosure, the preset light spot color contrast coefficient can be adjusted by the user, so that the user can easily and independently control the contrast of the light spot color, making the color enhancement processing more flexible, further improving the user experience, and better meeting user expectations.

[0106] Figure 2 FIG. 1 is a flowchart of another image processing method provided by an embodiment of the present disclosure. Figure 2 As shown, the method for color rendering of the light spot area in the image to be processed includes:

[0107] S201: Acquire an image to be processed and an underexposed image; wherein the underexposed image and the image to be processed are continuously exposed at the same time, and the exposure level of the underexposed image is lower than that of the image to be processed;

[0108] S202: performing an alignment operation on the underexposed image according to the image to be processed to obtain a target underexposed image;

[0109] S203: Detecting the light spot area in the image to be processed;

[0110] S204: performing color filling processing on the area to be filled in the light spot area according to the target under-exposed image to obtain a first image;

[0111] S205: Performing color filling processing on the area to be enhanced in the light spot area of ​​the first image to obtain a second image.

[0112] Among them, the specific implementation method of S201-S205 can be referred to the above description and will not be repeated here.

[0113] Figure 3 FIG. 1 is a block diagram of an image processing device provided by an embodiment of the present disclosure. Figure 3As shown, the image processing device 300 may include an image acquisition module 301 , a light spot detection module 302 , and a color rendering module 303 .

[0114] The image acquisition module 301 is configured to acquire an image to be processed and an underexposed image; wherein the underexposed image is continuously exposed at the same time as the image to be processed, and the exposure level is lower than that of the image to be processed;

[0115] The light spot detection module 302 is configured to perform light spot detection on the image to be processed to obtain a light spot area;

[0116] The color rendering module 303 is configured to perform color rendering processing on the light spot area according to the underexposed image to obtain a first image.

[0117] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: through an underexposed image, color rendering is performed on the light spot area in the image to be processed, thereby solving the problem of color loss in the light spot area in the image to be processed, so that the light spot area in the processed first image has rich colors and a strong sense of layering, thereby improving the imaging effect and meeting user expectations; at the same time, only one underexposed image is required to complete the above-mentioned color rendering processing, which has low complexity and consumes less performance and power consumption of the mobile phone.

[0118] Optionally, the light spot area includes at least one, the color rendering process includes color filling, and the color rendering module 303 includes:

[0119] a target area determination submodule, configured to determine, for each of the light spot areas, a target area corresponding to the light spot area in the underexposed image;

[0120] The first image acquisition submodule is configured to obtain the first image after color filling the light spot area according to the pixel information of each pixel point in the target area.

[0121] Optionally, the first image acquisition submodule includes:

[0122] A to-be-filled area determination submodule is configured to determine the to-be-filled area in the light spot area;

[0123] The color filling submodule is configured to assign values ​​to corresponding pixels in the area to be filled according to pixel information of the pixels in the target area, so as to perform color filling processing on the area to be filled.

[0124] Optionally, the submodule for determining the area to be filled is configured to: determine the distance between each pixel point in the light spot area and a preset pixel point; determine the pixel point to be filled based on the relationship between the distance and a preset distance threshold; and determine the area to be filled based on the pixel point to be filled.

[0125] Optionally, the image processing device 300 further includes:

[0126] The second image acquisition module is configured to perform color enhancement processing on the light spot area in the first image to obtain a second image.

[0127] Optionally, the second image acquisition module includes:

[0128] A submodule for determining an area to be enhanced, configured to determine an area to be enhanced in the light spot area of ​​the first image;

[0129] The color enhancement submodule is configured to perform color enhancement processing on the area to be enhanced according to a preset light spot color contrast coefficient.

[0130] Optionally, the image processing device 300 further includes:

[0131] The coefficient adjustment module is configured to, in response to receiving an adjustment operation of the preset light spot color contrast coefficient by a user, determine the preset light spot color contrast coefficient according to the adjustment operation.

[0132] Optionally, the submodule for determining the area to be enhanced is configured to: determine the distance between each pixel point in the light spot area and a preset pixel point; determine the pixel point to be enhanced based on the relationship between the distance and the preset distance interval; and determine the area to be enhanced based on the pixel point to be enhanced.

[0133] Optionally, the light spot detection module 302 includes:

[0134] A target pixel point determination submodule is configured to determine a target pixel point in the image to be processed whose pixel value is greater than a preset pixel threshold;

[0135] A connected domain determination submodule is configured to determine a plurality of connected domains composed of the target pixel points by a connected domain detection method;

[0136] The light spot region determination submodule is configured to determine the light spot region from the multiple connected domains.

[0137] Optionally, the light spot area determination submodule is configured to: determine at least one target connected domain from the multiple connected domains based on the number of pixel points contained in each of the connected domains, the number of pixel points included in each of the target connected domains being less than or equal to a preset number threshold; and take each of the target connected domains as the light spot area.

[0138] Optionally, the image processing device 300 further includes:

[0139] an alignment module, configured to perform an alignment operation on the underexposed image according to the image to be processed to obtain a target underexposed image;

[0140] At this time, the color rendering module 303 is configured to perform color rendering processing on the light spot area according to the target under-exposed image.

[0141] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0142] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and the program instructions, when executed by a processor, implement the steps of the image processing method provided by the present disclosure.

[0143] Figure 4 8 is a block diagram of an apparatus 800 for image processing according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0144] Reference Figure 4 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .

[0145] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned image processing method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0146] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0147] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0148] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0149] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0150] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0151] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0152] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0153] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned image processing method.

[0154] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to complete the above-mentioned image processing method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0155] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned image processing method when executed by the programmable device.

[0156] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0157] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image processing method, characterized in that: include: Acquire an image to be processed and an underexposed image; wherein the underexposed image is continuously exposed at the same time as the image to be processed, and the exposure level is lower than that of the image to be processed; Performing light spot detection on the image to be processed to obtain a light spot area; According to the underexposed image, color rendering is performed on the light spot area to obtain a first image.

2. The method according to claim 1, characterized in that The light spot area includes at least one, the color rendering process includes color filling, and the color rendering process is performed on the light spot area according to the underexposed image to obtain a first image, including: For each of the light spot areas, determining a target area corresponding to the light spot area in the underexposed image; The first image is obtained by color filling the light spot area according to the pixel information of each pixel point in the target area.

3. The method according to claim 2, characterized in that The color filling of the light spot area according to the pixel information of each pixel point in the target area includes: Determining an area to be filled in the light spot area; According to the pixel information of the pixel points in the target area, the corresponding pixel points in the area to be filled are assigned values, so as to perform color filling processing on the area to be filled.

4. The method according to claim 3, characterized in that The determining of the area to be filled in the light spot area includes: Determine the distance between each pixel point in the light spot area and a preset pixel point; Determining the pixel points to be filled according to the relationship between the distance and a preset distance threshold; The area to be filled is determined according to the pixel points to be filled.

5. The method according to claim 1, characterized in that The method further comprises: Performing color enhancement processing on the light spot area in the first image to obtain a second image.

6. The method according to claim 5, characterized in that The step of performing color enhancement processing on the light spot area in the first image to obtain the second image includes: Determine a region to be enhanced in the light spot region of the first image; According to the preset light spot color contrast coefficient, color enhancement processing is performed on the area to be enhanced.

7. The method according to claim 6, characterized in that The method further comprises: In response to receiving an adjustment operation of the preset light spot color contrast coefficient by a user, the preset light spot color contrast coefficient is determined according to the adjustment operation.

8. The method according to claim 6, characterized in that The determining of the area to be enhanced in the light spot area of ​​the first image includes: Determine the distance between each pixel point in the light spot area and a preset pixel point; Determining a pixel point to be enhanced according to a relationship between the distance and a preset distance interval; The area to be enhanced is determined according to the pixel points to be enhanced.

9. The method according to any one of claims 1 to 8, characterized in that: The step of performing light spot detection on the image to be processed to obtain a light spot area includes: Determine a target pixel point in the image to be processed whose pixel value is greater than a preset pixel threshold; Determine a plurality of connected domains composed of the target pixel points by a connected domain detection method; The light spot area is determined from the multiple connected domains.

10. The method according to claim 9, characterized in that The step of determining the light spot area from the multiple connected domains includes: Determine at least one target connected domain from the multiple connected domains according to the number of pixels included in each of the connected domains, wherein the number of pixels included in each of the target connected domains is less than or equal to a preset number threshold; Each of the target connected domains is used as the light spot area.

11. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: According to the image to be processed, an alignment operation is performed on the underexposed image to obtain a target underexposed image; The step of performing color rendering processing on the light spot area according to the underexposed image comprises: According to the target under-exposed image, color rendering processing is performed on the light spot area.

12. An image processing device, characterized in that: include: An image acquisition module is configured to acquire an image to be processed and an underexposed image; wherein the underexposed image is continuously exposed at the same time as the image to be processed, and has a lower exposure level than the image to be processed; A light spot detection module is configured to perform light spot detection on the image to be processed to obtain a light spot area; The color rendering module is configured to perform color rendering processing on the light spot area according to the underexposed image to obtain a first image.

13. An image processing device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the steps of the image processing method described in any one of claims 1-11.

14. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.