Image processing method and device, medium and chip

By identifying and processing pixel points in the reflective area in image processing and updating their pixel values, the problem of reflection occlusion during selfies is solved, and the clarity of the image and shooting experience are improved.

CN119444580APending Publication Date: 2025-02-14BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310955873.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During the process of taking and imaging, due to the complexity of the lighting environment and the special nature of the reflective material, the reflection phenomenon leads to low quality of the imaging picture, especially when taking selfies, the glasses have serious problems with reflection occlusion.

Method used

By determining the target area image with a reflective area in the image to be processed, traversing each target pixel point in the reflective area, determining its associated pixel point set, and updating the value of the target pixel point according to the pixel value of the associated pixel point set, thereby obtaining Update the image and eliminate reflection.

Benefits of technology

Effectively eliminate reflection phenomena, improve the accuracy of image processing, ensure the accuracy and clarity of the processed image, and improve the self-portrait experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444580A_ABST
    Figure CN119444580A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, a medium and a chip. The method comprises the following steps: determining a target area image with a reflective area in a to-be-processed image; each target pixel point in the reflective area is traversed, an associated pixel point set corresponding to the target pixel point is determined, and associated pixel points in the associated pixel point set are pixel points located in the peripheral area of the target pixel point in the target area image; determining a target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set, updating the pixel value of the target pixel point to the target pixel value, and obtaining an updated image corresponding to the target area image; and determining a target image obtained after image processing according to the updated image and the to-be-processed image. Therefore, light reflection elimination is carried out on the light reflection area in the image, and the original display content of the light reflection part is reserved to the maximum extent while the light reflection phenomenon is eliminated.
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, medium and chip. Background Art

[0002] In the related art, due to the complexity of the lighting environment in real scenes and the special materials of reflective materials (such as glasses lenses, glass, etc.), reflection problems will occur during the photo imaging process. Especially when using a mobile phone to take selfies, the reflection of glasses will block the human eye area, resulting in low image quality and a bad photo taking experience. 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, medium and chip.

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

[0005] Determine a target area image having a reflective area in the image to be processed;

[0006] Traversing each target pixel point in the reflective area, determining an associated pixel point set corresponding to the target pixel point, wherein the associated pixel points in the associated pixel point set are pixel points in the target area image that are in the surrounding area of ​​the target pixel point;

[0007] Determine a target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set, and update the pixel value of the target pixel point to the target pixel value to obtain an updated image corresponding to the target area image;

[0008] A target image obtained after image processing is determined according to the updated image and the image to be processed.

[0009] Optionally, determining the associated pixel point set corresponding to the target pixel point includes:

[0010] Acquire pixel points corresponding to non-reflective marks in a target range adjacent to the target pixel point as surrounding pixel points of the target pixel point, wherein the pixel points in the target area image and outside the reflective area correspond to non-reflective marks;

[0011] Determine the pixel difference between each of the surrounding pixels and the target pixel;

[0012] If the pixel difference is less than the difference threshold, the surrounding pixels are taken as associated pixels and added to the associated pixel set.

[0013] Optionally, the determining the associated pixel point set corresponding to the target pixel point further includes:

[0014] If the number of associated pixel points in the associated pixel point set is less than the quantity threshold, the target range is increased, and the newly added pixel points corresponding to the non-reflective mark in the increased target range are used as the surrounding pixel points of the target pixel point, and the process returns to the step of determining the pixel difference between each of the surrounding pixel points and the target pixel point.

[0015] Optionally, the target pixel point after the pixel value is updated to the target pixel value is determined as the pixel point corresponding to the non-reflective mark.

[0016] Optionally, the determining the pixel difference between each of the surrounding pixels and the target pixel includes:

[0017] The pixel difference between the surrounding pixels and the target pixel is determined according to the values ​​of the pixel values ​​of the surrounding pixels and the pixel value of the target pixel in each channel.

[0018] Optionally, determining the target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set includes:

[0019] For each associated pixel in the associated pixel set, determining a weight corresponding to the associated pixel according to a difference between the associated pixel and the target pixel;

[0020] The target pixel value of the target pixel point is determined according to the weight corresponding to the associated pixel point and the pixel value of the associated pixel point.

[0021] Optionally, determining a target area image having a reflective area in the image to be processed includes:

