Miscellaneous point processing method, image forming device, electronic equipment and storage medium
Through Lab color space analysis and convolutional neural network to identify color abnormalities, adjusting for different types of miscellaneous points, solving the problem of incomplete processing of miscellaneous points in the existing technology, and improving image quality and user experience.
Patent Information
- Application Number
- CN202510771585.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-06-10
AI Technical Summary
In the prior art, the filtering algorithm adopts the same processing method for all miscellaneous points, resulting in some miscellaneous points being unable to be removed, affecting image quality and user perception, and even causing information interference and incorrect interpretation.
The image features are analyzed using Lab color space, and corresponding processing methods are used to adjust the color feature values of pixel points, including brightness, hue and saturation, and the exception types are identified through convolutional neural networks and targeted adjustments are made.
Effectively remove all kinds of miscellaneous points, improve image quality, preserve edge clarity and sharpness, and improve user experience.
Smart Images

Figure CN120301985A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of image formation, and specifically relates to a method for processing noise points, an image forming apparatus, an electronic device, and a storage medium. Background Art
[0002] An image forming apparatus is a device that forms an image on an imaging medium through an imaging principle, such as a printer, a copier, a fax machine, a multifunctional image production and copying device, an electrophotographic device, and any other similar devices. After the terminal device transmits the image data to the image forming apparatus, the image forming apparatus performs a series of complex operations such as signal conversion and laser imaging, and finally presents it on the imaging medium. However, due to the influence of various factors, the image presented on the imaging medium may have noise points, that is, points that the user does not want to appear on the imaging medium.
[0003] In the related art, in order to make the printing effect better, the image forming apparatus usually adopts a general filtering algorithm, such as mean filtering or median filtering, etc. These methods can reduce the noise points finally presented on the imaging medium to a certain extent.
[0004] However, when removing noise points, the filtering algorithms in the related art adopt the same processing method for all noise points, which may cause some noise points to be unable to be effectively removed. After a series of complex operations such as signal conversion and laser imaging are performed by the image forming apparatus, some noise points will finally be presented on the printing medium, affecting the image quality, thus affecting the user's perception, and even possibly causing serious information interference and misinterpretation.
[0005] It should be noted that the information disclosed in the background art part of this application is only intended to deepen the understanding of the general background art of this application, and should not be regarded as an admission or any form of suggestion that this information constitutes the prior art known to those skilled in the art. Summary of the Invention
[0006] In view of this, this application provides a method for processing noise points, an image forming apparatus, an electronic device, and a storage medium, which helps to solve the problem that in the prior art, when removing noise points, the same processing method is adopted for all noise points, which may cause some noise points to be unable to be effectively removed, affecting the image quality, thus affecting the user's perception, and even possibly causing serious information interference and misinterpretation.
[0007] In a first aspect, an embodiment of this application provides a method for processing noise points, including: Converting the color of the scanned image to a color space for analyzing color features, and obtaining the scanned image converted to the color space for analyzing color features; If any color feature value corresponding to any pixel point in the scanned image of the color space for analyzing color features is abnormal, determine the color abnormality type corresponding to any pixel point according to the abnormality of the color feature value corresponding to any pixel point. Adjust the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type.
[0008] In the embodiment of the present application, according to the color abnormality type of the pixel point with abnormality, the corresponding color adjustment method is adopted for this color abnormality type. It can be understood that the pixel point with abnormality is a noise point. Since the reasons for generating noise points are different, the color abnormality types corresponding to the noise points are also different. Adopting different image processing methods for different color abnormality types can remove various types of noise points to the greatest extent, thereby ensuring the image quality and the user's viewing experience.
[0009] In a possible implementation manner, the color space for analyzing color features is the Lab color space.
[0010] In the embodiment of the present application, the color space for analyzing color features can be the Lab color space. The Lab color space is designed based on human visual perception and can accurately represent all color ranges that humans can perceive. That is to say, through the Lab color space, the colors of all pixel points can be accurately represented, thereby ensuring the accuracy of color correction. Finally, the noise points in the image presented on the imaging medium can be better processed, avoiding the influence of noise points on the image quality and improving the user experience.
[0011] In a possible implementation manner, before the step of if any color feature value corresponding to any pixel point in the scanned image of the color space for analyzing color features is abnormal, determine the color abnormality type corresponding to any pixel point according to the abnormal color feature value corresponding to any pixel point, it further includes: Obtain the average values of multiple color features corresponding to all pixel points in the scanned image; Determine whether the color feature value corresponding to any pixel point in the scanned image matches the corresponding average value of the color feature; If the color feature value corresponding to any pixel point in the scanned image does not match the corresponding average value of the color feature, the color feature value corresponding to any pixel point is abnormal.
[0012] In the embodiments of the present application, by comparing the color feature value corresponding to each pixel point in the scanned image with the corresponding average color feature, it is determined whether there is an abnormality in the color feature value corresponding to each pixel point. It can be understood that by separately verifying the multiple color feature values corresponding to each pixel point, various different abnormal pixel points can be obtained according to different color feature value abnormalities, so as to perform different processing on different abnormal types, so that different noise points can be correspondingly processed, making the quality of the portrait finally presented on the imaging medium more in line with the user experience.
[0013] In a possible implementation manner, adjusting the abnormal color feature corresponding to any one of the pixel points according to the preset processing method corresponding to the color abnormality type includes: If any one of the pixel points is a non-edge pixel point, then adjust the abnormal color feature corresponding to any one of the pixel points according to the preset processing method corresponding to the color abnormality type; If any one of the pixel points is an edge pixel point, then adjust the abnormal color feature corresponding to any one of the pixel points according to the preset processing method corresponding to the color abnormality type and the preset adjustment range, where the preset adjustment range represents the adjustment range of the abnormal color feature.
[0014] In the embodiments of the present application, edge pixel points and non-edge pixel points are processed in different ways. It can be understood that adopting a special processing strategy for edge pixel points and avoiding using the same processing strategy as non-edge pixels can better process edge pixels, making the final edge effect conform to the user's expectation of the portrait effect presented on the paper.
[0015] In a possible implementation manner, the preset adjustment range for brightness adjustment is ±10%, the preset adjustment range for hue adjustment is ±15°, and the preset adjustment range for saturation adjustment is ±20%.
[0016] In the embodiments of the present application, the preset adjustment range of brightness is set to ±10%, the preset adjustment range of hue adjustment is set to ±15°, and the preset adjustment range of saturation adjustment is limited to ±20%, so as to remove the influence of noise points while maximizing the retention of the sharpness and sharpness of the edge, making the edge effect of the portrait finally presented on the imaging medium not blurred or distorted, and conforming to the user's expectation of the portrait.
[0017] In a possible implementation manner, the color feature values include: brightness, hue, and saturation; the color abnormality types include at least one of: brightness abnormality, hue abnormality, saturation abnormality, brightness abnormality and hue abnormality, brightness abnormality and saturation abnormality, hue abnormality and saturation abnormality.
[0018] In the embodiments of the present application, the color feature values include brightness, hue, and saturation. It can be understood that these three feature values can almost comprehensively describe the features of a pixel, so that the method provided by the present application can handle various abnormal situations.
[0019] In a possible implementation manner, adjusting the abnormal color feature corresponding to any one of the pixel points according to the preset processing method corresponding to the color abnormality type includes: If the color abnormality type corresponding to any one of the pixel points is brightness abnormality, then adjust the brightness corresponding to any one of the pixel points according to the weighted average brightness of other pixel points within a first preset range around any one of the pixel points; And / or, if the color abnormality type corresponding to any one of the pixel points is hue abnormality, then convert any one of the pixel points to the HSL color space, and adjust the hue corresponding to any one of the pixel points according to the difference between the hue of any one of the pixel points and the hues of other pixel points within a second preset range around it; And / or, if the color abnormality type corresponding to any one of the pixel points is saturation abnormality, then perform histogram equalization on the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image, where the target area is the area corresponding to the third preset range where any one of the pixel points is located; And / or, if the color abnormality type corresponding to any one of the pixel points is brightness abnormality and hue abnormality, then first adjust the brightness corresponding to any one of the pixel points according to the weighted average brightness of other pixel points within a first preset range around any one of the pixel points, then convert any one of the pixel points to the HSL color space, and adjust the hue corresponding to any one of the pixel points according to the difference between the hue of any one of the pixel points and the hues of other pixel points within a second preset range around it; And / or, if the color abnormality type corresponding to any one of the pixel points is brightness abnormality and saturation abnormality, then first adjust the brightness corresponding to any one of the pixel points according to the weighted average brightness of other pixel points within a first preset range around any one of the pixel points, and then perform histogram equalization on the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image, where the target area is the area corresponding to the third preset range where any one of the pixel points is located; And / or, if the color abnormality type corresponding to any one of the pixel points is hue abnormality and saturation abnormality, then first convert any one of the pixel points to the HSL color space, and adjust the hue corresponding to any one of the pixel points according to the difference between the hue of any one of the pixel points and the hues of other pixel points within a second preset range around it, and then perform histogram equalization on the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image, where the target area is the area corresponding to the third preset range where any one of the pixel points is located.
[0020] In the embodiment of the present application, for a pixel point with abnormal brightness, the brightness corresponding to the abnormal pixel point is adjusted according to the weighted average brightness of other pixel points within a first preset range around the abnormal pixel point. It can be understood that using the weighted average brightness of other pixel points within a certain range around the abnormal pixel point to adjust the brightness of the abnormal pixel point can not only ensure that the adjusted brightness of the abnormal pixel point is similar to that of other pixel points, but also ensure that the brightness of the pixel point is adjusted appropriately, avoiding a stepped difference in brightness from the surrounding other pixel points, and ultimately improving the removal effect of the bright spots with abnormal brightness in the image presented on the imaging medium. In addition, using the hue of other pixel points within a certain range around the abnormal pixel point to adjust the hue of the abnormal pixel point can not only ensure that the adjusted hue of the abnormal pixel point is similar to that of other pixel points, but also ensure that the hue of the pixel point is adjusted appropriately, avoiding a stepped difference in hue from the surrounding other pixel points, and ultimately improving the removal effect of the bright spots with abnormal hue in the image presented on the imaging medium. Moreover, performing equalization processing on the saturation histogram of the target area can ensure that the saturation of the target area is relatively balanced and has a small difference from the saturation of other areas in the entire scanned image, and ultimately improve the removal effect of the bright spots with abnormal saturation in the image presented on the imaging medium.
[0021] And if a pixel point has multiple types of color abnormalities, for example, a pixel point is of the brightness abnormality and saturation abnormality types, then according to the priority of the color abnormality types and multiple preset processing methods corresponding to the multiple types of color abnormalities, the multiple abnormal color characteristics corresponding to the abnormal pixel point are adjusted in sequence, so that the final presented noise processing effect meets the user's expectations, avoiding the situation where only one type of abnormality is processed when a certain noise has multiple types of color abnormalities, resulting in the final presented effect still not meeting the user's expectations for the image presented on the imaging medium.
[0022] In a second aspect, an image forming apparatus provided by an embodiment of the present application includes: A color conversion module, configured to convert the color of the scanned image to a color space for analyzing color characteristics, and obtain the scanned image converted to the color space for analyzing color characteristics; An abnormality determination module, configured to, if any color characteristic value corresponding to any pixel point in the scanned image in the color space for analyzing color characteristics is abnormal, determine the color abnormality type corresponding to any pixel point according to the abnormal color characteristic value corresponding to any pixel point; A color characteristic value adjustment module, configured to adjust the abnormal color characteristic corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type.
[0023] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor; a memory; and a computer program, where the computer program is stored in the memory, and the computer program includes instructions that, when executed by the processor, cause the electronic device to execute the method according to any one of the first aspect.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, it controls the device where the computer-readable storage medium is located to execute the method according to any one of the first aspect.
[0025] It can be understood that the image forming device provided in the second aspect, the electronic device provided in the third aspect, and the computer-readable storage medium provided in the fourth aspect are used to execute the method provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0027] Figure 1 is a schematic flowchart of a method for processing noise points provided by an embodiment of the present application; Figure 2 is a schematic diagram of the arrangement of pixel points within a first preset range provided by an embodiment of the present application; Figure 3 is a schematic flowchart of another method for processing noise points provided by an embodiment of the present application; Figure 4 is a schematic flowchart of another method for processing noise points provided by an embodiment of the present application; Figure 5 is a schematic structural diagram of an image forming device provided by an embodiment of the present application; Figure 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] To better understand the technical solutions of the present application, the embodiments of the present application will be described in detail below with reference to the drawings.
[0029] It should be clear that the described embodiments are only a part of the embodiments of this application, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application.
[0030] The terms used in the embodiments of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms "a", "the", and "said" used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0031] It should be understood that the term "and / or" used herein is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.
[0032] An image forming apparatus is a device that forms an image on an imaging medium through an imaging principle, such as a printer, a copier, a fax machine, a multifunctional image production and copying device, an electrophotographic device, and any other similar devices. After the terminal device transmits image data to the image forming apparatus, a series of complex operations such as signal conversion and laser imaging are performed by the image forming apparatus, and finally, it is presented on the imaging medium. However, due to the influence of various factors, there may be noise points in the image presented on the imaging medium, that is, points that the user does not want to appear on the imaging medium.
[0033] In the related art, general filtering algorithms are usually adopted, such as mean filtering or median filtering, etc. These methods can reduce noise points to a certain extent.
[0034] However, when the filtering algorithms in the related art remove noise points, they use the same processing method for all noise points, which may cause some noise points to not be effectively removed, affecting the quality of the portraits printed or copied on paper, thus affecting the user's perception, and may even cause serious information interference and misinterpretation.
[0035] In view of the above problems, the embodiments of this application provide a method for processing noise points. According to the color anomaly type of the pixel points with anomalies, a corresponding color adjustment method is adopted for this color anomaly type. It can be understood that the pixel points with anomalies are the noise points. Since the reasons for generating the noise points are different, the corresponding color anomaly types of the noise points are also different. Adopting different image processing methods for different color anomaly types can remove various types of noise points to the greatest extent, thereby ensuring the quality of the portraits printed or copied on paper and the user's perception. Specifically, it will be described in detail below in combination with the drawings and specific embodiments.
[0036] See Figure 1 , which is a schematic flowchart of a method for processing noise points provided by an embodiment of the present application. As Figure 1 shown, it mainly includes the following steps.
[0037] Step S101: Convert the color of the scanned image to a color space for analyzing color features, and obtain the scanned image converted to the color space for analyzing color features.
[0038] Specifically, after receiving the scanned image, the image forming device first performs color space conversion on the image, converting the commonly used RGB color space to a color space for analyzing color features.
[0039] In a possible implementation, the color space for analyzing color features is the Lab color space (i.e., CIELab color space). The Lab color space is more conducive to analyzing color features. Among them, CIELab is a color system of the International Commission on Illumination (CIE). The color representation system based on CIELab means based on this color system. Basically, it is used to determine the numerical information of a certain color. The Lab mode is a color mode announced by the CIE in 1976 and is a color mode determined by the CIE organization that theoretically includes all colors visible to the human eye. The CIELab color space can represent color differences more uniformly, so as to accurately extract the brightness (L), red-green chromaticity (a), and yellow-blue chromaticity (b) features of the color. By analyzing the color features (Lab) of each pixel point, a color feature matrix of the image is established.
[0040] Step S102: If any color feature value corresponding to any pixel point in the scanned image in the color space for analyzing color features is abnormal, determine the color abnormality type corresponding to any pixel point according to the abnormality of the color feature value corresponding to any pixel point.
[0041] Specifically, when the image forming device determines that there is an abnormality in any color feature value corresponding to a pixel point in the scanned image, the image forming device determines the color abnormality type corresponding to the abnormal pixel point according to the abnormality of the color feature value corresponding to the abnormal pixel point.
[0042] In a possible implementation, using statistical analysis methods, calculate the distribution of each color feature value in the entire color space in the scanned image. By setting a color distribution threshold, filter out the pixel points whose color feature values deviate from the normal distribution range. The colors corresponding to these pixel points are the possible noise colors.
[0043] In a possible implementation, the color distribution threshold is a preset fixed value. However, setting a fixed value in advance may lead to poor flexibility of the solution. Therefore, in the embodiments of the present application, the color distribution threshold is the average value of the color features corresponding to all pixel points in the scanned image.
[0044] Specifically, obtain the average values of multiple color features corresponding to all pixel points in the scanned image; determine whether the color feature value corresponding to any pixel point in the scanned image matches the corresponding average value of the color feature; if the color feature value corresponding to any pixel point in the scanned image does not match the corresponding average value of the color feature, then the color feature value corresponding to the pixel point is abnormal.
[0045] Exemplarily, obtain the average brightness value corresponding to all pixel points in the scanned image, and determine whether there is any pixel point in the scanned image whose brightness value does not match the average brightness value. If the brightness value corresponding to any pixel point does not match the average brightness value, then the color feature value corresponding to the pixel point is abnormal.
[0046] It can be understood that by verifying the multiple color feature values corresponding to each pixel point respectively, multiple different abnormal pixel points can be obtained according to different color feature value abnormalities, so as to perform different treatments on different abnormal types.
[0047] In a possible implementation, if the color feature value corresponding to a certain pixel point differs from the average value of the color feature by more than a certain threshold, then the pixel point is included in the candidate set of miscellaneous point colors. That is to say, all pixel points with color feature abnormalities are placed in the same set, so as to perform corresponding processing on the abnormal pixel points subsequently.
[0048] It can be understood that in the candidate set of miscellaneous point colors, the color abnormality types corresponding to each pixel point are not necessarily the same. Exemplarily, the color abnormality type corresponding to the first pixel point may be brightness abnormality, the color abnormality type corresponding to the second pixel point may be saturation abnormality, the color abnormality type corresponding to the third pixel point may also be saturation abnormality, the color abnormality type corresponding to the fourth pixel point may be hue abnormality, the color abnormality type corresponding to the fifth pixel point may be brightness abnormality, the color abnormality type corresponding to the sixth pixel point may be hue abnormality and saturation abnormality, the color abnormality type corresponding to the seventh pixel point may be brightness abnormality and saturation abnormality, and the color abnormality type corresponding to the eighth pixel point may be brightness abnormality and hue abnormality. To completely remove these pixel points with different color abnormality types, it is necessary to classify these pixel points with color feature abnormalities, so as to adopt different treatment methods for different color abnormality types.
[0049] In a possible implementation, the pixel points in the color candidate set are classified by a Convolutional Neural Network (CNN). Specifically, the color feature matrix of the scanned image to be processed is input into the trained model. Through the matching and classification of features, the model can further accurately identify the color anomaly types corresponding to the abnormal pixel points, such as brightness anomaly type, hue anomaly type, saturation anomaly type, brightness and hue anomaly type, brightness and saturation anomaly type, hue and saturation anomaly type, etc.
[0050] In a possible implementation, the method for training the model is as follows: The staff in charge of the CNN pre-collects a large number of image samples with abnormal color features and manually annotates the miscellaneous colors in these samples. These labeled samples are used to train the machine learning model so that the model can learn the feature patterns of abnormal color features.
[0051] Step S103: Adjust the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color anomaly type.
[0052] Specifically, after the image forming device determines the color anomaly type of the abnormal pixel point, it determines the preset processing method according to the abnormal color feature value of the abnormal pixel point, and adjusts the abnormal color feature corresponding to the abnormal pixel point according to the preset processing method. Among them, the abnormal color feature is the color feature with an anomaly among all the color features corresponding to the abnormal pixel point, and the preset processing method is the method used to correct this abnormal color feature.
[0053] In a possible implementation, the color feature values include brightness, hue, and saturation, and the color anomaly types include at least one of brightness anomaly, hue anomaly, saturation anomaly, brightness and hue anomaly, brightness and saturation anomaly, and hue and saturation anomaly.
[0054] In a possible implementation, if the color anomaly type corresponding to any pixel point is brightness anomaly, then the brightness corresponding to the abnormal pixel point is adjusted according to the weighted average brightness of other pixel points within the first preset range around the abnormal pixel point. Among them, adjusting the brightness corresponding to the abnormal pixel point according to the weighted average brightness of other pixel points within the first preset range around the abnormal pixel point is the preset processing method mentioned above, and the brightness corresponding to the abnormal pixel point is the abnormal color feature mentioned above.
[0055] In a possible implementation, the first preset range is a 5×5 neighborhood window centered on the abnormal pixel point. Of course, those skilled in the art can set the first preset range to any range according to actual needs, and the embodiments of the present application do not make specific limitations on this.
[0056] Exemplarily, refer to Figure 2 , which is a schematic diagram of the pixel arrangement within a first preset range provided by an embodiment of the present application. As Figure 2 shown, there are 25 pixels within the first preset range, where 1 is an abnormal pixel and the abnormal pixel is at the center, and the other 24 are normal pixels.
[0057] Among them, the luminance weighted average is distributed according to the distance between the normal pixels and the abnormal pixel. The closer the distance, the greater the weight. It can be understood that the normal pixels with a smaller distance from the abnormal pixel have a greater weight, which can ensure the matching between the abnormal pixel and other surrounding normal pixels, thus ensuring the user's visual experience.
[0058] In a possible implementation manner, if the color abnormality type corresponding to any pixel is hue abnormality, then according to the difference between the hue of the abnormal pixel and the hues of other pixels within a second preset range around it, the hue corresponding to the abnormal pixel is adjusted. Among them, adjusting the hue corresponding to the abnormal pixel according to the difference between the hue of the abnormal pixel and the hues of other pixels within a second preset range around it is the preset processing method mentioned above, and the hue corresponding to the abnormal pixel is the abnormal color feature mentioned above.
[0059] In the embodiment of the present application, the second preset range may be the same as or different from the first preset range, and those skilled in the art can adjust the range value of the second preset range according to actual needs.
[0060] In addition, in order to better adjust the hue of the abnormal pixel, the color of the abnormal pixel is converted from the CIELab color space to the HSL (Hue, Saturation, Lightness) color space in polar coordinate form, and the hue is adjusted in the HSL color space. According to the hue difference between the abnormal pixel hue and the hues of surrounding normal pixels, the hue angle to be adjusted is calculated, and then the hue value of the abnormal pixel is rotated accordingly to make the hue of the abnormal pixel consistent with the surrounding hues. After the adjustment is completed, the color is then converted back to the CIELab color space to ensure compatibility with the subsequent printing processing flow.
[0061] In a possible implementation manner, if the color abnormality type corresponding to the abnormal pixel is saturation abnormality, then according to the saturation mean and standard deviation of the scanned image, histogram equalization processing is performed on the saturation histogram of the target area, where the target area is the area corresponding to the third preset range where the abnormal pixel is located. Among them, performing histogram equalization processing on the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image is the preset processing method mentioned above, and the saturation histogram of the target area where the abnormal pixel is located is the abnormal color feature mentioned above.
[0062] That is, according to the average value and standard deviation of the saturation of the entire scanned image, the saturation histogram of the target area is adjusted to have a smaller difference from the average value and standard deviation of the saturation of the entire scanned image, and the saturation of the abnormal pixel points can also reach a reasonable distribution within the local area. In this way, the saturation of the abnormal pixel points is matched with the surrounding environment, while ensuring the natural color transition of the image.
[0063] In the embodiments of the present application, the third preset range, the second preset range, and the first preset range may be the same or different, and those skilled in the art can adjust the range value of the third preset range according to actual needs.
[0064] In summary, adopting different image processing methods for different types of color abnormalities can remove various types of noise to the greatest extent, thereby ensuring the quality of the portraits printed and copied on paper and the user's visual experience.
[0065] In addition, as described above, the abnormal pixel points in the color candidate set are classified by CNN so as to adopt different adjustment methods for the pixel points of different types of color abnormalities. That is to say, not every abnormal pixel point is adjusted in multiple ways, but targeted adjustments are made according to the abnormal conditions of the abnormal pixel points.
[0066] In a possible implementation manner, the abnormal pixel points are classified by CNN, and the types of color abnormalities include at least one of brightness abnormality, hue abnormality, saturation abnormality, brightness abnormality and hue abnormality, brightness abnormality and saturation abnormality, and hue abnormality and saturation abnormality.
[0067] Exemplarily, if the first pixel point has a brightness abnormality, only the brightness of the first pixel point is adjusted; if the second pixel point has a saturation abnormality, the saturation of the second pixel point is adjusted; if the third pixel point has both brightness and saturation abnormalities, both the brightness and saturation of the third pixel point are adjusted.
[0068] In practical applications, each abnormal pixel point may have more than one abnormal color feature value. For these pixel points with multiple color feature abnormalities, if only one abnormal color feature of these pixel points is adjusted while ignoring other abnormal feature values of the pixel points, it may cause the color of the portraits printed and copied on paper to still be abnormal, affecting the user's visual experience.
[0069] Therefore, in the embodiments of the present application, if a pixel point has multiple types of color abnormalities, for example, a pixel point is of the brightness abnormality and saturation abnormality type, then according to the priority of the types of color abnormalities and multiple preset processing methods corresponding to the multiple types of color abnormalities, the multiple abnormal color features corresponding to the abnormal pixel point are adjusted in sequence.
[0070] Among them, the priority of color anomaly types is the processing order of color anomaly types preset according to the influence degree of color anomaly types on the portraits printed and copied on paper and the influence degree among multiple color features. Exemplarily, compared with saturation anomaly, brightness anomaly has a greater overall impact on the portraits printed and copied on paper because brightness affects the contrast and detail controllability of the portraits printed and copied on paper; and being too bright or too dark will also obscure the saturation information, that is to say, saturation depends on brightness and the saturation needs to be adjusted after adjusting the brightness. Therefore, when the color anomaly type corresponding to a pixel point is brightness anomaly and saturation anomaly, the brightness anomaly of this pixel point is processed first, and then the saturation anomaly is processed. That is, first, the brightness corresponding to this pixel point is adjusted according to the weighted average brightness of other pixel points within the first preset range around this pixel point, and then, according to the saturation mean and standard deviation of the scanned image, the saturation histogram of the target area is equalized. The target area is the area corresponding to the third preset range where this pixel point is located. According to the priority of color anomaly types and multiple preset processing methods corresponding to multiple color anomaly types, multiple abnormal color features corresponding to this abnormal pixel point are adjusted in sequence, so that the final presented effect of moire processing meets the user's expectations.
[0071] Similarly, if the color anomaly type corresponding to any pixel point is brightness anomaly and hue anomaly, the brightness anomaly of this pixel point is processed first, and then the hue anomaly is processed. That is, first, the brightness corresponding to this pixel point is adjusted according to the weighted average brightness of other pixel points within the first preset range around this pixel point, and then this pixel point is converted to the HSL color space, and the hue corresponding to this pixel point is adjusted according to the difference between the hue of this pixel point and the hues of other pixel points within the second preset range around it.
[0072] In addition, if the color anomaly type corresponding to any pixel point is hue anomaly and saturation anomaly, the hue anomaly of this pixel point is processed first, and then the saturation anomaly is processed. That is, first, this pixel point is converted to the HSL color space, and the hue corresponding to this pixel point is adjusted according to the difference between the hue of this pixel point and the hues of other pixel points within the second preset range around it, and then, according to the saturation mean and standard deviation of the scanned image, the saturation histogram of the target area is equalized. The target area is the area corresponding to the third preset range where this pixel point is located.
[0073] In practical applications, the edges of an image usually have higher clarity and sharpness. If the same method is used to adjust edge pixel points and non-edge pixel points, it may affect the sharpness of the image edge.
[0074] Therefore, in the embodiments of the present application, it is determined whether an abnormal pixel is an edge pixel. If the abnormal pixel is a non-edge pixel, the abnormal color feature corresponding to the abnormal pixel is adjusted according to the preset processing method corresponding to the color abnormality type; if the abnormal pixel is an edge pixel, the abnormal color feature corresponding to the abnormal pixel is adjusted according to the preset processing method corresponding to the color abnormality type and the preset adjustment range.
[0075] Among them, the preset adjustment range can be understood as the preset limit range for adjusting brightness, hue, and saturation, which is to avoid excessive adjustment of edge pixels, so as to retain the clarity and sharpness of the edge to the greatest extent while removing the influence of noise points.
[0076] Exemplarily, the preset adjustment range for brightness adjustment is generally ±10% to ±30% (relative to the original value) to avoid loss of details caused by overexposure or underexposure. For example, in the adjustment of a certain edge pixel, if the brightness of the pixel itself is 50% and the preset adjustment range is ±30%, the brightness of the pixel after adjustment is limited to 20% to 80%. That is to say, even if it is calculated according to the weighted average brightness of other pixels within the first preset range around the abnormal edge pixel that the brightness of this pixel should be adjusted to 90%, due to the setting of the preset adjustment range, the brightness of this abnormal edge pixel can only be adjusted to a maximum of 80%; the adjustment range limit for hue adjustment is generally controlled within ±15° to ±45° (relative to the original value) ("°" refers to the angle of hue) to avoid color distortion. Exemplarily, if the original hue of a certain edge pixel is 60° and the preset adjustment range is set to ±15°, after adjustment, the hue range of this edge pixel is 45° to 75°. That is to say, even if it is calculated according to the difference between the hue of the abnormal pixel and the hues of other pixels within the second preset range around it that the hue of this edge pixel should be adjusted to 80°, due to the setting of the preset adjustment range, the hue can only be adjusted to 75°; the adjustment range limit for saturation adjustment is generally controlled within ±20% to ±50% (relative to the original value) to avoid unnatural images. For example, the original saturation of a certain abnormal edge pixel is 50% and the preset adjustment range is set to ±20%, then the saturation range of this abnormal edge pixel after adjustment is 30% to 70%. That is to say, even if it is calculated by equalizing the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image that the saturation of this abnormal edge pixel should be adjusted to 80%, due to the limitation of the preset adjustment range, the saturation of this abnormal edge pixel can only be adjusted to 70%. It should be noted that in practical applications, those skilled in the art can set the preset adjustment range to any value according to actual needs, and the embodiments of the present application do not make specific limitations on this.
[0077] In a possible implementation, the Sobel edge detection algorithm is introduced to mark and protect the edge information of the image, so as to determine which pixel points are edge pixel points. The Sobel operator is an important processing method in the field of computer vision. It is mainly used to obtain the first-order gradient of a digital image, and its common applications and physical meanings are edge detection. The Sobel operator calculates the weighted differences of the gray values of the upper, lower, left, and right four neighborhoods of each pixel in the image, and reaches an extreme value at the edge to detect the edge.
[0078] In addition, for the processed scanned image, image enhancement techniques (such as the histogram matching algorithm) are used to enhance the details of the processed scanned image. By increasing the weight of the high-frequency components, the detail information of the image is highlighted, further improving the clarity and visual effect of the image. After image enhancement, an image sharpening algorithm (such as the Laplacian sharpening algorithm) is used to sharpen the image, enhancing the edges and textures of the objects in the image, making the printed image clearer and more vivid, and finally obtaining the output image.
[0079] Among them, histogram matching, also known as histogram specification, is an image enhancement method that transforms the histogram of an image into a specified shape. That is, the histogram of a certain image or a certain area is matched to another image, so that the tones of the two images are consistent. It can be performed between the histograms of single-band images or simultaneously on multi-band images. Laplacian sharpening is a commonly used image processing technique, mainly used to enhance the details and edges of the image, making the image clearer.
[0080] Finally, according to the toner concentration in the image forming device and the sensitivity of the photosensitive drum, the brightness and contrast of the image are optimized to improve the layering and clarity of the output image, and image formation is performed on the processed output image.
[0081] Corresponding to the above embodiments, the present application also provides another method for processing noise points.
[0082] See Figure 3 , which is a schematic flowchart of another method for processing noise points provided by the embodiments of the present application. As Figure 3 shown, it mainly includes the following steps.
[0083] Step S301: Import the scanned image A to be printed.
[0084] Step S302: Convert the color space from RGB to CIELab.
[0085] Step S303: Statistically analyze the mean distribution of color features.
[0086] Specifically, the color feature means include but are not limited to the brightness mean, the hue mean, and the saturation mean.
[0087] Step S304: Determine whether the color feature value deviates from the threshold value.
[0088] That is, determine whether the color feature value corresponding to any pixel point in the scanned image matches the corresponding average color feature value. If so, execute Step S305; if not, execute Step S306.
[0089] Step S305: Incorporate into the color candidate set.
[0090] Step S306: Default processing.
[0091] Step S307: The convolutional neural network identifies the type of color anomaly.
[0092] Step S308: Targeted processing.
[0093] The specific content involved in the embodiments of the present application can be referred to the descriptions in the above Figure 1 and Figure 2 illustrated embodiments. For the sake of brevity of expression, it will not be elaborated here.
[0094] Corresponding to the above targeted processing, the embodiments of the present application also provide another method for processing noise points.
[0095] See Figure 4 , which is a schematic flowchart of another method for processing noise points provided by the embodiments of the present application. As Figure 4 shown, it mainly includes the following steps.
[0096] Step S307: The convolutional neural network identifies the type of color anomaly.
[0097] Step S401: Determine brightness anomaly.
[0098] Step S4011: Adaptive weighted average algorithm.
[0099] That is, as described above, calculate the weighted average brightness value corresponding to other pixel points within the first preset range around the abnormal pixel point.
[0100] Step S4012: Brightness correction.
[0101] Step S4013: Edge detection and protection.
[0102] Step S402: Determine hue deviation.
[0103] Step S4021: Color space conversion from CIELab to HSL.
[0104] Step S4022: Hue adjustment.
[0105] Step S4023: Color space conversion from HSL to CIELab.
[0106] Step S4024: Edge detection and protection.
[0107] Step S403: Determine saturation anomaly.
[0108] Step S4031: Saturation correction.
[0109] Step S4032: Edge detection and protection.
[0110] Step S404: Determine brightness anomaly and hue anomaly.
[0111] Step S4041: Process brightness anomaly.
[0112] Step S4042: Process hue anomaly.
[0113] Step S4043: Edge detection and protection.
[0114] Step S405: Determine brightness anomaly and saturation anomaly.
[0115] Step S4051: Process brightness anomaly.
[0116] Step S4052: Process saturation anomaly.
[0117] Step S4053: Edge detection and protection.
[0118] Step S406: Determine hue anomaly and saturation anomaly.
[0119] Step S4061: Process hue anomaly.
[0120] Step S4062: Process saturation anomaly.
[0121] Step S4063: Edge detection and protection.
[0122] Step S407: Image B after removing noise points.
[0123] Among them, the noise points are abnormal pixel points.
[0124] Step S408: Image enhancement and sharpening.
[0125] Step S409: Output image C.
[0126] Step S410: Print and form an image.
[0127] The specific content involved in the embodiments of this application can be referred to the description in the above Figures 1 to 3 illustrated embodiments. For the sake of brevity of expression, it will not be elaborated here.
[0128] In a possible implementation manner,Figure 3 , Figure 4 The embodiments shown may be executed by an image forming apparatus or by other terminal devices communicatively connected to the image forming apparatus. Specifically, if Figure 3 , Figure 4 the embodiments shown are executed by a terminal device, then before step S301, it further includes: the terminal device receives the original image obtained by scanning sent by the image forming apparatus, and after the terminal device completes Figure 3 , Figure 4 processing, the terminal device sends the obtained processed image to the image forming apparatus, and then the image forming apparatus executes an image forming job according to the received processed image.
[0129] Corresponding to the above embodiments, the present application also provides an image forming apparatus.
[0130] Referring to Figure 5 , which is a schematic structural diagram of an image forming apparatus provided by an embodiment of the present application. As Figure 5 shown, the image forming apparatus may include: a color conversion module 501, an abnormality determination module 502, and a color feature value adjustment module 503. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation to the embodiments of the present application. It may be a bus structure, a star structure, and may also include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0131] Among them, the color conversion module 501 is configured to convert the color of the scanned image to the Lab color space and obtain the scanned image converted to the Lab color space; The abnormality determination module 502 is configured to, if any color feature value corresponding to any pixel point in the scanned image is abnormal, determine the color abnormality type corresponding to any pixel point according to the abnormality of the color feature value corresponding to any pixel point; The color feature value adjustment module 503 is configured to adjust the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type.
[0132] Corresponding to the above embodiments, the present application also provides an electronic device.
[0133] Referring to Figure 6 , which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 6As shown, the electronic device 600 may include: a processor 601, a memory 602, and a communication unit 603. These components communicate via one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present application. It can be a bus structure, a star structure, and may also include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0134] Among them, the communication unit 603 is used to establish a communication channel so that the electronic device can communicate with other devices. It receives user data sent by other devices or sends user data to other devices.
[0135] The processor 601 is the control center of the electronic device. It connects various parts of the entire electronic device through various interfaces and lines. By running or executing software programs, instructions, and / or modules stored in the memory 602, and by calling the data stored in the memory, it executes various functions of the electronic device and / or processes data. The processor may be composed of an integrated circuit (IC). For example, it may be composed of a single packaged IC, or may be composed of multiple packaged ICs with the same or different functions connected together. For example, the processor 601 may only include a central processing unit (CPU). In the embodiments of the present application, the CPU may be a single-core operation core or may include multiple-core operation cores.
[0136] The memory 602 is used to store the execution instructions of the processor 601. The memory 602 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 disc.
[0137] When the execution instructions in the memory 602 are executed by the processor 601, the electronic device 600 is enabled to execute Figure 1 some or all of the steps in the embodiments shown.
[0138] In a specific implementation, an embodiment of the present application further provides a computer storage medium. The computer storage medium can store a program, and when the program is executed, it can include some or all of the steps in the embodiments of the simulation scenario generation method provided by the embodiments of the present application. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), or the like.
[0139] In a specific implementation, an embodiment of the present application further provides a computer program product. The computer program product includes executable instructions. When the executable instructions are executed on a computer, the computer is caused to execute some or all of the steps in the embodiments of the simulation scenario generation method provided by the embodiments of the present application.
[0140] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that there can be three relationships. For example, A and / or B can represent the cases of A existing alone, A and B existing simultaneously, and B existing alone. Where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.
[0141] Those of ordinary skill in the art can realize that the various units and algorithm steps described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraint conditions of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0142] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0143] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0144] For the same or similar parts among the various embodiments in this specification, reference can be made to each other. In particular, for the device embodiments and the terminal embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the descriptions in the method embodiments for the relevant parts.
Claims
1. A method for handling noise points, characterized in that, Including: Converting the color of the scanned image to a color space for analyzing color features, and obtaining the scanned image converted to the color space for analyzing color features; If any color feature value corresponding to any pixel point in the scanned image in the color space for analyzing color features is abnormal, determining the color abnormality type corresponding to any pixel point according to the abnormality of the color feature value corresponding to any pixel point; Adjusting the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type.
2. The method according to claim 1, wherein: The color space for analyzing color features is the Lab color space.
3. The method according to claim 2, wherein Before the step of if any color feature value corresponding to any pixel point in the scanned image in the color space for analyzing color features is abnormal, determining the color abnormality type corresponding to any pixel point according to the abnormal color feature value corresponding to any pixel point, it further includes: Obtaining the average values of multiple color features corresponding to all pixel points in the scanned image; Judging whether the color feature value corresponding to any pixel point in the scanned image matches the corresponding average value of the color features; If the color feature value corresponding to any pixel point in the scanned image does not match the corresponding average value of the color features, the color feature value corresponding to any pixel point is abnormal.
4. The method according to claim 2, characterized in that, The adjusting the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type includes: If any pixel point is a non-edge pixel point, adjusting the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type; If any pixel point is an edge pixel point, adjusting the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type and a preset adjustment range, where the preset adjustment range represents the adjustment range for the abnormal color feature.
5. The method according to claim 4, wherein: The preset adjustment range for brightness adjustment is ±10%, the preset adjustment range for hue adjustment is ±15°, and the preset adjustment range for saturation adjustment is ±20%.
6. The method according to claim 2, wherein The color feature values include: brightness, hue, and saturation; the color abnormality types include at least one of: brightness abnormality, hue abnormality, saturation abnormality, brightness abnormality and hue abnormality, brightness abnormality and saturation abnormality, hue abnormality and saturation abnormality.
7. The method according to claim 6, wherein The adjusting the abnormal color feature corresponding to any pixel point according to the preset processing method corresponding to the color abnormality type includes: If the color abnormality type corresponding to any pixel point is brightness abnormality, adjusting the brightness corresponding to any pixel point according to the weighted average brightness corresponding to other pixel points within a first preset range around any pixel point; And / or, if the color anomaly type corresponding to any one of the pixel points is hue anomaly, convert any one of the pixel points to the HSL color space, and adjust the hue corresponding to any one of the pixel points according to the difference between the hue of any one of the pixel points and the hues of other pixel points within a second preset range around it; And / or, if the color anomaly type corresponding to any one of the pixel points is saturation anomaly, perform histogram equalization on the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image, where the target area is the area corresponding to a third preset range where any one of the pixel points is located; And / or, if the color anomaly type corresponding to any one of the pixel points is brightness anomaly and hue anomaly, first adjust the brightness corresponding to any one of the pixel points according to the weighted average brightness of other pixel points within a first preset range around any one of the pixel points, then convert any one of the pixel points to the HSL color space, and adjust the hue corresponding to any one of the pixel points according to the difference between the hue of any one of the pixel points and the hues of other pixel points within a second preset range around it; And / or, if the color anomaly type corresponding to any one of the pixel points is brightness anomaly and saturation anomaly, first adjust the brightness corresponding to any one of the pixel points according to the weighted average brightness of other pixel points within a first preset range around any one of the pixel points, and then perform histogram equalization on the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image, where the target area is the area corresponding to a third preset range where any one of the pixel points is located; And / or, if the color anomaly type corresponding to any one of the pixel points is hue anomaly and saturation anomaly, first convert any one of the pixel points to the HSL color space, adjust the hue corresponding to any one of the pixel points according to the difference between the hue of any one of the pixel points and the hues of other pixel points within a second preset range around it, and then perform histogram equalization on the saturation histogram of the target area according to the saturation mean and standard deviation of the scanned image, where the target area is the area corresponding to a third preset range where any one of the pixel points is located.
8. An image forming apparatus, characterized in that, Comprising: A color conversion module, configured to convert the color of the scanned image to a color space for analyzing color features, and obtain the scanned image converted to the color space for analyzing color features; An anomaly determination module, configured to, if any color feature value corresponding to any one of the pixel points in the scanned image in the color space for analyzing color features is abnormal, determine the color anomaly type corresponding to any one of the pixel points according to the abnormal color feature value corresponding to any one of the pixel points; A color feature value adjustment module, configured to adjust the abnormal color feature corresponding to any one of the pixel points according to the preset processing method corresponding to the color anomaly type.
9. An electronic device, characterized in that, Comprising: A processor; A memory; And a computer program, where the computer program is stored in the memory, and the computer program includes instructions that, when executed by the processor, cause the electronic device to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein when the program runs, it controls the device where the computer-readable storage medium is located to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Face image highlight removing method and system based on Poisson reconstruction and storage medium thereof
CN113221619A
Image processing method and device, equipment and storage medium
CN114841852A
Image processing method and device, electronic equipment and storage medium
CN116051400A
Cervical digital slice image quality monitoring method and system
CN118172313A
Image processing method and device, electronic equipment and storage medium
CN118429237A