Image print-through removal method, device, equipment and storage medium
By acquiring the test scanned image and determining the target light transmission level, identifying and deleting the image print-through area, the problem of printing-through image caused by excessive light transmittance on the thin paper is solved, and the quality of the scanned image is improved.
Patent Information
- Application Number
- CN202510921008.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-07-03
AI Technical Summary
In the prior art, due to the high light transmittance of the paper, the content on the back may penetrate the paper and form an interfering printed image on the imaging surface, resulting in poor image quality and seriously reducing image availability.
By acquiring the test scan image of the preset area, the target light transmission level is determined based on the test RGB value and the preset RGB value, and the image print-through area in the initial scan image is identified and deleted.
Improves the quality of the scanned image, reduces interference from printed images, and improves image usability.
Smart Images

Figure CN120416405B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image forming technology, and in particular to a method, device, equipment and storage medium for removing image print-through. Background Art
[0002] When an image forming device scans an image, it usually first captures scan data and then transmits the scan data to a related controller to generate a scan image and perform related operations.
[0003] Specifically, the light source of the contact image sensor in the image forming device emits incident light onto the scanning surface of the original to be scanned; when the incident light shines on the scanning surface of the original to be scanned, different light rays are reflected into the sensor according to different patterns on the scanning surface; the reflected light forms a pixel point group at the sensor end, and forms an initial scanned image after image processing.
[0004] However, when scanning or copying thin, double-sided documents, the contact image sensor's light source may penetrate the document due to its high light transmittance. Some of this light is then reflected again by the image on the back side, mixing with the effective reflected light from the front side before entering the sensor. This reflected light from the back side forms a cluster of pixels on the sensor side. After image processing, it aggregates into a see-through image due to the signal superposition effect, resulting in poor overall image quality and severely reducing image usability.
[0005] It should be pointed out that the information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of implication that the information constitutes prior art already known to those skilled in the art. Summary of the Invention
[0006] In view of this, the present application provides a method to solve the problem in the prior art that due to the high light transmittance of paper, the content on the back may penetrate the paper to form an interfering through-print image on the imaging surface, resulting in poor overall image quality and seriously reducing image usability.
[0007] In a first aspect, an embodiment of the present application provides a method for removing image print-through, comprising:
[0008] Acquire a test scan image including a preset area, wherein the preset area is a portion or all of an area of the document to be scanned having a color corresponding to a preset RGB value;
[0009] Determining a target light transmittance level according to the test RGB value and the preset RGB value, wherein the test RGB value is the color of the preset area in the test scan image, and the target light transmittance level is used to represent the light transmittance of the document to be scanned;
[0010] Acquire an initial scanned image corresponding to the original document to be scanned, wherein the initial scanned image is used to represent all scanned data corresponding to the original document to be scanned;
[0011] According to the target light transmittance level, an image print-through area is determined from the initial scanned image, and the print-through image is deleted.
[0012] In an embodiment of the present application, a test scan image including a preset area is first acquired; then, a target light transmittance level is determined based on the test RGB values corresponding to the test scan image and the preset RGB values; finally, based on the target light transmittance level, the image see-through area is determined from the initial scan image, and the see-through image is deleted. Since the transmittance of the scanned originals is different, it may cause the RGB value obtained after scanning a certain area in the scanned original to differ from the actual RGB value of the area. It is understandable that since the preset RGB value and the test RGB value represent the RGB values of the same color area in the scanned original before and after scanning, the target light transmittance level of the scanned original can be determined based on the test RGB value and the preset RGB value, thereby achieving the determination of the image see-through area from the initial scan image and deleting the see-through image, thereby improving the quality of the scanned image to a certain extent.
[0013] In a possible implementation, the test scan image is a scanned image of a local area of the document to be scanned;
[0014] The color corresponding to the preset RGB value is white, and the preset area is a white area.
[0015] In the embodiment of the present application, the test scan image is a scanned image of a local area of the document to be scanned; the color corresponding to the preset RGB values is white, and the preset area is a white area. It can be understood that using the test scan image as a scanned image of a local area of the document to be scanned can reduce the time required to determine the light transmittance level and improve operational efficiency. In actual applications, the vast majority of documents to be scanned contain white areas, which are relatively continuous and large in area. Therefore, selecting the white area as the preset area and the color corresponding to the preset RGB values as white facilitates the acquisition of the test scan image, facilitates the determination of the target light transmittance level, and ultimately improves the quality of the scanned image.
[0016] In a possible implementation, determining the image print-through area from the initial scanned image according to the target light transmittance level includes:
[0017] determining the paper type of the document to be scanned according to the size of the initial scanned image, the size of the document to be scanned, and a preset difference threshold;
[0018] Determining whether the target light transmittance level matches the paper type;
[0019] When the target light transmittance level matches the paper type, an image show-through area is determined from the initial scanned image according to the target light transmittance level.
[0020] In the embodiment of the present application, the paper type of the document to be scanned is first determined based on the size of the initial scanned image, the size of the document to be scanned, and a preset difference threshold. A determination is then made as to whether the target transmittance level matches the paper type. Finally, if the target transmittance level matches the paper type, the image print-through area is determined from the initial scanned image based on the target transmittance level. It is understood that after determining the target transmittance level, a determination is further made as to whether the target transmittance level matches the paper type, and furthermore, the accuracy of the determined target transmittance level is determined. This further ensures the accuracy of the target transmittance level in special circumstances, thereby improving the quality of the scanned image.
[0021] In a possible implementation, the method further includes:
[0022] When the target light transmittance level does not match the paper type, a test scan image including a preset area is reacquired to re-determine the target light transmittance level.
[0023] In an embodiment of the present application, when the target light transmittance level does not match the paper type, a test scan image including a preset area is reacquired to redetermine the target light transmittance level, thereby ensuring that an accurate target light transmittance level is selected to ensure the quality of the scanned image.
[0024] In a possible implementation, determining the paper type of the document to be scanned based on the size of the initial scanned image, the size of the document to be scanned, and a preset difference threshold includes:
[0025] When the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is greater than or equal to a preset difference threshold, determining that the paper type of the document to be scanned is a first paper type;
[0026] When the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is less than a preset difference threshold, determining that the paper type of the document to be scanned belongs to the second paper type;
[0027] The light transmittance corresponding to the first paper type is smaller than the light transmittance corresponding to the second paper type.
[0028] In an embodiment of the present application, when the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is greater than or equal to a preset difference threshold, the paper type of the document to be scanned is determined to be a first paper type; when the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is less than the preset difference threshold, the paper type of the document to be scanned is determined to be a second paper type. It is understood that the lower the transmittance and the thicker the paper, the greater the difference between the width / length of the initial scanned image and the width / length of the document to be scanned. Based on this principle, a corresponding preset difference threshold is set, and then by judging the relationship between the difference between the width / length of the initial scanned image and the width / length of the document to be scanned and the preset difference threshold, the paper type of the document to be scanned can be accurately and quickly determined, thereby ensuring the selection of an accurate target transmittance level to ensure the quality of the scanned image.
[0029] In a possible implementation, determining the image print-through area from the initial scanned image according to the target light transmittance level includes:
[0030] determining, according to the target light transmittance level, a target grayscale value interval of the telescopic image corresponding to the target light transmittance level;
[0031] Acquire a target pixel point whose grayscale value is within the target grayscale value range in the initial scanned image;
[0032] The area corresponding to the target pixel point is determined as the image print-through area.
[0033] In the embodiment of the present application, a target grayscale value range for the see-through image corresponding to the target transmittance level is determined based on the target transmittance level; target pixels within the target grayscale value range are obtained from the initial scanned image; and the area corresponding to the target pixels is determined as the see-through area. It can be understood that by using the target grayscale value range for the see-through image corresponding to the target transmittance level, the see-through area in the initial scanned image can be directly and accurately determined, facilitating the removal of the see-through image and, to a certain extent, improving the quality of the scanned image.
[0034] In a possible implementation, the image print-through area includes no less than a preset number of adjacent target pixel points with the same grayscale value.
[0035] In an embodiment of the present application, the determined image print-through area includes no less than a preset number of adjacent target pixel points of the same grayscale value, which improves the processing speed of the initial scanned image while ensuring the quality of the scanned image, thereby improving the user experience.
[0036] In a possible implementation, deleting the through-print image includes:
[0037] Outputting position prompt information of the through-print image;
[0038] In response to a deletion instruction, the offset image is deleted.
[0039] In this embodiment of the present application, after the image see-through area is determined, the location of the see-through image is first output; then, in response to a delete instruction, the see-through image is deleted. This further enhances the user's ability to determine the see-through area, ensuring that the see-through image that is ultimately deleted is the image that is seen through from the back of the document being scanned, thereby improving the quality of the scanned image to a certain extent.
[0040] In a second aspect, an embodiment of the present application provides an image print-through removal device, comprising:
[0041] A first acquisition module is configured to acquire a test scan image including a preset area, wherein the preset area is a portion or all of an area of the document to be scanned having a color corresponding to a preset RGB value;
[0042] a determination module, configured to determine a target light transmittance level based on a test RGB value and the preset RGB value, wherein the test RGB value is the color of the preset area in the test scanned image, and the target light transmittance level is used to represent the light transmittance of the document to be scanned;
[0043] A second acquisition module is configured to acquire an initial scan image corresponding to the document to be scanned, wherein the initial scan image is used to represent all scan data corresponding to the document to be scanned;
[0044] The deletion module is configured to determine an image print-through area from the initial scanned image according to the target light transmittance level, and delete the print-through image.
[0045] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0046] processor;
[0047] Memory;
[0048] and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, which, when executed by the processor, enable the electronic device to perform any one of the methods described in the first aspect.
[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described in the first aspect.
[0050] It is understood that the image print-through removal 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 all used to perform part or all of the methods provided herein. Therefore, the beneficial effects achievable by these devices can be referenced to the beneficial effects of the corresponding methods and will not be further elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0052] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application.
[0053] Figure 2 The invention provides a document to be scanned with images on both sides in the related art.
[0054] Figure 3 The present invention provides a light reflection diagram during the scanning process of a thicker original document to be scanned, which is provided in the related art.
[0055] Figure 4 The present invention provides a light reflection diagram during the scanning process of a thinner original document to be scanned in the related art.
[0056] Figure 5 A schematic flow chart of a method for removing image print-through provided in an embodiment of the present application.
[0057] Figure 6 A schematic structural diagram of an image print-through removal device provided in an embodiment of the present application.
[0058] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0059] Reference numerals:
[0060] 101-image forming device;
[0061] 201-front image; 202-back image;
[0062] 600 - image print-through removal device; 601 - first acquisition module; 602 - determination module, 603 - second acquisition module; 604 - deletion module;
[0063] 700 - electronic device; 701 - processor; 702 - memory; 703 - communication unit. DETAILED DESCRIPTION
[0064] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0065] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0066] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0067] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.
[0068] To facilitate understanding, a specific application scenario is first exemplified below.
[0069] See also Figure 1 , is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, the application scenario includes: an image forming device 101. The image forming device 101 has an image scanning function. Specifically, the image forming device 101 first captures scan data; then transmits the scan data to a related controller to generate a corresponding scan image.
[0070] It should be noted that the image forming devices described herein are merely exemplary and should not be construed as limiting the scope of protection of this application. For example, image forming devices include, but are not limited to, printers, copiers, fax machines, scanners, and multifunction devices that integrate printing, copying, faxing, and scanning functions.
[0071] In actual applications, the light source of the contact image sensor in the image forming device emits incident light onto the scanning surface of the original to be scanned; when the incident light shines on the scanning surface of the original to be scanned, different light will be reflected into the sensor according to the different patterns on the scanning surface; the reflected light forms a pixel point group at the sensor end, and after image processing, the initial scanned image is formed.
[0072] However, when scanning or copying thin, double-sided documents, the contact image sensor's light source may penetrate the document due to its high light transmittance. Some of this light is then reflected again by the image on the back side, mixing with the effective reflected light from the front side before entering the sensor. This reflected light from the back side forms a cluster of pixels on the sensor side. After image processing, it aggregates into a see-through image due to the signal superposition effect, resulting in poor overall image quality and severely reducing image usability.
[0073] It's understandable that each pixel in the scanned document can be represented by an RGB value (i.e., R data, B data, and G data). It's important to note that the R data describes the value of the red component of the pixel; the B data describes the value of the blue component; and the G data describes the value of the green component. For example, the RGB value of a pixel is RGB(128, 0, 128), indicating that the pixel's color is purple, a mixture of red and blue.
[0074] For easier understanding, see Figure 2 , a document to be scanned with images on both sides is provided in the related art. As shown in the figure, the front image 201 is located on the front side of the document to be scanned; the back image 202 is located on the back side of the document to be scanned.
[0075] when Figure 2 When the document to be scanned is a thicker paper, when the document to be scanned is scanned, the incident light emitted by the light source of the contact image sensor will not penetrate the document to be scanned, and the image formed by the sensor collecting the reflected light only contains the image information corresponding to the scanning surface of the document to be scanned.
[0076] For example, see Figure 3 , is a light reflection diagram during the scanning process of a thicker original document provided in the related art. As shown in the figure, Figure 2 On this basis, the back side of the document to be scanned is scanned. At this time, the incident light emitted by the light source of the contact image sensor will not penetrate the document to be scanned, and the reflected light collected by the sensor only contains the image information corresponding to the scanning surface of the document to be scanned. The image corresponding to the scanned image finally generated is the back side image 202.
[0077] when Figure 2 When the document to be scanned is a thinner paper, when the document to be scanned is scanned, the incident light emitted by the light source of the contact image sensor will penetrate the document to be scanned, and the image formed by the sensor collecting the reflected light will include both the image information corresponding to the scanning surface of the document to be scanned and the image information of the other side corresponding to the scanning surface.
[0078] For example, see Figure 4, a light reflection diagram of a thin original to be scanned during the scanning process provided by the related technology. As shown in the figure, Figure 2 On the basis of the scanning method, the back side of the document to be scanned is scanned. At this time, the incident light emitted by the light source of the contact image sensor will penetrate the document to be scanned, and the reflected light collected by the sensor contains both the image information corresponding to the scanning surface of the document to be scanned and the image information of the other side corresponding to the scanning surface. The image corresponding to the scanned image finally generated is a mixed image that contains both the front image 201 and the back image 202.
[0079] In response to the above problem, in an embodiment of the present application, a test scan image including a preset area is first obtained; then, a target light transmittance level is determined based on the test RGB values and the preset RGB values corresponding to the test scan image; finally, based on the target light transmittance level, the image see-through area is determined from the initial scan image, and the see-through image is deleted. It can be understood that the preset RGB value represents the RGB value of the same color area in the original document to be scanned before scanning, and the test RGB value represents the RGB value of the same color area in the original document to be scanned after scanning. The higher the transmittance of the original document to be scanned, as represented by the target light transmittance level, the greater the difference between the test RGB value and the preset RGB value. The target light transmittance level of the original document to be scanned can be determined based on the difference between the test RGB value and the preset RGB value, thereby achieving the determination of the image see-through area from the initial scan image and deleting the see-through image, thereby improving the quality of the scanned image to a certain extent. Specifically, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0080] See also Figure 5 , is a flow chart of a method for removing image print-through provided in an embodiment of the present application. This method can be applied to the application scenarios described above. Specifically, Figure 5 As shown, it mainly includes the following steps.
[0081] Step S501: Acquire a test scan image including a preset area.
[0082] In the embodiment of the present application, before obtaining the initial scan image of the document to be scanned, a test scan image including a preset area is first obtained. It should be noted that the preset area is a part or all of the area in the document to be scanned that has a color corresponding to a preset RGB value.
[0083] For example, if the color corresponding to the preset RGB value is blue, then the preset area is part or all of the blue area in the document to be scanned; similarly, if the color corresponding to the preset RGB value is red, then the preset area is part or all of the red area in the document to be scanned.
[0084] In practical applications, preset RGB values are pre-set in the image forming device to facilitate determining the corresponding preset area from the document to be scanned. It should be noted that the number of preset RGB values can be one or more. When there are multiple preset RGB values, the color corresponding to the preset RGB value selected each time is included in the document to be scanned. This application does not impose any specific limitation on the number of preset RGB values.
[0085] Furthermore, a test scan image including the preset area is obtained. In practical applications, an image forming device typically scans the document to be scanned line by line from one end. To ensure that the obtained test scan image includes the predicted area, in one possible implementation, the test scan image can be set to be a scanned image of the entire area of the document to be scanned.
[0086] In order to further save the waiting time of the image operation, in a possible implementation, the test scan image is a scanned image of a partial area of the document to be scanned.
[0087] Specifically, the image forming device can be set to scan a preset number of lines from one end of the document to be scanned. Of course, other methods can also be set so that the obtained test scan image is a scanned image of a partial area of the document to be scanned, and this application does not make specific restrictions on this.
[0088] It should be pointed out that when the image forming device is set to scan a preset number of lines from one end of the original to be scanned, in order to ensure that the test scan image includes a preset area, in one possible implementation, the image forming device can be set to perform an image scan of the preset number of lines again.
[0089] Specifically, an image forming device is set to scan a preset number of lines from one end of the original to be scanned to obtain a test scan image; then the obtained test scan image is detected to see whether it contains a preset area; when the preset area is not contained, the image forming device is controlled to continue scanning the preset number of lines; and the judgment and detection of whether the test scan image contains the preset area is continued until the preset area is contained in the test scan image.
[0090] It can be understood that the test scan image is a scanned image of a local area of the document to be scanned, which can reduce the time for determining the light transmittance level and improve work efficiency.
[0091] In actual applications, the edge areas of most scanned documents are white blank areas, and the vast majority of scanned documents contain white areas that are relatively continuous and large in area. Therefore, in one possible implementation, the color corresponding to the preset RGB values is white, and the preset area is a white area, i.e., a blank area without an image.
[0092] It can be understood that when the preset area is selected as a white area and the color corresponding to the preset RGB value is white, it is convenient to obtain the test scan image, which is beneficial to determine the target light transmittance level and ultimately beneficial to improve the quality of the scan image.
[0093] When the preset area is a blank area, that is, when the color corresponding to the preset RGB value is white, regarding the method of determining the preset area, in one possible implementation method, a candidate area can be first selected randomly or along the edge of the scanned image, and the difference between the RGB value corresponding to each pixel in the candidate area and the components of the white RGB value (255, 255, 255) is detected to see if it is within a preset range; at the same time, it is detected whether the number of adjacent pixels corresponding to the candidate area exceeds a preset number; if so, the candidate area is determined to be the preset area in the test scanned image.
[0094] Exemplarily, when the preset RGB value is (255, 255, 255), that is, the preset area is a blank area, a candidate area is selected along the edge of the scanned image, and it is detected whether the difference between the RGB value corresponding to each pixel in the candidate area and the preset RGB value is within 20, and the number of adjacent pixels corresponding to the candidate area exceeds 80; then the candidate area is determined to be the preset area in the test scan image.
[0095] When the preset area is an area other than the blank area, such as a blue area, that is, the color corresponding to the preset RGB value is blue, regarding the method of determining the preset area, in one possible implementation method, an image of the color corresponding to the preset RGB value can be printed in the designated blank area of the document to be scanned, and the original designated blank area is the preset area.
[0096] Step S502: Determine a target light transmittance level according to the test RGB value and the preset RGB value.
[0097] The target light transmittance level is used to represent the light transmittance of the document to be scanned.
[0098] In practical applications, first, the test RGB value is determined based on the color corresponding to the preset area in the test scan data. It can be understood that the color corresponding to the test RGB value is the color of the preset area in the test scan image.
[0099] In actual use, due to the varying light transmittance of scanned documents, the RGB values obtained for the same area in the document after scanning may differ from the preset RGB values (i.e., the actual RGB values) for that area. Generally speaking, the higher the light transmittance of the document, the greater the difference between the RGB values obtained after scanning and the actual RGB values for that area; the lower the light transmittance of the document, the smaller the difference between the RGB values obtained after scanning and the actual RGB values for that area.
[0100] In one possible implementation, the target light transmittance level includes a first light transmittance level, a second light transmittance level, and a third light transmittance level. The light transmittance corresponding to the first light transmittance level is greater than the light transmittance corresponding to the second light transmittance level, and the light transmittance corresponding to the second light transmittance level is greater than the light transmittance corresponding to the third light transmittance level. The first light transmittance level is typically used to describe the light transmittance of thin paper; the second light transmittance level is typically used to describe the light transmittance of thick paper; and the third light transmittance level is typically used to describe the light transmittance of glossy paper.
[0101] Furthermore, in a possible implementation, after the target light transmittance level is determined, the corresponding paper type of the document to be scanned may be displayed or notified for the user to determine whether it is accurate, thereby further improving the quality of the scanned image to a certain extent.
[0102] Step S503: obtaining an initial scanned image corresponding to the document to be scanned.
[0103] In the embodiment of the present application, after the target light transmittance level is determined, an initial scanned image corresponding to the document to be scanned is obtained, wherein the initial scanned image is used to represent all scanned data corresponding to the document to be scanned.
[0104] Specifically, in a possible implementation, the image forming device is controlled to scan the document to be scanned, and then an initial scanned image corresponding to the document to be scanned is obtained.
[0105] Of course, in a possible implementation, when the test scan image acquired in step S501 is a scan image of the entire area of the document to be scanned, the test scan image is directly acquired and used as the initial scan image.
[0106] Step S504: determining the image print-through area from the initial scanned image according to the target light transmittance level, and deleting the print-through image.
[0107] It can be understood that since the target light transmittance level can represent the transmittance of the original to be scanned, the color depth of the through-printed image formed by the image and text on the back is different due to different transmittances. For example, when the transmittance represented by the target light transmittance level is high, the color of the through-printed image is darker, but still lighter than the color of the front image. Therefore, the image through-printed area can be determined from the initial scanned image according to the color depth of the through-printed image corresponding to the target light transmittance level, and the through-printed image in the image through-printed area can be deleted.
[0108] In actual applications, due to other process reasons, the document to be scanned may have special cases where only the preset area is thin, while other areas are thick. To further ensure a more accurate target light transmittance level in special cases, after determining the target light transmittance level based on the test RGB values and the preset RGB values, further judgment can be made on the determined target light transmittance level.
[0109] Specifically, when a document is scanned, the size of the grayscale jump caused by the edge of the paper is related to the thickness of the document. Consequently, the size of the initial scanned image generated is related to the thickness of the document. The thicker the document, the larger the size of the initial scanned image.
[0110] Based on the above principles, in one possible implementation method, the paper type of the document to be scanned is first determined based on the size of the initial scanned image, the size of the document to be scanned, and a preset difference threshold; then, a determination is made as to whether the target light transmittance level matches the paper type; finally, when the target light transmittance level matches the paper type, the image print-through area is determined from the initial scanned image based on the target light transmittance level.
[0111] It's understandable that different paper types correspond to different light transmittances, and thus different light transmittance levels. Therefore, the accuracy of the target light transmittance level can be determined based on whether the target light transmittance level matches the paper type. This further ensures the accuracy of the target light transmittance level in special circumstances, improving the quality of the scanned image.
[0112] Specifically, in one possible implementation, when the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is greater than or equal to a preset difference threshold, the document to be scanned is determined to be of a first paper type; and when the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is less than the preset difference threshold, the document to be scanned is determined to be of a second paper type. The light transmittance corresponding to the first paper type is less than the light transmittance corresponding to the second paper type.
[0113] It can be understood that based on the principle that the lower the light transmittance of the paper, the greater the difference between the width / length of the corresponding initial scanned image and the width / length of the original to be scanned, a corresponding preset difference threshold is set. Then, by judging the relationship between the difference between the width / length of the initial scanned image and the width / length of the original to be scanned and the preset difference threshold, the paper type of the original to be scanned can be accurately and quickly determined, thereby ensuring the selection of an accurate target light transmittance level and ultimately ensuring the quality of the scanned image. Furthermore, for scanned originals of different sizes, such as A4, A5, Letter, etc., the grayscale jump size caused by the edge of the paper during scanning may be different, resulting in a different difference between the width / length of the corresponding generated initial scanned image and the width / length of the original to be scanned. In order to improve the accuracy of the paper type, different preset difference thresholds can be set for scanned originals of different sizes.
[0114] Exemplarily, the first paper type is thick paper and the second paper type is thin paper, both of which will produce see-through images. Taking an A4-sized scanned document as an example, the preset difference threshold of an A4 scanned document with thick paper as the paper type can be set to 2mm, or it can be set according to actual conditions. After the scan is completed, if the initial scanned image size is larger than the A4 size, and the width / length of the initial scanned image minus the width / length of the A4 scanned document is greater than 2mm, then the paper type is thick paper. If the transmittance corresponding to the target transmittance level is the transmittance of thick paper, then the target transmittance level matches the paper type.
[0115] Of course, relevant technicians in this field can also determine the paper type of the original to be scanned in other ways, such as directly asking the user through electronic devices such as computers, mobile terminals, image forming devices, etc. This application does not impose specific restrictions on this.
[0116] Furthermore, in a possible implementation, when the target light transmittance level does not match the paper type, a test scan image including a preset area is reacquired to redetermine the target light transmittance level, thereby ensuring that an accurate target light transmittance level is selected to ensure the quality of the scanned image.
[0117] Regarding the determination of the image see-through area from the target transmittance level, in one possible implementation method, based on the target transmittance level, a target grayscale value range of the see-through image corresponding to the target transmittance level is determined; a target pixel point in the initial scanned image whose grayscale value is within the target grayscale value range is obtained; and the area corresponding to the target pixel point is determined as the image see-through area.
[0118] The see-through image formed by the back image is lighter in color than the front image, and has a larger grayscale value representing brightness intensity. The grayscale value ranges from [0 to 255], with a grayscale value of 0 representing the brightness of black and a grayscale value of 255 representing the brightness of white. Furthermore, the color depth of the see-through image formed by the back image varies depending on the target light transmittance level (i.e., the transmittance) of the document being scanned. For example, when the target light transmittance represents a low transmittance, the see-through image is darker in color and has a smaller grayscale value. In other words, different target light transmittance levels result in different grayscale value ranges for the see-through image.
[0119] For example, during the scanning process, all pixels can be traversed to collect grayscale values, i.e., to generate a grayscale histogram. Specifically, a 256-capacity array corresponding to grayscale values 0-255 with an initial count of 0 can be initialized. Then, all pixels can be traversed to count the grayscale value of each pixel.
[0120] Exemplarily, when the preset area is a white area and the original to be scanned is thin paper, the target grayscale value interval of the see-through image corresponding to the target transmittance level is determined to be [180, 255] according to the target transmittance level; the target pixel point with a grayscale value within [180, 255] in the initial scanned image is obtained; and the area corresponding to the target pixel point is determined as the image see-through area.
[0121] It can be understood that the target grayscale value range of the through-printed image corresponding to the target light transmittance level can directly and accurately determine the through-printed area in the initial scanned image, so as to facilitate the deletion of the through-printed image, thereby improving the quality of the scanned image to a certain extent.
[0122] In one possible implementation, a corresponding see-through image removal model can be trained based on the relationship between scanned images and see-through images at a large number of different light transmittance levels to determine the see-through area from the initial scanned image. This application does not impose any specific restrictions on this.
[0123] In practical applications, the characteristic of through-printing images is usually that they are relatively concentrated. Therefore, in order to improve the processing speed of the initial scanned image, only the through-printing images in blocks can be processed.
[0124] Specifically, in one possible implementation, the determined image print-through area includes no less than a preset number of adjacent target pixels of the same grayscale value. It can be understood that this method embodiment improves the processing speed of the initial scanned image while ensuring the quality of the scanned image, thereby improving the user experience.
[0125] In practical applications, in order to ensure the quality of the scanned image, after the image see-through area is determined, the user can be allowed to make a selection to reduce the possibility of misjudging the see-through area.
[0126] Specifically, in a possible implementation, after the image print-through area is determined, position prompt information of the print-through image is first output; and then, in response to a deletion instruction, the print-through image is deleted.
[0127] Exemplarily, during the scanning process, all pixel information is collected and saved in storage space A. First, after the image see-through area is determined, the grayscale value of the see-through image is assigned to 255, and the processed pixel information is saved in storage space B. Second, a prompt is outputted indicating the location of the see-through image, for example, through a user interface prompt: "This pixel set is suspected to be a see-through image, do you want to remove it?", and two options are provided: ① Yes ② No, where a pixel set is a collection of multiple adjacent pixels with the same grayscale value. Next, if the user issues a delete instruction, that is, selects "① Yes", the pixel information in storage space B is called for subsequent image processing, otherwise the pixel information in storage space A is called.
[0128] It can be understood that further increasing the user's judgment on the image see-through area ensures that the see-through image finally deleted is the image that is seen through from the back of the document to be scanned, which improves the quality of the scanned image to a certain extent.
[0129] In the embodiment of the present application, a test scan image including a preset area is first acquired; a target light transmittance level is then determined based on the test RGB values and preset RGB values corresponding to the test scan image; finally, based on the target light transmittance level, the image show-through area is determined from the initial scan image, and the show-through image is deleted. It will be appreciated that, because the preset RGB values and the test RGB values represent the RGB values of the same color area in the scanned document before and after scanning, the target light transmittance level of the scanned document can be determined based on the test RGB values and the preset RGB values, thereby enabling the identification of the image show-through area from the initial scan image and the deletion of the show-through image, thereby improving the quality of the scanned image to a certain extent.
[0130] Corresponding to the above embodiment, the present application also provides a schematic structural diagram of an image print-through removal device. Figure 6 , which is a schematic diagram of the structure of an image print-through removal device provided in an embodiment of the present application. As shown in the figure, the image print-through removal device 600 specifically includes: a first acquisition module 601, a determination module 602, a second acquisition module 603, and a deletion module 604. The first acquisition module 601 is used to acquire a test scan image including a preset area; the determination module 602 is used to determine a target light transmittance level based on the test RGB values and the preset RGB values; the second acquisition module 603 is used to acquire an initial scan image corresponding to the document to be scanned; and the deletion module 604 is used to determine the image print-through area from the initial scan image based on the target light transmittance level and delete the print-through image.
[0131] For the specific implementation of the image print-through removal device, reference may be made to the contents of the method embodiment described above, and this application will not elaborate on it here.
[0132] Corresponding to the above embodiment, the present application also provides a structural diagram of an electronic device. Figure 7 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 700 may include: a processor 701, a memory 702, and a communication unit 703. These components communicate via one or more buses. Those skilled in the art will understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present invention. It can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0133] The communication unit 703 is configured to establish a communication channel so that the electronic device can communicate with other devices, receive user data sent by other devices, or send user data to other devices.
[0134] The processor 701 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs, instructions, and / or modules stored in the memory 702, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 701 can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0135] The memory 702 is used to store execution instructions of the processor 701. The memory 702 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.
[0136] The computer program is stored in the memory. The computer program includes instructions. When the instructions in the memory 702 are executed by the processor 701, the electronic device 700 can perform Figure 5 Some or all of the steps in the illustrated embodiments.
[0137] In a specific implementation, the present application further provides a computer storage medium, wherein the computer storage medium may store a program that, when executed, may include some or all of the steps of each embodiment of the simulation scenario generation method provided in the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0138] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0139] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0140] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0141] In the several embodiments provided in this 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 this application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.
[0142] In this specification, reference can be made to the same or similar parts between the various embodiments. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims
1. A method for removing image print-through, characterized in that: include: Acquire a test scan image including a preset area, wherein the preset area is a portion or all of an area of the document to be scanned having a color corresponding to a preset RGB value; Determining a target light transmittance level according to the test RGB value and the preset RGB value, wherein the test RGB value is the color of the preset area in the test scan image, and the target light transmittance level is used to represent the light transmittance of the document to be scanned; Acquire an initial scanned image corresponding to the original document to be scanned, wherein the initial scanned image is used to represent all scanned data corresponding to the original document to be scanned; According to the target light transmittance level, an image print-through area is determined from the initial scanned image, and the print-through image is deleted.
2. The method according to claim 1, characterized in that The test scan image is a scan image of a local area of the document to be scanned; The color corresponding to the preset RGB value is white, and the preset area is a white area.
3. The method according to claim 1, characterized in that The determining of the image print-through area from the initial scanned image according to the target light transmittance level includes: determining the paper type of the document to be scanned according to the size of the initial scanned image, the size of the document to be scanned, and a preset difference threshold; Determining whether the target light transmittance level matches the paper type; When the target light transmittance level matches the paper type, an image show-through area is determined from the initial scanned image according to the target light transmittance level.
4. The method according to claim 3, characterized in that Also includes: When the target light transmittance level does not match the paper type, a test scan image including a preset area is reacquired to re-determine the target light transmittance level.
5. The method according to claim 3, characterized in that The determining the paper type of the document to be scanned according to the size of the initial scanned image, the size of the document to be scanned, and a preset difference threshold value includes: When the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is greater than or equal to a preset difference threshold, determining that the paper type of the document to be scanned is a first paper type; When the difference between the width / length of the initial scanned image and the width / length of the document to be scanned is less than a preset difference threshold, determining that the paper type of the document to be scanned belongs to the second paper type; The light transmittance corresponding to the first paper type is smaller than the light transmittance corresponding to the second paper type.
6. The method according to claim 1, characterized in that The determining of the image print-through area from the initial scanned image according to the target light transmittance level includes: determining, according to the target light transmittance level, a target grayscale value interval of the telescopic image corresponding to the target light transmittance level; Acquire a target pixel point whose grayscale value is within the target grayscale value range in the initial scanned image; The area corresponding to the target pixel point is determined as the image print-through area.
7. The method according to claim 6, characterized in that The image print-through area includes no less than a preset number of adjacent target pixel points with the same grayscale value.
8. The method according to claim 1, characterized in that The step of deleting the through-print image comprises: Output the position prompt information of the through-print image; In response to a deletion instruction, the offset image is deleted.
9. An image print-through removal device, characterized in that: include: A first acquisition module is configured to acquire a test scan image including a preset area, wherein the preset area is a portion or all of an area of the document to be scanned having a color corresponding to a preset RGB value; a determination module, configured to determine a target light transmittance level based on a test RGB value and the preset RGB value, wherein the test RGB value is the color of the preset area in the test scanned image, and the target light transmittance level is used to represent the light transmittance of the document to be scanned; A second acquisition module is configured to acquire an initial scan image corresponding to the document to be scanned, wherein the initial scan image is used to represent all scan data corresponding to the document to be scanned; The deletion module is configured to determine an image print-through area from the initial scanned image according to the target light transmittance level, and delete the print-through image.
10. An electronic device, characterized in that: include: processor; Memory; and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, which, when executed by the processor, enable the electronic device to perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data processing device, image forming device, system, and a computer-readable recording medium
CN101398642A
Document image strike-through eliminating method and system
CN102523364A