Document processing device, method of generating preview image and computer program product

A document processing device, a method of processing an image thereof, and a computer program product are disclosed. A set of display area information is preset on the document processing device. When the document processing device receives an input image, a set of reference information corresponding to the input image is obtained. The document processing device adjusts the input image according to the set of display area information and the set of reference information to generate an improved preview image. Because the user does not need to consider the direction in which the document is put into the document processing device, the document processing device directly and automatically generates the preview image that is convenient for the user to view based on the input image, thereby achieving the purpose of improving work efficiency, the convenience in use, and the user experience.

CROSS-REFERENCE TO RELATED APPLICATION

This non-provisional application claims priority under 35 U.S.C. § 119(a) on Patent Application No. 110133495 filed in Taiwan, R.O.C. on Sep. 9, 2021, the entire contents of which are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present disclosure relates to a document processing device, and in particular to a document processing device that automatically adjusts a preview image, a method of processing the image thereof, and a computer program product.

2. Description of the Related Art

With the advent of multi-function devices, not only can paper document printing be provided, but paper document scanning can also be provided, thereby improving the efficiency of paperwork processing.

Referring toFIGS.6to9, the multi-function device90is usually equipped with a display panel91thereon, the display panel91includes a document preview area911and an operating area. The shape of the document preview area911is approximately the size of A4 paper in portrait orientation, and is used to display a preview image of the document (as shown inFIG.7).

Referring toFIGS.6and7at the same time, when a user places a document S in an auto document feeder (ADF)92of the multi-function device90, the user refers to the orientation of the document preview area911because the user fails to know the direction of placing the document in the ADF92, and the long side of the document S is aligned with and placed in the ADF92, resulting in a preview image displayed in the document preview area911rendered horizontally (as shown inFIG.8), and the size of the preview image is smaller than the size of the document preview area911. Also, as shown inFIG.9, even if the preview image is magnified through the operating area, it is prone to offsets and misalignments, which are very inconvenient for the user.

When the above problems occur, the user may choose to remove the document, and then change the orientation of the document and place it back into the ADF, which is a waste of time. Alternatively, because the user doesn't bother to reposition the document, the user chooses to view it with a crooked head, however, it is not only unclear and inconvenient to confirm, but it can also cause cervical discomfort. Therefore, better solutions need to be developed.

BRIEF SUMMARY OF THE INVENTION

In view of the shortcomings of the prior art, an objective of the present disclosure is to provide a document processing device that automatically adjusts a preview image, a method of processing the image thereof, and a computer program product. The present disclosure can provide a suitable preview image for the user to view by automatically adjusting the input image. The user does not need to consider the orientation in which the document is put into the document processing device, since the document processing device of the present disclosure directly and automatically adjusts the preview image, thereby achieving the purpose of improving work efficiency, the convenience in use, and the user experience.

To achieve the above objective and more, the present disclosure provides the aforementioned document processing device, which comprises:

an image input module;

a display module, having a document preview area;

a storage module, storing a set of preset display area information;

a processing module, connected with the image input module, the display module and the storage module;

wherein when the processing module receives an input image through the image input module, a set of reference information is obtained according to the input image; the processing module adjusts the input image according to the set of display area information and the set of reference information to generate a better preview image.

To achieve the objective and more, the present disclosure provides a method of processing an image of the aforementioned document processing device, executed on the document processing device, the method comprising:

presetting a set of display area information;

obtaining a set of reference information of an input image when receiving the input image; and

adjusting the input image according to the set of display area information and the set of reference information to generate an improved preview image.

To achieve the objective and more, the present disclosure further provides a computer program product, and when the computer program product is executed on the document processing device, the document processing device executes the method of processing an image of the document processing device.

According to the above content, in use, the user does not need to consider the orientation in which the document is put into the document processing device, the document processing device directly and automatically adjusts to generate and display an improved preview image for the user to view and confirm based on the input image, thereby achieving the purpose of improving work efficiency, the convenience in use, and the user experience.

DETAILED DESCRIPTION OF THE INVENTION

Refer toFIG.1, which shows a document processing device that automatically adjusts a preview image according to a preferable embodiment of the present disclosure. The document processing device comprises an image input module11, a storage module12, a display module13and a processing module14, wherein the processing module14is respectively connected with the image input module11, the storage module12, and the display module13. In an embodiment, the document processing device is a multi-function product/printer/peripheral (MFP).