[0022] Performing reflective area detection on the image to be processed, and extracting a regional image containing the reflective area in the image to be processed;

[0023] Perform image segmentation processing on the regional image to obtain an image mask corresponding to the reflective area in the regional image, and use the regional image including the image mask as the target regional image.

[0024] Optionally, the performing reflective area detection on the image to be processed and extracting a region image containing the reflective area in the image to be processed includes:

[0025] Inputting the image to be processed into a neural network model to obtain position information of the regional image in the image to be processed, wherein the position information includes coordinate information of two end points of a diagonal line in the regional image, and the neural network model is used to detect a regional image having a reflective area in the input image;

[0026] According to the position information, an image in a graphic frame corresponding to the position information is extracted from the image to be processed as the regional image.

[0027] Optionally, determining a target image obtained after image processing according to the update image and the image to be processed includes:

[0028] According to the position information of the target area image, the updated image is used as the image in the graphic frame corresponding to the position information in the image to be processed to obtain the target image.

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

[0030] A first determination module is configured to determine a target area image having a reflective area in the image to be processed;

[0031] A second determination module is configured to traverse each target pixel point in the reflective area and determine an associated pixel point set corresponding to the target pixel point, wherein the associated pixel points in the associated pixel point set are pixel points in the target area image that are in the surrounding area of ​​the target pixel point;

[0032] An updating module is configured to determine a target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set, and update the pixel value of the target pixel point to the target pixel value to obtain an updated image corresponding to the target area image;

[0033] The processing module is configured to determine a target image obtained after image processing according to the update image and the image to be processed.

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

[0035] processor;

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

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

[0038] 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.

[0039] According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, including a processor and an interface; the processor is used to read instructions to execute the steps of the image processing method provided in the first aspect of the present disclosure.

[0040] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0041] In the above technical solution, a target area image having a reflective area in the image to be processed is determined, so that each target pixel point in the reflective area can be traversed to determine the associated pixel point set corresponding to the target pixel point, and the target pixel value of the target pixel point is determined according to the pixel value of each associated pixel point in the associated pixel point set, and the pixel value of the target pixel point is updated to the target pixel value, and an updated image corresponding to the target area image is obtained, so as to determine the target image obtained after image processing according to the updated image and the image to be processed. Thus, at the same time, when image processing is performed on the reflective area in the image to be processed, the pixel points and positions of the reflective area caused by reflection in the image can be accurately obtained, so as to eliminate the reflection in a targeted manner. And when the values ​​of the pixels in the reflective area are updated, the pixels in the reflective area can be filled and updated based on the pixels in the surrounding area, so as to remove the reflection phenomenon while retaining the original display content of the reflective part to the greatest extent, improve the accuracy of image processing, and ensure the accuracy and clarity of the processed image.

[0042] 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

[0043] 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.

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

[0045] Figure 2 is a block diagram of an image processing apparatus according to an exemplary embodiment.

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

[0047] Figure 4 is a block diagram of an image processing apparatus according to an exemplary embodiment. DETAILED DESCRIPTION

[0048] 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.

[0049] 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 country where the device is located and with the authorization given by the owner of the corresponding device.

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

[0051] In step 11, a target area image having a reflective area in the image to be processed is determined.

[0052] When capturing an image, reflective materials in the scene, such as glasses, glass, etc., will form a reflective area in the resulting image when imaging, which reduces the image clarity in the reflective area. In the step, when performing reflective elimination on the image to be processed, a target area image having a reflective area can be first determined to avoid the influence of image processing on pixels in other areas. For example, the target area image can be an area image of a preset shape including the reflective area.

[0053] In step 12, each target pixel point in the reflective area is traversed to determine an associated pixel point set corresponding to the target pixel point, wherein the associated pixel points in the associated pixel point set are pixel points in the target area image that are in the surrounding area of ​​the target pixel point.

[0054] In this step, for each target pixel point, the target pixel point can be used as the center of a circle to determine associated pixel points from the surrounding pixel points.

[0055] In step 13, the target pixel value of the target pixel is determined according to the pixel value of each associated pixel in the associated pixel set, and the pixel value of the target pixel is updated to the target pixel value to obtain an updated image corresponding to the target area image.

