Scanning device for generating image file containing transparency and visible light information
Through the combination of scanning module and processor, visible and penetrating image signals are generated, which solves the accuracy and efficiency problems of traditional scanners when processing holed files, and achieves efficient image processing and printing effects.
Patent Information
- Application Number
- CN202411315024.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-22
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-27
AI Technical Summary
When traditional scanners scan files with holes, it is difficult to accurately obtain the profile and remove shadows of the file, resulting in wasting toner during printing and complex operation. Especially for unfamiliar computer users, post-processing efficiency is inefficient.
A scanning device is designed to generate visible light images and penetrating light image signals through the scanning module, which the processor converts into the final image file of the rectangular array, and outputs the output port to the external device to achieve the accurate presentation of the original outline and shadow of the file.
It realizes the direct acquisition of image files containing transparency and visible light information, saving time, simplifying operations, accurately obtaining file boundaries and removing shadows, avoiding printing waste and complex operations.
Smart Images

Figure CN119211432A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of scanning devices, and in particular to a scanning device for generating an image file containing transparency and visible light information. Background Art
[0002] When a traditional scanner scans a document with holes, the visible light image obtained will be a completely black image corresponding to the hole. If the user prints this image, a lot of toner will be wasted on printing the completely black hole image. Currently, the copiers on the market directly print the completely black hole image. Although the holes can be removed through image processing software, such post-processing is not accurate and takes up a lot of performance, wasting the user's time, and is a hindrance to users who are not familiar with computers.
[0003] On the other hand, although you can use the preview scan to set the boundaries of the frame selection to exclude holes or damaged areas from being scanned, if the information next to the hole is not scanned, the scan will be incomplete, and this operation method is also quite complicated. In addition, due to the limitations of optical principles, when scanning documents, shadows will be generated at the edges of the corresponding documents. To accurately remove the shadows, complex post-processing is also required, and it is even difficult to achieve the goal. The simple way is to use the frame selection restriction method, but sometimes the shadows will be removed incorrectly.
[0004] With the development of computer software, users can drag an image in different backgrounds to present different backgrounds and the fusion effect of the image. Therefore, how to correctly find the outline of the original for further application is the problem to be solved in this case. Summary of the invention
[0005] Therefore, an object of the present invention is to provide a scanning device that generates an image file containing transparency and visible light information for immediate output to an external device.
[0006] To achieve the above-mentioned purpose, the present invention provides a scanning device, comprising: a scanning module, scanning a document to generate a first signal and a second signal, the first signal representing a composite visible light image of the document and a background component, and the second signal representing a transmitted light image that penetrates the document; a processor, electrically connected to the scanning module, and generating a final image file having a plurality of first pixels and a plurality of second pixels according to the first signal and the second signal, the first pixels and the second pixels being arranged in a rectangular array, the first pixels representing the visible light image of the document, the second pixels representing the remaining images outside the document, and the transmitted light channel values of the plurality of second pixels being greater than 0%; and an output port, electrically connected to the processor, and outputting the final image file to an external device.
[0007] Through the above-mentioned embodiments, an image file containing transparency and visible light information can be directly obtained by using a scanning device, and the generated file format can be PNG or other files. After the external device receives this file, the non-substantial part of the corresponding file and the part outside the file can change to the color of the background along with the color of the background, and present the original outline of the file. On the other hand, the shadow of the file can be further removed to present the original outline of the file in an undistorted manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 FIG. 4 is a schematic diagram of a scanning device according to a preferred embodiment of the present invention.
[0009] Figure 2 for Figure 1 Schematic diagram of a visible light image and other images output by a scanning device.
[0010] Figure 3 The figure is a schematic diagram of a specific embodiment of classifying and processing original pixels into channel values of first pixels and second pixels.
[0011] Figure 4 for Figure 1 Flowchart of steps performed by a processor.
[0012] Figure 5 It is a schematic diagram of a specific embodiment of obtaining two final image files based on a composite visible light image and a transmitted light image.
[0013] Description of reference numerals:
[0014] A: penetrating light channel value; B: blue channel value; FI, FI': final image file; G: green channel value; I1: visible light image; I2: other images; IP: internal contour; IS1: composite visible light image; IS2: penetrating light image; OP: external contour;
[0015] P0: original pixel; P1: first pixel; P2: second pixel; R: red channel value; RC: right angle contour part; RM: rectangular array; S1: first signal; S2: second signal; S10, S20, S30, S40: steps; TH: threshold value;
[0016] 10: scanning module; 11: image sensor; 12: visible light source;
[0017] 20: processor;
[0018] 30: output port;
[0019] 40: Penetrate light source;
[0020] 50: background component;
[0021] 60: light-transmitting platform;
[0022] 70: file; 70H: hole; 70S: shadow;
[0023] 100: scanning device;
[0024] 200: External device. DETAILED DESCRIPTION
[0025] In order to make the above contents of the present invention more clearly understood, preferred embodiments are specifically cited below and described in detail with reference to the accompanying drawings.
[0026] Figure 1 A schematic diagram of a scanning device 100 according to a preferred embodiment of the present invention is shown. Figure 2 show Figure 1 Schematic diagram of the visible light image and other images output by the scanning device 100. Figure 1 and Figure 2 As shown, the scanning device 100 includes a scanning module 10, a processor 20 and an output port 30. The scanning device 100 may be a document scanner or a multi-function printer.
[0027] The scanning module 10 scans the document 70 to generate a first signal S1 and a second signal S2. In one embodiment, the visible light source 12 of the scanning module 10 is disposed below the light-transmitting platform 60, and the emitted visible light is reflected by the physical part of the document 70 and the background component 50 back to the image sensor 11 of the scanning module 10, which may be, for example, a contact image sensor (CIS) or a charge-coupled device (CCD) image sensor. Therefore, the first signal S1 represents a composite visible light image IS1 of the document 70 and the background component 50, and also represents the visible light channel values of a plurality of original pixels P0. On the other hand, the penetrating light source 40 (e.g., an infrared light source) of the scanning module 10 is disposed above the background component 50 and the document 70, and the infrared light emitted by the infrared light source can penetrate the background component 50, and penetrate the hole 70H of the document 70 and the portion other than the edge of the document 70. That is, the infrared light cannot penetrate the physical part of the document 70 (which may also be defined as a portion with a predetermined thickness). Therefore, the second signal S2 represents the transmitted light image IS2 of the transmitted document 70, that is, it can represent the transmitted light image IS2 of the transmitted document 70 and the background component 50. In other words, the second signal S2 represents the transmitted light channel values of the plurality of original pixels P0. In addition, the background component 50 can be used as a standard white calibration reference for the image sensor 11.
[0028] The processor 20 is electrically connected to the scanning module 10, and generates a final image file FI according to the first signal S1 and the second signal S2, which has a plurality of first pixels P1 and a plurality of second pixels P2 arranged in a rectangular array RM. In one embodiment, the final image file FI has information such as a header and a footer. These first pixels P1 represent the visible light image I1 (having an outer contour OP and an inner contour IP) of the file 70, that is, the visible light image I1 representing the physical part of the file 70. These second pixels P2 represent the remaining images I2 outside the file 70, that is, the images representing the non-physical part of the file 70 (such as holes or damaged parts) and the part outside the file 70. In addition, the penetrating light channel value of the second pixel P2 is greater than 0%. From another point of view, the combination of the first signal S1 and the second signal S2 can define a plurality of original pixels P0. After performing scanning using the above-mentioned scanning module 10, the channel value of the original pixel P0 is obtained. With the method described below, the original pixel P0 can be accurately classified and processed into the first pixel P1 and the second pixel P2.
[0029] The output port 30 is electrically connected to the processor 20, and outputs the final image file FI to the external device 200. The output port 30 includes but is not limited to a wired network port, a wireless network port, a Universal Serial Bus (USB) port, and the like.
[0030] Through the above-mentioned scanning device 100, the signal obtained by optical scanning can be used to directly and quickly generate an output of an image with a visible light channel and transmittance, and the position of the boundary and holes of the document 70 can be accurately obtained, and the shadow can be accurately eliminated.
[0031] In this embodiment, the scanning module 10 scans the document 70 once to generate the first signal S1 and the second signal S2, thereby saving time. In other embodiments, the scanning module 10 may scan the document 70 multiple times to generate the above signals, which is not particularly limited herein.
[0032] Figure 3 A specific embodiment of classifying and processing the original pixel P0 into the channel values of the first pixel P1 and the second pixel P2 is shown. Figure 3 As shown, an original pixel P0 has a red channel value (R=128), a green channel value (G=98), a blue channel value (B=196), and a transmitted light channel value (A=1%). Figure 1After being processed by the processor 20, it is determined that the original pixel P0 represents the entity part of the document according to the transmission light channel value (A=1%), and belongs to the first pixel P1, so the red, green and blue channel values are maintained, and the transmission light channel value (A=1%) is set to (A=0%), that is, the transmission light channel value of the first pixel P1 is equal to 0%, so that the first pixel P1 has Figure 3 Of course, in another embodiment, the transmitted light channel value (A=1%) can also be maintained.
[0033] Another original pixel P0 has a red channel value (R=230), a green channel value (G=210), a blue channel value (B=242), and a transmitted light channel value (A=100%). Figure 1 After being processed by the processor 20, it is determined that the original pixel P0 represents the non-physical part of the document or the part outside the document according to the transmitted light channel value (A=100%), and belongs to the second pixel P2, so the red, green and blue channel values are set to 0 (that is, the second pixel P2 has a visible light intensity value of 0), and the transmitted light channel value (A=100%) is maintained as (A=100%), so that the second pixel P2 has Figure 3 Channel values shown. In another embodiment, the original red, green and blue channel values may also be retained, allowing the user to retrieve the original visible light channel values on an external device for other applications, such as issuing a comparison report diagram to verify the effectiveness of the scanning device in this case. It can be understood that the above-mentioned red, green and blue channel values can correspond to the visible light channel values in the application of the black and white scanning module. Therefore, the first signal S1 and the second signal S2 represent the visible light channel values and the penetrating light channel values of multiple original pixels P0. In another embodiment, the above-mentioned R, G, and B can also be converted into brightness Y, red chromaticity Cr, and blue chromaticity Cb.
[0034] Figure 4 show Figure 1 A flowchart of the steps performed by a processor. Figure 4As shown, the processor 20 performs the following steps S10, S20, S30 and S40. In step S10, a threshold value TH is set, which can be input by the user, or selected from a database according to different states, or a default value is adopted. In step S20, it is determined whether the transmission light channel value (for example, the fourth channel value) of each original pixel P0 is greater than the threshold value TH. If so, step S30 is entered to set the visible light channel value (for example, the first, second, and third channel values) of the original pixel P0 to 0, and the transmission light channel value of the original pixel P0 to 100%, which are respectively used as the visible light channel value and the transmission light channel value of the second pixel P2. Then, the channel values of the first pixel P1 and the second pixel P2 can be output; otherwise, step S40 is entered to retain the visible light channel value of the original pixel P0, and the transmission light channel value of the original pixel P0 is set to 0%, which are respectively used as the visible light channel value and the transmission light channel value of the first pixel P1. These first pixels P1 and these second pixels P2 can form a final image file. Then, the channel values of the first pixel P1 and the second pixel P2 can be output. It is understandable that it is not necessary to set the transmission light channel value to 100%, because the original transmission light channel value can also be retained for further use by the external device 200. For example, the external device 200 can determine the fold of the document (thin thickness, the transmission rate will be different from other parts) or the floating part of the document based on the transmission light channel value. Of course, the processor 20 can also determine the fold of the document or the floating part of the document. In addition, it is not necessary to set the visible light channel value of the original pixel P0 to 0, because the original visible light channel value can be retained.
[0035] Since the above processing and judgment method is very simple, it can be easily completed without the need for a high-end processor or a large memory capacity, thereby further saving costs.
[0036] Figure 5 A schematic diagram showing a specific embodiment of obtaining two final image files based on a composite visible light image and a transmission light image. Figure 5 and Figure 1As shown, the processor 20 can further process the composite visible light image IS1 according to one or more right-angle contour portions RC of the transmitted light image IS2 represented by the second signal S2 to generate a visible light image I1, and then perform skew correction on the visible light image I1 to generate a final image file FI. The visible light image I1 includes an image representing the hole 70H of the document 70 and an image representing the shadow 70S of the document 70. In this case, the first signal S1 represents the composite visible light image IS1 of the document 70, the background component 50, the shadow 70S of the document 70, and the hole 70H. The right-angle contour portion RC can be obtained by finding the outer boundary of the corresponding document 70, and is determined by the arrangement direction of the pixels representing the outer boundary. The outer boundary can be accurately and easily obtained based on the transmitted light image IS2. In the above manner, the shadow of the document can be accurately removed.
[0037] In another embodiment, the processor 20 can further automatically cut the visible light image I1 according to one or more right-angle contour parts RC of the transmitted light image IS2 represented by the second signal S2, so as to obtain the final image file FI'. In another embodiment, the processor 20 can further process the first signal S1 and the second signal S2 into a composite visible light image file (representing the composite visible light image) and a transmitted light image file (representing the transmitted light image), and the output port 30 further outputs the composite visible light image file and the transmitted light image file to the external device 200. Therefore, the final image file, the composite visible light image file and the transmitted light image file can be output for further processing by the external device 200, and the external device 200 can process the composite visible light image file and the transmitted light image file into another final image file, and determine whether the other final image file is consistent with the aforementioned final image file. If not, the firmware of the scanning device 100 needs to be calibrated.
[0038] Through the scanning device of the above embodiment, an image file containing transparency and visible light information can be obtained, and the generated file format is, for example, PNG, PDF supporting layering function or other file formats. After the external device receives this file, the non-substantial part of the corresponding file and the part outside the file can change to the color of the background along with the color of the background. Therefore, the original outline, holes and damage of the file can be presented. On the other hand, the shadow of the file can be further removed to present the original outline of the file in a distortion-free manner.
[0039] The specific embodiments proposed in the detailed description of the preferred embodiments are only used to facilitate the explanation of the technical content of the present invention, rather than narrowly limiting the present invention to the above embodiments. Various changes and implementations made without exceeding the spirit of the present invention and the scope of the patent application are all within the scope of the present invention.
Claims
1. A scanning device, characterized in that: Include: A scanning module, scanning a document to generate a first signal and a second signal, wherein the first signal represents a composite visible light image of the document and a background component, and the second signal represents a transmission light image that penetrates the document; a processor, electrically connected to the scanning module, and generating a final image file having a plurality of first pixels and a plurality of second pixels according to the first signal and the second signal, wherein the plurality of first pixels and the plurality of second pixels are arranged in a rectangular array, the plurality of first pixels represent visible light images of the file, the plurality of second pixels represent other images other than the file, and the transmission light channel values of the plurality of second pixels are greater than 0%; and The output port is electrically connected to the processor and outputs the final image file to an external device. 2 . The scanning device as claimed in claim 1 , wherein the scanning module scans the document once to generate the first signal and the second signal.
3. The scanning device according to claim 1, characterized in that: The penetration light channel values of the plurality of first pixels are equal to 0%. The scanning device of claim 1 , wherein the plurality of second pixels have a visible light intensity value of 0.
5. The scanning device according to claim 1, characterized in that: The processor further performs skew correction on the visible light image according to one or more right-angle contour portions of the transmitted light image represented by the second signal.
6. The scanning device according to claim 1, characterized in that: The processor further automatically crops the visible light image according to one or more right-angle contour portions of the transmitted light image represented by the second signal.
7. The scanning device according to claim 1, characterized in that: The first signal represents the composite visible light image of the document, the background component, and the shadow of the document.
8. The scanning device according to claim 1, characterized in that: The penetration light channel values of the plurality of second pixels are 100%.
9. The scanning device according to claim 1, characterized in that: The first signal and the second signal respectively represent the visible light channel value and the transmitted light channel value of multiple original pixels. The processor determines whether the transmitted light channel value of each original pixel is greater than a threshold value. If so, the visible light channel value of the original pixel is retained or the visible light channel value of the original pixel is set to 0; otherwise, the visible light channel value of the original pixel is retained and the transmitted light channel value of the original pixel is set to 0%.
10. The scanning device according to claim 1, wherein: The first signal and the second signal respectively represent the visible light channel value and the transmitted light channel value of multiple original pixels. The processor determines whether the transmitted light channel value of each original pixel is greater than a threshold value. If so, the transmitted light channel value of the original pixel is set to 100%; otherwise, the visible light channel value of the original pixel is retained and the transmitted light channel value of the original pixel is set to 0%.
11. The scanning device according to claim 1, characterized in that: The processor further processes the first signal and the second signal into a composite visible light image file and a transmitted light image file respectively, and the output port further outputs the composite visible light image file and the transmitted light image file to the external device.