Referring toFIG.1, in an embodiment, the image input module11may be a scanning module used to obtain more than one input image. The image input module11may further comprise an auto document feeder (ADF) (not shown in the drawing) to connect with the scanning module.

Referring toFIG.1, in an embodiment, the storage module12is used to store the data/information that is received, the relevant data/information to be processed, the relevant data/information that has been processed, etc. Specifically, the storage module12may be a memory, for example but not limited to non-volatile memory, dynamic random access memory (DRAM), flash memory, a high disk drive (HDD) or a solid-state drive/solid-state disk (SSD), etc.

Referring toFIGS.1and3, in an embodiment, the display module13is used to display relevant data/information or an image. The display module13may be a touch display and is provided with a document preview area131and an operating area132. The document preview area131is used to display data/information or an image. The operating area132is used for operation, wherein the shape of the document preview area131is approximately the shape of, for example, A4 paper, and comprises two corresponding first long sides L1and two corresponding first short sides W1. The area of the document preview area131is defined by the range around the first long sides L1and the first short sides W1.

Referring toFIG.1, in an embodiment, the processing module14is used to process the data/information that is received, the data/information that is stored in the storage module12, etc. Specifically, referring toFIG.2at the same time, the processing module14comprises a central processor141and an image processor142that are connected with each other. The central processor141is used to process the relevant data/information, or the relevant image information after processed by the image processor142. The image processor142is used to carry out the relevant image processing for the input image. The central processor141is a central processing unit (CPU). The image processor142is an application specific integrated circuit (ASIC).

Referring toFIG.1, in an embodiment, the document processing device further comprises a printing module15, which is connected to the processing module14. The printing module15is driven by the central processor141to output the input image.

Referring toFIGS.2and3, when the document processing device of the present disclosure receives an input image and detects that the input image needs to be adjusted, the input image is automatically adjusted and a preview image of the automatically adjusted input image is displayed to facilitate the user to view. The following describes how the document processing device of the present disclosure automatically adjusts the preview image of the input image to facilitate the user to view the content.

Referring toFIGS.2and4, specifically, a method of processing image of a document processing device that automatically adjusts the preview image is executed in the document processing device of the present disclosure, which comprises multiple steps, wherein the first step S31is that the central processor141of the processing module14presets a set of display area information.

Referring toFIGS.2and3, the central processor141of the processing module14presets a set of display area information according to the document preview area131of the display module13, and stored in the storage module12. The set of display area information comprises a set of first long side information, a set of first short side information, a set of first area dimension information, and a set of first pixel information.

The set of first long side information comprises a length information, a position information and a direction information of the first long sides L1.

The set of first short side information comprises a length information, a position information and a direction information of the first short sides W1.

The set of first area dimension information comprises an area dimension information of the document preview area131.

The set of first pixel information comprises the relevant information of multiple first pixels.

In an embodiment, after step S31is executed the first time, the set of display area information can be used directly afterwards without having to be preset at each execution. In addition, step S31can also be re-executed at each execution to improve the accuracy of the set of display area information obtained.

Referring toFIGS.2and4, after the central processor141presets and completes the set of display area information, the second step S32is successively executed, wherein the second step S32is that when the image input module11receives an input image, the central processor141of the processing module14obtains a set of reference information of the input image.

Referring toFIGS.2and5, the set of reference information comprises a set of second long side information, a set of second short side information, a set of second area dimension information, and a set of second pixel information that correspond to the input image. The input image comprises two corresponding second long sides L2and two corresponding second short sides W2, and the area of the input image is defined by the range around the second long sides L2and the second short sides W2.

The set of second long side information comprises a length information, a position information and a direction information of the second long sides L2.

The set of second short side information comprises a length information, a position information and a direction information of the first short sides W2.

The set of second area dimension information comprises an area dimension information of the input image.

The set of second pixel information comprises multiple second pixel relevant information of the input image (black and white blocks as indicated inFIG.5).

In addition, inFIG.5, the pixels marked A (the black blocks indicated inFIG.5) are multiple selected pixels A, and the relevant information of the first and second pixels mentioned above may comprises color information or position information, the specific application of which is described later.