[0056] Among them, the image of the reflective area is an imaging area formed when the image is taken due to the reflection phenomenon. In the step, for each target pixel point in the image of the reflective area, its pixel value can be updated by the pixel value of the associated pixel point adjacent to it, thereby eliminating the occlusion caused by the reflection phenomenon, eliminating the reflection of the target area image, and obtaining an updated image.

[0057] In step 14, a target image obtained after image processing is determined according to the updated image and the image to be processed.

[0058] For example, the target area image in the image to be processed may be replaced by the updated image to obtain the target image.

[0059] In the above technical solution, a target area image having a reflective area in the image to be processed is determined, so that each target pixel point in the reflective area can be traversed to determine the associated pixel point set corresponding to the target pixel point, and the target pixel value of the target pixel point is determined according to the pixel value of each associated pixel point in the associated pixel point set, and the pixel value of the target pixel point is updated to the target pixel value, and an updated image corresponding to the target area image is obtained, so as to determine the target image obtained after image processing according to the updated image and the image to be processed. Thus, at the same time, when image processing is performed on the reflective area in the image to be processed, the pixel points and positions of the reflective area caused by reflection in the image can be accurately obtained, so as to eliminate the reflection in a targeted manner. And when the values ​​of the pixels in the reflective area are updated, the pixels in the reflective area can be filled and updated based on the pixels in the surrounding area, so as to remove the reflection phenomenon while retaining the original display content of the reflective part to the greatest extent, improve the accuracy of image processing, and ensure the accuracy and clarity of the processed image.

[0060] In a possible embodiment, the reflective area is a reflective area of ​​glasses. In addition to the glasses in the image, there may be other parts in the image that can also reflect light and form a reflective area in the image. Accordingly, in this embodiment, when performing image processing to eliminate reflections on the image to be processed, a target area image containing the reflective area of ​​glasses in the image to be processed can be determined, so as to determine the reflective area of ​​glasses in the target area image, so that the approximate area where the reflection phenomenon is located can be located when performing image extraction, and the influence of the reflective area of ​​the non-lens part can be excluded when eliminating reflections, thereby further improving the accuracy of reflection elimination.

[0061] In a possible embodiment, an exemplary implementation method of determining the target area image having a reflective area in the image to be processed may include:

[0062] Perform reflective area detection on the image to be processed, and extract a region image containing the reflective area in the image to be processed.

[0063] Among them, the reflective area detection in the image to be processed can be achieved through a pre-trained neural network model.

[0064] As an example, the performing reflective area detection on the image to be processed and extracting the area image containing the reflective area in the image to be processed may include:

[0065] Inputting the image to be processed into a neural network model to obtain position information of the regional image in the image to be processed, wherein the position information includes coordinate information of two end points of a diagonal line in the regional image, and the neural network model is used to detect a regional image having a reflective area in the input image;

[0066] According to the position information, an image in a graphic frame corresponding to the position information is extracted from the image to be processed as the regional image.

[0067] Among them, a large number of pictures containing reflective areas can be collected in advance, and the reflective areas can be marked in the pictures. For example, if they can be marked by a rectangular box, the points on the diagonal of the rectangular box can be directly marked during marking, that is, the rectangular box can be marked by two points. For example, the two marked points can include the coordinates of the vertices of the upper left corner and the lower right corner, or the coordinates of the vertices of the upper right corner and the lower left corner. Afterwards, a neural network model can be trained based on the marked image, so that the neural network model can detect regional images with reflective areas in the input image.

[0068] For example, an image containing a reflective area can be used as input, and the annotated coordinate point information can be used as target output to train the neural network model. The training can be based on a common neural network model training method in the art, which is not limited here.

[0069] After that, the image to be processed can be input into the trained neural network model to obtain the output coordinate information, that is, the position information of the image block corresponding to the reflective area. Through this position information, a rectangular frame can be formed, and then the image can be extracted from the image to be processed with this position information to obtain the image block containing the reflective area, that is, to obtain the regional image.

[0070] Therefore, through the above technical solution, the regional image containing the reflective area in the image to be processed can be quickly and accurately extracted based on the neural network model, and the regional image can be processed separately, which can avoid affecting the pixels in other areas of the image to be processed.

