This application claims priority of No. 112136160 filed in Taiwan R.O.C. on Sep. 22, 2023 under 35 USC 119, the entire content of which is hereby incorporated by reference.
This disclosure relates to a scanner, and more particularly to a scanner generating an image file including transparency (or transmitting light) information and visible light information.
After a conventional scanner has scanned a document having a hole, the obtained visible light image has a totally black hole image at a position corresponding to the hole. If a user wants to print out the visible light image, a lot of toner is wasted in printing the totally black hole image. At present, copiers on the market directly print out the totally black hole image. Although the hole image can be removed using image processing software, such post-processing is not accurate, occupies a lot of performance, wastes the user's time, and is a hindrance to users unfamiliar with computers.
On the other hand, a preview scan can be performed to set boundaries to be cropped and prevent the hole or damaged portion from being formally scanned. However, if the information around the hole is not scanned, the scan is not complete, and such the operation method is also very complicated. In addition, due to the restriction of the optical principle, shadows will be present at locations corresponding to edges of the document upon document scanning, and complicated post-processing is needed to precisely remove the shadows, or the shadows cannot be easily removed. The easy way is to process the image by way of frame cropping. However, the shadows sometimes cannot be correctly removed.
As the development of computer software advances day by day, the user can drag one image across different backgrounds to render the blending effects of the different backgrounds with the image. Therefore, how to correctly determine the contour of the original for the further application is indeed a problem to be solved by this disclosure.
It is therefore an objective of this disclosure to provide a scanner generating an image file, which includes transparency and visible light information, and can be immediately outputted to an external device for applications.
To achieve the above-identified objective, this disclosure provides a scanner including: a scanning module scanning a document to generate a first signal and a second signal, wherein the first signal is representative of a composite visible light image of the document and a background element, and the second signal is representative of a transmitting light image transmitting through the document; a processor, which is electrically connected to the scanning module, and generates a final image file having first pixels and second pixels according to the first signal and the second signal, wherein the first pixels and the second pixels are arranged in a rectangular array, the first pixels are representative of a visible light image of the document, the second pixels are representative of a remaining image other than the document, and the second pixels have transmitting light channel values greater than 0%; and an output port being electrically connected to the processor and outputting the final image file to an external device.
With the above-mentioned embodiment, the scanner can be used to directly obtain and generate the image file including the transparency and visible light information, and the generated file may have a portable network graphics (PNG) format or other file formats. After the external device has received the file, a non-physical part corresponding to the document and a part other than the document may change to the color of the background with the change of the color of the background, and an original contour of the document can be present. On the other hand, the shadow of the document may also be further removed, so that the original contour of the document can be present without distortion.
In order to make the above-mentioned content of this disclosure more obvious and be easily understood, preferred embodiments will be described in detail as follows in conjunction with the accompanying drawings.
The scanning module 10 scans a document 70 to generate a first signal S1 and a second signal S2. In one example, a visible light source 12 of the scanning module 10 is disposed below a transparent platen 60, and outputs visible light reflected, by a physical part of the document 70 and a background element 50, back to an image sensor 11 of the scanning module 10, such as a contact image sensor (CIS) or a charge-coupled device (CCD) image sensor. Therefore, the first signal S1 is representative of a composite visible light image IS1 of the document 70 and the background element 50, and is also representative of visible light channel values of original pixels P0. On the other hand, a transmitting light source 40 (e.g., infrared light source) of the scanning module 10 is disposed above the background element 50 and the document 70, the infrared light outputted from the infrared light source may transmit through the background element 50, and transmit through a hole 70H of the document 70 and portions other than the document 70 or outside edges of the document 70. That is, the infrared light cannot transmit through the physical part (may also be defined as a part having a predetermined thickness) of the document 70. Therefore, the second signal S2 is representative of a transmitting light image IS2 transmitting through the document 70, and may also be representative of the transmitting light image IS2 obtained after the transmitting light transmits through the document 70 and the background element 50. That is, the second signal S2 is representative of transmitting light channel values of the original pixels P0. In addition, the background element 50 may serve as a standard-white calibration reference of the image sensor 11.
The processor 20 is electrically connected to the scanning module 10, and generates, according to the first signal S1 and the second signal S2, a final image file FI having first pixels P1 and second pixels P2 arranged in a rectangular array RM. In one example, the final image file FI has information such as headers, footers and the like. The first pixels P1 is representative of a visible light image I1 of the document 70 having an outer contour OP and an inner contour IP, or is representative of the visible light image I1 of the physical part of the document 70. The second pixels P2 is representative of a remaining image I2 other than the document 70, and is also representative of the images of the non-physical part (e.g., the hole or damaged part) of the document 70 and the part other than the document 70. In addition, the transmitting light channel value of the second pixel P2 is greater than 0%. In another point of view, the combination of the first signal S1 and the second signal S2 may be defined as the original pixels P0, the channel values of the original pixels P0 can be obtained using the scanning module 10 to perform scanning, and the following method to be explained can be performed so that the original pixels P0 can be precisely classified into the first pixels PI and the second pixels P2.
The output port 30 electrically connected to the processor 20 outputs the final image file FI to an external device 200. The output port 30 includes, for example but without limitation to, a wired network connection port, a wireless network connection port, a universal serial bus (USB) connection port and the like.
With the above-mentioned scanner 100, the signal obtained by optical scanning can be utilized to directly and quickly generate and output the image having the visible light channel values and transmittance, and to precisely obtain the boundary and position of the hole of the document 70, and precisely remove the shadow.
In this embodiment, the scanning module 10 performs one-time scanning on the document 70 to generate the first signal S1 and the second signal S2 to achieve the time-saving effect. In another example, the scanning module 10 can perform multiple times of scanning on the document 70 to generate the signal, but the invention is not restricted thereto.
Another original pixel P0 has the red channel value (R=230), the green channel value (G=210), the blue channel value (B=242) and the transmitting light channel value (A=100%). After being processed by the processor 20 of
The above-mentioned processing and judging methods are very simple, do not need the high-end processor and the large-capacity memory, and the cost is further decreased.
In another example, the processor 20 may further perform automatic cropping on the visible light image I1 according to one or multiple right-angle contour portions RC of the transmitting light image IS2 represented by the second signal S2 to obtain a final image file FI′. In still another example, the processor 20 may further process the first signal S1 and the second signal S2 into a composite visible light image file (representative of composite visible light image) and a transmitting light image file (representative of transmitting light image), respectively, and the output port 30 may further output the composite visible light image file and the transmitting light image file to the external device 200. Therefore, the final image file, the composite visible light image file and the transmitting light image file may be outputted and further processed by the external device 200, and the external device 200 may further process the composite visible light image file and the transmitting light image file into another final image file, and judge whether the another final image file matches with the final image file or not. If not, the firmware of the scanner 100 needs to be calibrated or corrected.
With the scanner of the embodiment, the image file including transparency and visible light information can be obtained and generated, the generated file format may be the portable network graphics (PNG) format, the portable document format (PDF) format supporting the layering function or any other file format. After the external device has received the file, the non-physical part corresponding to the document and the part other than the document may change to the color of the background with the change of the color of the background. Therefore, the original contour, hole, damage and the like of the document can be present. On the other hand, the shadow of the document may also be further removed, so that the original contour of the document can be present without distortion.
The specific embodiments proposed in the detailed description of this disclosure are only used to facilitate the description of the technical contents of this disclosure, and do not narrowly limit this disclosure to the above-mentioned embodiments. Various changes of implementations made without departing from the spirit of this disclosure and the scope of the claims are deemed as falling within the following claims.
Number | Date | Country | Kind |
---|---|---|---|
112136160 | Sep 2023 | TW | national |