After the reference information of the input image is obtained, referring toFIGS.2and4, the central processor141of the processing module14successively executes the third step. The third step S33is that the central processor141of the processing module14adjusts the input image to generate an improved preview image according to the set of display area information and the set of reference information.

Specifically, the central processor141of the processing module14detects a long side position of the input image according to the set of display area information and the set of reference information. When the central processor141determines that the input image needs to be adjusted according to the detected long side position, the central processor141correspondingly adjusts the input image and generates the improved preview image. Conversely, when the central processor141determines that the input image does not need to be adjusted, it directly drives the display module13to display the preview image of the input image on the document preview area131.

Referring toFIGS.2and4, the central processor141determines whether the position information or direction information in the set of first long side information corresponds according to the position information or direction information in the set of second long side information, in order to detect the long side position of the input image. When the central processor141determines the position information or direction information in the set of second long side information fails to correspond to the position information or direction information in the set of first long side information, the central processor141determines that the input image is to be adjusted.

When the central processor141determines that the input image needs to be adjusted, the central processor141carries out an image rotation processing for the input image according to the first long side information and the first pixel information in the set of display area information, as well as the second long side information and the second pixel information in the set of reference information, in order to adjust the second long side L2(as shown inFIG.5) of the input image to correspond to the first long side L1of the document preview area131(as shown inFIG.3) to generate the improved preview image.

When the improved preview image is generated, the central processor141drives the display module13to display the improved preview image (the preview image of the adjusted input image) in the document preview area131, thereby achieving an accurate adjustment of the input image to a better preview image that is suitable for preview and matches the document preview area131.

In an embodiment, when the central processor141carries out the image rotation processing for the input image, each pixel in the set of second pixel information is stored in the storage module12in sequence, and then pixels of the corresponding second pixel information are taken out in sequence according to the position of each pixel in the set of first pixel information, in order to complete the rotation of the input image.

In addition to the image rotation processing carried out according to the second long side L2of the input image and the first long side L1of the document preview area131, the image rotation processing can also be carried out according to the second short side W2of the input image and the first short side W1of the document preview area131. Because the content of image rotation processing according to the short side is the same as that of image rotation processing according to the long side, it is not detailed herein for the simplicity of the specification.

Further, in order to improve the speed and efficiency of the central processor141carrying out the image rotation processing, the image processor142first carries out an image thumbnail processing for the input image to generate an input image thumbnail. The central processor141then executes the image rotation processing according to the input image after the thumbnail is generated.

The method of the image processor142carrying out the image thumbnail processing for the input image is shown asFIGS.2and5. Based on the second pixel information in the set of reference information, the image processor142uses an interval point-taking algorithm to select the selected pixels A which are separated with each other (black blocks as indicated in the drawing). The image processor142generates the input image thumbnail according to the selected pixels A. By reducing the proportion of the input image, the processing efficiency and speed of the rotation of the input image after the thumbnail is generated can be improved.

In an embodiment, the method of using the interval point-taking algorithm to obtain the selected pixels A may select from the left side to the right side (direction in the drawing), or the right side to the left side, or from the upper side to the lower side, or from the lower side to the upper side of the input image, and in the form of interval spacing. InFIG.5, the example of from the upper side to the lower side is illustrated, but not limited to herein.

Referring toFIGS.2and3, after the user confirms that there is no problem with the content according to the preview image of the input image displayed in the document preview area131of the display module13, the user can input a printing instruction by operating the operating area132of the display module13, and the central processor141of the processing module14drives the printing module15to output the input image according to the printing instruction.

In addition, in further embodiments, according to one or more of the above embodiments of the method of processing an image of the document processing device that automatically adjusts the preview image, a computer program product including a non-transitory storage medium having program instructions stored thereon can be provided, and when the program instructions of the computer program product are executed on the document processing device of the present disclosure, the document processing device of the present disclosure executes the method of processing an image of the document processing device that automatically adjusts the preview image. Non-transitory storage media can include, but not limited to, read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash memory, and so on.

According to the above content, in use, because the user does not need to consider the direction in which the document is put into the document processing device, the document processing device of the present disclosure directly and automatically adjusts to generate and display an improved preview image for the user to view and confirm based on the input image, thereby achieving the purpose of improving work efficiency, the convenience in use, and the user experience.