[0071] As an example, when annotating the training data, the reflective area of ​​the glasses can also be annotated. The trained neural network model can then be used to detect regional images with reflective areas of the glasses in the image, thereby quickly and accurately extracting images of the reflective areas of the glasses, so as to facilitate processing of the images of the reflective areas, thereby avoiding the influence of pixels in non-lens reflective areas in the image on the image processing of the reflective areas of the glasses, and at the same time reducing the amount of data processing corresponding to the image processing, thereby improving processing efficiency.

[0072] Perform image segmentation processing on the regional image to obtain an image mask corresponding to the reflective area in the regional image, and use the regional image including the image mask as the target regional image.

[0073] Among them, image segmentation processing can be performed based on the image segmentation algorithm in the relevant technology. For example, an image segmentation network can be pre-trained based on the image segmentation algorithm. For example, a large number of reflective area images can be collected in advance and image annotation can be performed on them. For example, a mask corresponding to the reflective part in the reflective area image can be annotated, so that the area image can be used as input and the annotated mask can be used as the target output to train the image segmentation network.

[0074] During use, the regional image can be input into the image segmentation network to obtain the mask of the regional image, that is, the image mask corresponding to the reflective area, thereby obtaining the target area image.

[0075] Therefore, through the above technical solution, the regional image containing the reflective area in the image to be processed can be extracted first, and then the image mask corresponding to the reflective area can be segmented from the regional image, so that the approximate area where the reflective phenomenon is located can be effectively located. While eliminating the reflection, it will not affect other pixel values, thereby further improving the accuracy of image processing.

[0076] In a possible embodiment, an exemplary implementation manner of determining the associated pixel point set corresponding to the target pixel point may include:

[0077] Pixel points corresponding to non-reflective marks in a target range adjacent to the target pixel point are obtained as surrounding pixel points of the target pixel point, wherein the pixel points in the target area image and outside the reflective area correspond to non-reflective marks.

[0078] Among them, the pixel points in the reflective area are the pixel points affected by the reflection phenomenon. When determining the associated pixel points, the pixel points in the target area image and outside the reflective area correspond to non-reflective markers, so that when the pixel value of the target pixel point is updated, it can be updated based on the pixel value of the pixel point that is not affected by the reflection.

[0079] As an example, the target range can be a range with the target pixel point as the center and one pixel point as the radius, that is, the four pixel points adjacent to the target pixel point above, below, left and right can be traversed and the pixel points corresponding to the non-reflective mark can be used as its surrounding pixel points.

[0080] Then, the pixel difference between each of the surrounding pixels and the target pixel is determined.

[0081] Among them, if the pixel difference between the surrounding pixels and the target pixel is large, for example, the reflective area formed by the reflection of glasses, where the pixel value of the frame part is very different from the distribution of facial skin color, the pixel value of the frame part has no reference significance for adjusting the pixel value of facial skin color. Based on this, the degree of association between the pixels can be characterized based on the pixel difference between the pixels to determine whether to update the target pixel based on the surrounding pixels.

[0082] For example, the determining of the pixel difference between each of the surrounding pixels and the target pixel may include:

[0083] The pixel difference between the surrounding pixels and the target pixel is determined according to the values ​​of the pixel values ​​of the surrounding pixels and the pixel value of the target pixel in each channel.

[0084] For example, the arithmetic square root of the sum of the squares of the differences between the pixel values ​​of the surrounding pixels and the pixel value of the target pixel in each channel may be used as the pixel difference between the surrounding pixels and the target pixel.

[0085]

[0086] Among them, v is used to represent the pixel difference, R1, G1, and B1 are used to represent the pixel value of each channel of the RGB three channels of the surrounding pixels, and R, G, and B are used to represent the pixel value of each channel of the RGB three channels of the target pixel.

[0087] If the pixel difference is less than the difference threshold, the surrounding pixels are taken as associated pixels and added to the associated pixel set.

[0088] The difference threshold can be set according to the actual usage scenario. If the pixel difference is less than the difference threshold, it means that the pixels of the associated pixel and the target pixel are relatively similar, and the pixel value of the target pixel can be updated based on the surrounding pixels, and the surrounding pixels can be added as associated pixels to the associated pixel set, so that the target pixel can be updated based on each pixel in the associated pixel set.

[0089] Therefore, through the above technical solution, the associated pixel points for updating the pixel value of the target pixel point can be determined from the surrounding area of ​​the target pixel point, ensuring the matching degree between the associated pixel points and the target pixel point, thereby improving the accuracy of the pixel value update of the target pixel point to a certain extent.

[0090] In a possible embodiment, determining the associated pixel point set corresponding to the target pixel point may further include:

[0091] If the number of associated pixel points in the associated pixel point set is less than the quantity threshold, the target range is increased, and the newly added pixel points corresponding to the non-reflective mark in the increased target range are used as the surrounding pixel points of the target pixel point, and the process returns to the step of determining the pixel difference between each of the surrounding pixel points and the target pixel point.

[0092] As an example, the number of associated pixel points for updating the target pixel point, ie, the number threshold, may be preset, such as 16, to further ensure the accuracy of updating the pixel value of the target pixel point.

[0093] If the number of associated pixels in the associated pixel set is less than the number threshold, the target range is increased. For example, the radius of the target range can be further increased, such as increasing the radius to 2 pixels. In this case, newly added pixels corresponding to non-reflective marks may appear in the increased target range. In this case, these pixels can be used as surrounding pixels of the target pixel to again determine the pixel difference between each surrounding pixel and the target pixel. If the pixel difference is less than the difference threshold, the surrounding pixels are used as associated pixels and added to the associated pixel set. The implementation method of this step has been described in detail above and will not be repeated again.

[0094] If after the above process, the number of associated pixels in the associated pixel point set is less than the quantity threshold, the target range can be increased again, such as increasing the radius to 3 pixels, and executing the same subsequent processing logic until the number of associated pixels in the associated pixel point set reaches the quantity threshold.

[0095] Therefore, through the above technical solution, multiple associated pixel points close to the target pixel point can be determined from the target area image. The associated pixel points are pixel points in the target area image that are close to the target pixel point and are not affected by reflections, which can provide effective data support for subsequent updating of the target pixel points based on the associated pixel points.

[0096] In a possible embodiment, the target pixel point after the pixel value is updated to the target pixel value is determined as the pixel point corresponding to the non-reflective mark, that is, after the pixel value of the current target pixel point is updated, it can be considered that the pixel value of the target pixel point has eliminated the influence of reflection, that is, the target pixel point can be considered as a pixel point not affected by reflection after updating, and then the target pixel point can be further determined as the pixel point corresponding to the non-reflective mark, so that the pixel values ​​of other target pixel points can be updated based on the updated target pixel point, thereby further improving the effectiveness and accuracy of image processing and ensuring the accuracy of reflection elimination.

[0097] In a possible embodiment, the exemplary implementation method of determining the target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set may include:

[0098] For each associated pixel point in the associated pixel point set, a weight corresponding to the associated pixel point is determined according to a difference between the associated pixel point and the target pixel point.

[0099] Among them, the weight corresponding to the associated pixel point can be obtained by subtracting the proportion corresponding to the associated pixel point from 1. The proportion corresponding to the associated pixel point is the ratio of the difference degree corresponding to the associated pixel point to the sum of the difference degrees corresponding to multiple associated pixels. For example:

[0100] vsum=v1+v2+v3+v4+…+vn

[0101] α i =1-vi / vsum

[0102] Among them, n is the quantity threshold, α i Represents the weight corresponding to the i-th associated pixel. The greater the pixel difference between the associated pixel and the target pixel, the greater the difference between the two groups of pixels. Through the above weight determination method, the pixel with a greater pixel value difference from the target pixel plays a smaller role in calculating the final pixel value.

[0103] According to the weights corresponding to the associated pixels, weighted sum is performed on the associated pixels to obtain a target pixel value of the target pixel.

[0104] Therefore, through the above technical scheme, the importance of each associated pixel point when updating the target pixel point can be determined based on the pixel difference between each associated pixel point and the target pixel point. While ensuring the accuracy of the target pixel value, the influence of each different associated pixel point is fully considered to eliminate the original reflection phenomenon.

[0105] In a possible embodiment, determining a target image obtained after image processing according to the update image and the image to be processed includes:

[0106] According to the position information of the target area image, the updated image is used as the image in the graphic frame corresponding to the position information in the image to be processed to obtain the target image.

[0107] As in the example described above, when determining the target area image, the position information of the target area image in the image to be processed can be obtained. After the pixel value of the target pixel point is updated to the target pixel value to obtain an updated image, the updated image can be directly used to replace the image of the image frame corresponding to the position information in the original image to be processed. Based on the position information, the updated image and the target area image are replaced and updated to obtain the target image after eliminating reflections, thereby realizing rapid image processing, improving the quality and clarity of images taken by users, and further enhancing the user experience.

[0108] The present disclosure also provides an image processing device, such as Figure 2 As shown, the device 10 comprises:

[0109] The first determination module 100 is configured to determine a target area image having a reflective area in the image to be processed;

[0110] The second determination module 200 is configured to traverse each target pixel point in the reflective area and determine an associated pixel point set corresponding to the target pixel point, wherein the associated pixel points in the associated pixel point set are pixel points in the target area image that are in the surrounding area of ​​the target pixel point;

[0111] An updating module 300 is configured to determine a target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set, and update the pixel value of the target pixel point to the target pixel value, so as to obtain an updated image corresponding to the target area image;

[0112] The processing module 400 is configured to determine a target image obtained after image processing according to the update image and the image to be processed.

[0113] Optionally, the second determining module includes:

[0114] A first determination submodule is configured to obtain pixel points corresponding to non-reflective marks in a target range adjacent to the target pixel point as surrounding pixel points of the target pixel point, wherein the pixel points in the target area image and outside the reflective area correspond to non-reflective marks;

[0115] A second determination submodule is configured to determine a pixel difference between each of the surrounding pixels and the target pixel;

[0116] The third determining submodule is configured to take the surrounding pixels as associated pixels and add them to the associated pixel set if the pixel difference is less than a difference threshold.

[0117] Optionally, the second determining module further includes:

[0118] The first processing submodule is configured to increase the target range if the number of associated pixel points in the associated pixel point set is less than a quantity threshold, and use the newly added pixel points corresponding to the non-reflective mark in the increased target range as the surrounding pixel points of the target pixel point, and re-trigger the second determination submodule to determine the pixel difference between each of the surrounding pixel points and the target pixel point.

[0119] Optionally, the target pixel point after the pixel value is updated to the target pixel value is determined as the pixel point corresponding to the non-reflective mark.

[0120] Optionally, the second determining submodule is further configured to:

[0121] The pixel difference between the surrounding pixels and the target pixel is determined according to the values ​​of the pixel values ​​of the surrounding pixels and the pixel value of the target pixel in each channel.

[0122] Optionally, the update module includes:

[0123] A fourth determination submodule is configured to determine, for each associated pixel in the associated pixel set, a weight corresponding to the associated pixel according to a difference between the associated pixel and the target pixel;

[0124] The fifth determination submodule is configured to determine the target pixel value of the target pixel point according to the weight corresponding to the associated pixel point and the pixel value of the associated pixel point.

[0125] Optionally, the first determining module includes:

[0126] A first extraction submodule is configured to perform reflective area detection on the image to be processed, and extract a region image containing the reflective area in the image to be processed;

[0127] The second processing submodule is configured to perform image segmentation processing on the regional image, obtain an image mask corresponding to the reflective area in the regional image, and use the regional image including the image mask as the target regional image.

[0128] Optionally, the first extraction submodule includes:

[0129] A third processing submodule is configured to input the image to be processed into a neural network model to obtain position information of the regional image in the image to be processed, wherein the position information includes coordinate information of two end points of a diagonal line in the regional image, and the neural network model is used to detect a regional image having a reflective area in the input image;

[0130] The second extraction submodule is configured to extract, according to the position information, an image in a graphic frame corresponding to the position information from the image to be processed as the regional image.

[0131] Optionally, the processing module is further configured to:

[0132] According to the position information of the target area image, the updated image is used as the image in the graphic frame corresponding to the position information in the image to be processed to obtain the target image.

[0133] 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.

[0134] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image processing method provided by the present disclosure are implemented.

[0135] Figure 3 8 is a block diagram of an image processing apparatus 800 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.

[0136] Reference Figure 3 , 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 .

[0137] 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.

[0138] 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.

[0139] 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.

[0140] 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.

[0141] 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.

[0142] 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.

[0143] 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.

[0144] 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.

[0145] 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.

[0146] 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.

[0147] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned image processing method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction may be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned image processing method may be implemented; alternatively, the integrated circuit or chip may receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned image processing method.

[0148] 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.

[0149] Figure 4 1 is a block diagram of an image processing apparatus 1900 according to an exemplary embodiment. For example, the apparatus 1900 may be provided as a server. Figure 4 The device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions that can be executed by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above-mentioned image processing method.

[0150] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958. The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or similar.

[0151] 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.

[0152] 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: Determine a target area image having a reflective area in the image to be processed; Traversing each target pixel point in the reflective area, determining an associated pixel point set corresponding to the target pixel point, wherein the associated pixel points in the associated pixel point set are pixel points in the target area image that are in the surrounding area of ​​the target pixel point; Determine a target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set, and update the pixel value of the target pixel point to the target pixel value to obtain an updated image corresponding to the target area image; A target image obtained after image processing is determined according to the updated image and the image to be processed.

2. The method according to claim 1, characterized in that The determining of the associated pixel point set corresponding to the target pixel point includes: Acquire pixel points corresponding to non-reflective marks in a target range adjacent to the target pixel point as surrounding pixel points of the target pixel point, wherein the pixel points in the target area image and outside the reflective area correspond to non-reflective marks; Determine the pixel difference between each of the surrounding pixels and the target pixel; If the pixel difference is less than the difference threshold, the surrounding pixels are taken as associated pixels and added to the associated pixel set.

3. The method according to claim 2, characterized in that The determining of the associated pixel point set corresponding to the target pixel point also includes: If the number of associated pixel points in the associated pixel point set is less than the quantity threshold, the target range is increased, and the newly added pixel points corresponding to the non-reflective mark in the increased target range are used as the surrounding pixel points of the target pixel point, and the process returns to the step of determining the pixel difference between each of the surrounding pixel points and the target pixel point.

4. The method according to claim 2, characterized in that: The target pixel point after the pixel value is updated to the target pixel value is determined as the pixel point corresponding to the non-reflective mark.

5. The method according to claim 2, characterized in that: The determining of the pixel difference between each of the surrounding pixels and the target pixel includes: The pixel difference between the surrounding pixels and the target pixel is determined according to the values ​​of the pixel values ​​of the surrounding pixels and the pixel value of the target pixel in each channel.

6. The method according to claim 1, characterized in that The step of determining the target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set comprises: For each associated pixel in the associated pixel set, determining a weight corresponding to the associated pixel according to a difference between the associated pixel and the target pixel; The target pixel value of the target pixel point is determined according to the weight corresponding to the associated pixel point and the pixel value of the associated pixel point.

7. The method according to claim 1, characterized in that The step of determining a target area image having a reflective area in the image to be processed includes: Performing reflective area detection on the image to be processed, and extracting a regional image containing the reflective area in the image to be processed; Perform image segmentation processing on the regional image to obtain an image mask corresponding to the reflective area in the regional image, and use the regional image including the image mask as the target regional image.

8. The method according to claim 7, characterized in that The detecting of the reflective area of ​​the image to be processed and extracting the area image containing the reflective area in the image to be processed comprises: Inputting the image to be processed into a neural network model to obtain position information of the regional image in the image to be processed, wherein the position information includes coordinate information of two end points of a diagonal line in the regional image, and the neural network model is used to detect a regional image having a reflective area in the input image; According to the position information, an image in a graphic frame corresponding to the position information is extracted from the image to be processed as the regional image.

9. The method according to claim 8, characterized in that The step of determining a target image obtained after image processing according to the updated image and the image to be processed comprises: According to the position information of the target area image, the updated image is used as the image in the graphic frame corresponding to the position information in the image to be processed to obtain the target image.

10. An image processing device, characterized in that: include: A first determination module is configured to determine a target area image having a reflective area in the image to be processed; A second determination module is configured to traverse each target pixel point in the reflective area and determine an associated pixel point set corresponding to the target pixel point, wherein the associated pixel points in the associated pixel point set are pixel points in the target area image that are in the surrounding area of ​​the target pixel point; An updating module is configured to determine a target pixel value of the target pixel point according to the pixel value of each associated pixel point in the associated pixel point set, and update the pixel value of the target pixel point to the target pixel value to obtain an updated image corresponding to the target area image; The processing module is configured to determine a target image obtained after image processing according to the update image and the image to be processed.

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

12. 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 9 are implemented.

13. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 9.