Image processing device and system, and computer readable medium therefor

An image processing device is configured to detect allocation areas from template data, specify a position of each detected allocation area on the template data with respect to a first standard, provide an area identification to each allocation area based on the specified position of each allocation area, acquire image data based on document sheets set thereon, extract document images from the acquired image data, specify a location of each extracted document image on the acquired image data with respect to a second standard, provide an image identification to each document image based on the specified location of each document image, identify an allocation area corresponding to each document image based on the image identifications and the area identifications, edit each document image to be allocated in the corresponding allocation area, generate composite data with the edited document images allocated in the respective allocation areas, and output the composite data.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority under 35 U.S.C. §119 from Japanese Patent Application No. 2009-043466 filed on Feb. 26, 2009. The entire subject matter of the application is incorporated herein by reference.

BACKGROUND

1. Technical Field

The following description relates to one or more image processing techniques for generating and outputting composite image data.

2. Related Art

An image processing device has been known which provides a user with composite image data on which images based on a plurality of document sheets are allocated in predetermined areas designated by the user. More specifically, the image processing device reads the plurality of document sheets on a page-by-page basis, and combines the images based on the read document sheets to be allocated in the user-designated areas.

SUMMARY

According to such an image processing device, when combining the images based on the plurality of document sheets into a single piece of data, the user has to perform operations of “reading a document sheet” and “designating an area where a read image is to be allocated” for each of the document sheets. Namely, the above technique requires the user to perform the troublesome operations for each of the document sheets.

Aspects of the present invention are advantageous to provide one or more improved techniques that make it possible to obtain, in a user-friendly manner, a single piece of output data that has images based on a plurality of document sheets combined therein.

According to aspects of the present invention, an image processing device is provided which is configured to generate and output composite data in which two or more document images are combined. The image processing device includes an area detecting unit configured to detect allocation areas from template data that defines the allocation areas where the document images are to be allocated on the composite data, respectively, an area position specifying unit configured to specify a position of each of the detected allocation areas with respect to a first standard for defining a position on the template data, an area identification providing unit configured to provide an area identification to each of the allocation areas based on the specified position of each of the allocation areas, an image acquiring unit configured to acquire image data based on document sheets set thereon on which the document images to be combined are formed, an image extracting unit configured to extract the document images from the acquired image data, an image location specifying unit configured to specify a location of each of the extracted document images with respect to a second standard for defining a location on the acquired image data, an image identification providing unit configured to provide an image identification to each of the document images based on the specified location of each of the document images, an allocation area identifying unit configured to identify an allocation area corresponding to each of the document images based on the image identifications and the area identifications, an image editing unit configured to edit each of the document images so as to be allocated in the corresponding one of the allocation areas that is identified by the allocation area identifying unit, a composite data generating unit configured to generate the composite data in which the edited document images are allocated in the respective allocation areas, and an output unit configured to output the composite data generated by the composite data generating unit.

In some aspects of the present invention, the image processing device configured as above makes it possible to reduce a burden placed on a user to obtain output data with document images based on a plurality of document sheets combined therein. Further, the image processing device can present output data in which the document images are combined in a user-desired manner when the user sets the plurality of document sheets in consideration of the first standard and the second standard.

According to aspects of the present invention, further provided is an image processing system configured to generate and output composite data in which two or more document images are combined. The image processing system includes an area detecting unit configured to detect allocation areas from template data that defines the allocation areas where the document images are to be allocated on the composite data, respectively, an area position specifying unit configured to specify a position of each of the detected allocation areas with respect to a first standard for defining a position on the template data, an area identification providing unit configured to provide an area identification to each of the allocation areas based on the specified position of each of the allocation areas, an image acquiring unit configured to acquire image data based on document sheets set thereon on which the document images to be combined are formed, an image extracting unit configured to extract the document images from the acquired image data, an image location specifying unit configured to specify a location of each of the extracted document images with respect to a second standard for defining a location on the acquired image data, an image identification providing unit configured to provide an image identification to each of the document images based on the specified location of each of the document images, an allocation area identifying unit configured to identify an allocation area corresponding to each of the document images based on the image identifications and the area identifications, an image editing unit configured to edit each of the document images so as to be allocated in the corresponding one of the allocation areas that is identified by the allocation area identifying unit, a composite data generating unit configured to generate the composite data in which the edited document images are allocated in the respective allocation areas, and an output unit configured to output the composite data generated by the composite data generating unit.

In some aspects of the present invention, the image processing system configured as above can provide the same effects as the aforementioned image processing device.

According to aspects of the present invention, further provided is a computer readable medium having computer readable instructions stored thereon for generating and outputting composite data in which two or more document images are combined. The instructions, when executed by a processor having an image acquiring unit, cause the processor to perform an area detecting step of detecting allocation areas from template data that defines the allocation areas where the document images are to be allocated on the composite data, respectively, an area position specifying step of specifying a position of each of the detected allocation areas with respect to a first standard for defining a position on the template data, an area identification providing step of providing an area identification to each of the allocation areas based on the specified position of each of the allocation areas, an image acquiring step of acquiring image data based on document sheets set on the image acquiring unit, the document sheets having thereon the document images to be combined, an image extracting step of extracting the document images from the acquired image data, an image location specifying step of specifying a location of each of the extracted document images with respect to a second standard for defining a location on the acquired image data, an image identification providing step of providing an image identification to each of the document images based on the specified location of each of the document images, an allocation area identifying step of identifying an allocation area corresponding to each of the document images based on the image identifications and the area identifications, an image editing step of editing each of the document images so as to be allocated in the corresponding one of the allocation areas that is identified in the allocation area identifying step, a composite data generating step of generating the composite data in which the edited document images are allocated in the respective allocation areas, and an output step of outputting the composite data generated in the composite data generating step.

In some aspects of the present invention, the computer readable medium configured as above can provide the same effects as the aforementioned image processing device.

DETAILED DESCRIPTION

It is noted that various connections are set forth between elements in the following description. It is noted that these connections in general and, unless specified otherwise, may be direct or indirect and that this specification is not intended to be limiting in this respect. Aspects of the invention may be implemented in computer software as programs storable on computer-readable media including but not limited to RAMs, ROMs, flash memories, EEPROMs, CD-media, DVD-media, temporary storage, hard disk drives, floppy drives, permanent storage, and the like.

Hereinafter, embodiments according to aspects of the present invention will be described with reference to the accompany drawings.

First Embodiment

As illustrated inFIG. 1, a printing system1of a first embodiment is configured with a computer10and a multi-function peripheral (MFP)30. The computer10is connected with the MFP30so as to exchange data (e.g., scanned data70) therebetween.

Initially, a detailed explanation will be provided about a configuration of the computer10with reference toFIG. 1. As shown inFIG. 1, the computer10includes a controller11.

The controller11is configured with a CPU12, a ROM13, and a RAM14. The CPU12is a central processing unit configured to take overall control of the computer10. The ROM13stores data and control programs required for controlling the computer10. The RAM14is configured to temporarily store results of arithmetic operations performed by the CPU12using the control programs.

The computer10is provided with a storage unit (e.g., an HDD)15. The storage unit15is connected with the controller11. The storage unit15stores application programs16. The application programs16contain a below-mentioned control program (seeFIG. 2), a document creating program, and a spread sheet program.

Further, the computer10has a mouse23, a keyboard24, and a display unit25. The mouse23and the keyboard24are linked with the controller11via an input interface (I/F)20. Hence, a user can cause the controller11to perform a desired process by operating the mouse23and/or the keyboard24.

The display unit25is connected with the controller11via an output I/F21. Accordingly, the display unit25can display thereon various kinds of screen images on the basis of control by the controller11.

In addition, the computer10is provided with a network I/F22. The computer10is connected with the MFP30via the network I/F22. The network I/F22is configured to take control of data communication between the computer10and the MFP30.

Subsequently, a detailed explanation will be provided about a configuration of the MFP30with reference toFIG. 1. The MFP30has a controller31. The controller31is configured with a CPU32, a ROM33, and a RAM34. The CPU32is a central processing unit configured to take overall control of the MFP30. The ROM33stores data and programs required for controlling the MFP30. The RAM34is configured to temporarily store results of arithmetic operations performed by the CPU32using the programs.

The MFP30is provided with a scanning unit35, a printing unit36, and a facsimile unit37. As can be understood from an external view of the MFP30shown inFIG. 1, the scanning unit35has a flatbed and a carriage.

The flatbed is configured with optically-transparent material (e.g., glass). On the flatbed, a document sheet is placed. In addition, the flatbed has such a size that an A3-sized sheet can be placed thereon. Thus, the user can place a plurality of document sheets simultaneously on the flatbed.

The carriage has a light source configured to emit light to a document sheet placed on the flatbed. The light, emitted by the light source of the carriage, is reflected by the document sheet on the flatbed, and used for taking an image with an imaging device. The imaging device has a plurality of image pickup elements (e.g., CCDs), and constitutes the scanning unit35.

Accordingly, when a plurality of document sheets are placed on the flatbed, the MFP30controls the scanning unit35to acquire scanned data70as shown inFIGS. 8 and 9. The scanned data70contains a plurality of document images75based on the document sheets on the flatbed.

The printing unit36is configured to print an image based on input print data on a sheet under control by the controller31.

The facsimile unit37is configured to perform facsimile transmission to a predetermined destination device under control by the controller31.

The MFP30is provided with a display panel38and a keypad39. The display panel38is configured to display various kinds of information under control by the controller31. The keypad39is used for various operations by the user.

Further, the MFP30includes a network I/F40, and a PSTN I/F41. The network I/F40is employed for data communication between the MFP30and the computer10. The PSTN I/F41is used for telephone communication via a public switched telephone line network.

Next, a control program will be set forth with reference to a flowchart inFIG. 2, which shows a procedure of the control program to be executed by the controller11.

The following description will be provided under an assumption that template data50has already been set as data to be processed. The template data50can be created using a corresponding one of the application programs16(e.g., the document creating program). In this case, while creating a text, the user secures areas (allocation areas55), on a single page, where the user wishes to allocate data of other document sheets, using rectangular graphics (seeFIG. 4). Thus, when a printed sheet is output on which data of a plurality of document sheets is incorporated, the template data50has a plurality of allocation areas55.

In S1, the controller11detects allocation areas55in the template data50as set (S1). Specifically, based on an orthogonal coordinate system with a left upper end of the template data50defined as a template origin51, the controller11detects allocation areas55in the template data50. Then, after detection of the allocation areas55, the controller11stores, onto the RAM14, positional information that indicates positions of the allocation areas55on the template data50.

As illustrated inFIG. 4, the template data50has a plurality of allocation areas55secured by rectangular graphics. Each side of each rectangular graphic used for securing the allocation areas55constitutes an area boundary57. Thus, by detecting the area boundaries57, it is possible to detect the allocation areas55in the template data50.

Further, as shown inFIG. 4, the orthogonal coordinate system of the template data50is defined by an X-axis that extends horizontally in the right direction from the template origin51and a Y-axis that extends vertically downward from the template origin51. Each of the rectangular allocation areas55has area reference coordinates56, which are coordinates of a left upper end of a corresponding allocation area55in the orthogonal coordinate system of the template data50. Namely, the area reference coordinates56represent a position of the corresponding allocation area55. Information on the area reference coordinates56is contained in the positional information stored in S1. In addition, the positional information contains information on shapes and sizes of the allocation areas55as well.

In S2, the controller11executes an area identification providing program (seeFIG. 3) to provide an area identification to each of the detected allocation areas55(S2). The area identification providing program will be described in detail below with reference toFIG. 3.

In the area identification providing program, the controller11initially acquires the area reference coordinates56of each of the allocation areas55that exist in the template data50(S21). Specifically, the controller11reads the positional information of each of the allocation areas55out of the RAM14, and acquires the area reference coordinates56of each of the allocation areas55.

Subsequently, the controller11calculates an origin distance D of each of the allocation areas55(S22). Specifically, the controller11calculates the origin distance D based on the area reference coordinates56of each of the allocation areas55and the coordinates of the template origin51, and stores onto the RAM14information representing the origin distance D of each of the allocation areas55. It is noted that the origin distance D is defined as a distance from the template origin51to the area reference coordinates56of a corresponding allocation area55.

Next, the controller11sets a value of a counter T to zero (S23). It is noted that the value of the counter T indicates the number of the allocation areas55with the respective area identifications provided thereto.

Thereafter, the controller11determines whether the value of the counter T has become equal to the number of the allocation areas M (S24). Specifically, the controller11determines whether the area identification is provided to every allocation area55in the template data50. When determining that the value of the counter T has become equal to the number of the allocation areas M (S24: Yes), the controller11terminates the area identification providing program. Meanwhile, when determining that the value of the counter T has not become equal to the number of the allocation areas M (S24: No), the controller11goes to S25.

In S25, the controller11specifies a target allocation area from the allocation areas55included in the template data50(S25). The target allocation area denotes a target one, of the allocation areas55, to which the area identification is to be provided.

Specifically, the controller11reads, out of the RAM14, the origin distances D of allocation areas55to which the area identifications have not yet been provided, and identifies, as a target allocation area, an allocation area55associated with the shortest origin distance D.

In the example shown inFIG. 4, a first allocation area (i.e., the allocation area55placed in a left middle position of the template data50), which has the shortest origin distance D, is specified as a target allocation area. Further, in the later-executed steps S25, the controller11sequentially identifies, as target allocation areas, a second allocation area and a third allocation area in the cited order based on the lengths of the origin distances D of the other allocation areas55. It is noted that the second allocation area is the allocation area55placed in a right upper position of the template data50inFIG. 4. The third allocation area is the allocation area is the allocation area55placed in a right lower position of the template data50inFIG. 4.

When there are a plurality of allocation areas55that have an identical origin distance D, the controller11identifies, as a target allocation area, one of the plural allocation areas55that has the smallest X-coordinate of the area reference coordinates56. Further, when there are a plurality of allocation areas55that have an identical origin distance D and an identical X-coordinate of the area reference coordinates56, the controller11identifies, as a target allocation area, one of the plural allocation areas55that has the smallest Y-coordinate of the area reference coordinates56.

In S26, the controller11provides the target allocation area with a corresponding area identification (S26). The area identifications are sequentially provided as identification numbers in the order from “1.”

In the example shown inFIG. 4, in S26, the controller11provides the first allocation area with the area identification of “the identification number: 1.” In the later-executed steps S26, the controller11provides the second allocation area with the area identification of “the identification number: 2,” and provides the third allocation area with the area identification of “the identification number: 3.”

In S27, the controller11increments the value of the counter T by one (S27). Thereafter, the controller11goes back to S24to provide unprocessed allocation areas55with the respective area identifications.

As illustrated inFIG. 2, after providing all of the allocation areas55in the template data50with the respective area identifications in S2, the controller11displays a document set guide screen60on the display unit25(S3).

A detailed explanation will be given about the document set guide screen60to be displayed on the display unit25with reference to the relevant figures.FIGS. 5 and 6exemplify document set guide screens60.

As illustrated in each ofFIGS. 5 and 6, the document set guide screen60includes one or more set position informing images61, a display orientation informing image62, template orientation informing images63, one or more set orientation informing images64, and a message display portion65.

Each set position informing image61indicates a set position of a document sheet that the user wishes to allocate in a corresponding allocation area55. The set position means a position where the document sheet is to be set on the flatbed of the scanning unit35. The set position informing image61is created based on the template data50and the positional information of each allocation area55stored in S1.

In addition, each set position informing image61is displayed with a thick boarder line, and the inner area therein is shown with a color different from colors for the other regions on the document set guide screen60(seeFIGS. 5 and 6). Accordingly, the user can exactly grasp the set position corresponding to each of the allocation areas55in the template data55, based on the document set guide screen60.

The display orientation informing image62indicates a positional relationship between a flatbed schematically shown on the document set guide screen60and the actual flatbed of the MFP30. Specifically, on the document set guide screen60, characters “Near Side” is shown in a position corresponding to the display panel38of the MFP30. Thereby, the user can exactly grasp the positional relationship of information on the document set guide screen60with the actual MFP30.

The template orientation informing images63indicate the upside/downside of the template data50. The template orientation informing images63are generated based on format information included in the template data50. Thereby, the user can grasp the upside/downside directions of the template data50based on the template orientation informing images63. Thus, the user can acquire a desired output result as exactly understanding a relationship between an orientation of a document sheet to be set on the flatbed and the orientation of the template data50.

Each set orientation informing image64indicates the upside of a corresponding document sheet to be set in a set position. A direction indicated by each set orientation informing image64is consistent with directions indicated by the template orientation informing images63. Thus, the user can acquire a desired output result as exactly grasping a relationship between an orientation of a corresponding document sheet to be set in each set position and the orientation of the template data50.

The message display portion65displays a message that the user should set a desired document sheet in a set position indicated by each set position informing image61. In addition, the message display portion65displays a message that data of the document sheets set in the respective set positions is to be incorporated in the respective allocation areas55.

The template data50is classified into two types, i.e., a vertically-long document type and a horizontally-long document type. The vertically-long document type of template data50is template data50to be output on a sheet (e.g., an A4-sized sheet) with longer sides thereof oriented in an up-down direction of output data. Meanwhile, the horizontally-long document type of template data50is template data50to be output on a sheet with shorter sides thereof oriented in an up-down direction of output data.

In S3, the controller11determines based on the format information of the template data50whether the template data50is of the vertically-long document type or the horizontally-long document type. Then, as shown inFIGS. 5 and 6, the controller11changes a display manner in which the document set guide screen60is displayed, depending on the type of the template data50.

Specifically, the controller11changes display manners (e.g., display positions and display information) in which the template orientation informing images63and the set orientation informing images64are displayed (seeFIGS. 5 and 6), depending on the type (the vertically-long document type or the horizontally-long document type) of the template data50. Thus, the user can exactly acquire an output printed in a desired manner by setting document sheets in the respective set positions in accordance with the information provided by the template orientation informing images63and the set orientation informing images64.

In response to the document set guide screen60being displayed in S3, the user sets a plurality of document sheets on the scanning unit35while confirming the information displayed on the document set guide screen60.

In S4, the controller11determines whether a scan execution operation has been performed to start a scanning operation (S4). The scan execution operation may be performed, for instance, through the keyboard24. When determining that the scan execution operation has been performed (S4: Yes), the controller11goes to S5. Meanwhile, when determining that the scan execution operation has not been performed (S4: No), the controller11waits for the scan execution operation to be performed.

In S5, the controller11instructs the controller31of the NWT30to scan the document sheets set on the scanning unit35(S5). Specifically, the controller11instructs the MFP30to perform auto-crop scanning of the document sheets set on the scanning unit35.

In response to the instruction for the auto-crop scanning, the controller31of the MFP30controls the scanning unit35to generate scanned data70that contains images of the document sheets set in the set positions (seeFIGS. 8 and 9). After that, the controller31detects a document image75of each of the document sheets contained in the scanned data70generated. At this time, the controller31detects each of the document images75by implementing edge detection for document image boundaries77. The document image boundaries77indicate boundaries of the document images75. Then, the controller31extracts the detected document images75from the scanned data70.

At this time, the controller31provides each of the document images75with image location information. The image location information includes the size of the scanned data70and information representing respective locations of the document images75in the scanned data70.

In S6, the controller11acquires image data of each of the document images75contained in the scanned data70generated in S5(S6). Namely, the controller11requests, from the MFP30, the scanned data70generated in S5(more specifically, the image data of each of the document images75contained in the scanned data70). In response to receipt of the scanned data70(i.e., the image data of each of the document images75in the scanned data70) from the MFP30, the controller11stores the scanned data70onto the RAM14.

In response to acceptance of the request for the scanned data70, the controller31of the MFP30transmits the scanned data70generated in S5. Specifically, the controller31transmits, to the computer10, the image data of each of the document images75and the image location information corresponding to each of the document images75.

In S7, the controller11executes an image identification providing program (seeFIG. 7) to provide an image identification to each of the document images75contained in the scanned data70acquired in S6(S7).

The image identification providing program will be described in detail with reference to a flowchart inFIG. 7, which shows a procedure of the image identification providing program.

Initially, the controller11reads, out of the RAM14, the scanned data70(i.e., the image data of each of the document images75) acquired in S6(S31). Then, based on the image location information of each of the document images75, the controller11reproduces the location of each of the document images75in the scanned data70.

It is noted that unlike the scanned data70as originally generated by the scanning unit35, the scanned data70read out in S31does not include any plane image corresponding to a blank space other than the document images75. Namely, the scanned data70read out in S31represents image data of each of the document images75and a positional relationship among the document images75in the scanned data70as originally generated.

Subsequently, the controller11determines whether the currently-set template data50is of the vertically-long document type (S32). Specifically, based on the format information of the template data50, the controller11makes the determination of S32. When determining that the currently-set template data50is of the vertically-long document type (S32: Yes), the controller11goes to S35. Meanwhile, when determining that the currently-set template data50is not of the vertically-long document type (S32: No), the controller11goes to S33.

Initially, an explanation will be provided about steps (S33and S34) to be executed when the template data50is of the horizontally-long document type, with reference toFIG. 8.

In S33, the controller11acquires image location coordinates76of each of the document images75(S33). To describe more concretely, the controller11firstly sets orthogonal coordinate system that has a scan origin71of the scanned data70(as originally generated) defined as an origin. The scan origin71represents an initial pixel acquired during document scanning by the scanning unit35, and corresponds to a left upper point of the scanned data70inFIG. 8.

As illustrated inFIG. 8, the controller11sets the scan origin71as a calculation coordinate origin72, and sets an X-axis and a Y-axis with respect to the calculation coordinate origin72. The X-axis is a measure for defining a position relative to the calculation coordinate origin72in the horizontal direction (the right direction inFIG. 8). The Y-axis is a measure for defining a position relative to the calculation coordinate origin72in the vertical direction (the downward direction inFIG. 8).

Thereafter, based on the orthogonal coordinate system as set (seeFIG. 8) and the positional information of each of the document images75, the controller11acquires the image location coordinates76of each of the document images75, and stores onto the RAM14information representing the image location coordinates76of each of the document images75. It is noted that the image location coordinates76represent a left upper position of each of the document images75in the scanned data70.

In S34, the controller11calculates an allocation reference distance L of each of the document images75(S34). Specifically, based on the orthogonal coordinate system shown inFIG. 8and the image location coordinates76, the controller11calculates the allocation reference distance L of each of the document images75, and stores onto the RAM14the allocation reference distance L of each of the document images75. It is noted that the allocation reference distance L represents a distance between the calculation coordinate origin72and the point of the image location coordinates76of a document image75.

Subsequently, an explanation will be provided about steps (S35to S37) to be executed when the template data50is of the vertically-long document type, referring toFIG. 9.

In S35, the controller11acquires image location coordinates76of each of the document images75(S35). Specifically, the controller11first sets an orthogonal coordinate system for the scanned data70in the same manner as S33. It is noted that the orthogonal coordinate system in this case is different from that set in S33.

To describe more concretely, in S35, the controller11sets the orthogonal coordinate system in which not the scan origin71but a left upper point of the scanned data70is defined as a calculation coordinate origin72. In this case, an X-axis is set to extend upward from the calculation coordinate origin72(seeFIG. 9). A Y-axis is set to extend rightward from the calculation coordinate origin72. Namely, in S35, the controller11sets the orthogonal coordinate system in a state where the orthogonal coordinate system of S33is rotated counterclockwise by an angle of 90 degrees.

Thereafter, based on the orthogonal coordinate system as set (seeFIG. 9) and the positional information of each of the document images75, the controller11acquires the image location coordinates76of each of the document images75, and stores onto the RAM14information representing the image location coordinates76of each of the document images75. It is noted that the image location coordinates76represent a left lower position of each of the document images75in the scanned data70.

In S36, the controller11calculates an allocation reference distance L of each of the document images75(S36). Specifically, based on the orthogonal coordinate system shown inFIG. 9and the image location coordinates76, the controller11calculates the allocation reference distance L of each of the document images75, and stores onto the RAM14the allocation reference distance L of each of the document images75.

In S37, the controller11rotates the scanned data70clockwise by an angle of 90 degrees (S37). Specifically, the controller11rotates all of the document images75contained in the scanned data70clockwise by 90 degrees. Thereby, the orientation of the document images75is rendered identical to the orientation of the template data50of the vertically-long document type.

In S38, the controller11sets a value of a counter I to zero (S38). It is noted that the value of the counter I indicates the number of the document images75with the respective image identifications provided thereto.

In S39, the counter11determines whether the value of the counter I has become equal to the number of the document images N (S39). Namely, the controller11determines whether the image identification is provided to every document image75in the scanned data70. When determining that the value of the counter I has become equal to the number of the document images N (S39: Yes), the controller11terminates the image identification providing program. Meanwhile, when determining that the value of the counter I has not yet become equal to the number of the document images N (S39: No), the controller11goes to S40.

In S40, the controller11specifies a target document image from the document images75contained in the scanned data70. The target document image denotes a target one, of the document images75, to which the image identification is to be provided.

Specifically, the controller11reads, out of the RAM14, the allocation reference distances L of document images75to which the image identifications have not yet been provided, and identifies, as a target document image, a document image75associated with the shortest allocation reference distance L.

In the example shown inFIG. 8, a document image75of “landscape,” which has the shortest allocation reference distance L, is specified as a target document image. Further, in the later-executed steps S40, the controller11sequentially identifies, as target document images, a document image75of “flower” and a document image75of “portrait” in the cited order based on the allocation reference distances L of the other document images75. Additionally, in the example shown inFIG. 9as well, the controller11sequentially identifies, as target document images, a document image75of “landscape,” a document image75of “flower,” and a document image75of “portrait” in the cited order based on the allocation reference distances L.

When there are a plurality of document images75that have an identical allocation reference distance L, the controller11identifies, as a target document image, one of the plural document images75that has the smallest X-coordinate of the image location coordinates76. Further, when there are a plurality of document images75that have an identical allocation reference distance L and an identical X-coordinate of the image location coordinates76, the controller11identifies, as a target document image, one of the plural document images75that has the smallest Y-coordinate of the image location coordinates76.

In S41, the controller11provides the target document image with a corresponding image identification (S41). The image identifications are sequentially provided as identification numbers in the order from “1,” in the same manner as the area identifications.

In the example shown inFIG. 8, in S41, the controller11provides the document image75of “landscape” with the image identification of “the identification number: 1.” In the later-executed steps S41, the controller11provides the document image75of “flower” with the image identification of “the identification number: 2,” and provides the document image of “portrait” with the image identification of “the identification number: 3.” The length order of the allocation reference distances L in the example shown inFIG. 8applies to the example shown inFIG. 9as well. Therefore, in the example shown inFIG. 9, the controller11provides the document images75with the respective image identifications, in the same manner as the example shown inFIG. 8.

In S42, the controller11increments the value of the counter I by one (S42). Thereafter, the controller11provides unprocessed document images75with the respective image identifications.

Referring back toFIG. 2, after providing each of the document images75contained in the scanned data70with the image identification, the controller11goes to S8. In S8, the controller11determines whether the controller11has completely performed the processes of detecting every allocation area55in the template data50and detecting every document image75in the scanned data70(S8). When determining that the controller11has completely performed the processes of detecting every allocation area55in the template data50and detecting every document image75in the scanned data70(S8: Yes), the controller11advances to S9. Meanwhile, when determining that the controller11has not completely performed the processes of detecting every allocation area55in the template data50and detecting every document image75in the scanned data70(S8: No), the controller11goes back to S1.

In S9, the controller11determines whether the number of the document images N has become equal to the number of the allocation areas M (S9). When determining that the number of the document images N has become equal to the number of the allocation areas M (S9: Yes), the controller11goes to S10. Meanwhile, when determining that the number of the document images N has not yet become equal to the number of the allocation areas M (S9: No), the controller11goes to S16.

In S10, the controller11sets a value of a counter A to zero (S10). The value of the counter A denotes the number of the document images75allocated and combined in the respective allocation areas55.

In S11, the controller11determines whether the value of the counter A has become equal to the number of the document images N (S11). Namely, the controller11determines whether every document image75is allocated and combined in a corresponding one of the allocation areas55. When determining that the value of the counter A has become equal to the number of the document images N (S11: Yes), the controller11goes to S15. Meanwhile, when determining that the value of the counter A has not become equal to the number of the document images N (S11: No), the controller11goes to S12.

In S12, the controller11edits an object document image (S12). Specifically, the controller11first specifies, as an object document image, one of the document images75contained in the scanned data70that has the smallest one of the identification numbers for the image identifications. The object document image denotes a document image to be processed in S12and S13.

Next, based on the image identification of the object document image and the area identification of each allocation area55, the controller11specifies an allocation area55, in the template data50, which corresponds to the object document image. Specifically, the controller11identifies, as an allocation area55corresponding to the object document image, an allocation area55that has an identification number identical to an identification number of the object document image.

Then, the controller11reads, out of the RAM14, the positional information of the allocation area55corresponding to the object document image. Thereafter, in accordance with the read positional information of the allocation area55, the controller11edits the object document image. More specifically, the controller11edits the object document image in accordance with the size and the shape of the allocation area55corresponding to the object document image. The editing of the object document image includes enlarging, reducing, and trimming of the object document image.

In S13, the controller11combines the edited object document image to be allocated in the allocation area55corresponding to the object document image (S13).

Then, the controller11proceeds to S14, in which the controller11increments the value of the counter A by one (S14). Thereby, in the later-executed steps S12and S13, the controller11edits a next object document image (e.g., a document image75of “the identification number: 2”), and combines the next object document image to be allocated in an allocation area55corresponding to the next object document image.

In S15to be executed when the value of the counter A has become equal to the number of the document images N (S11: Yes), the controller11perform a printing operation (S15). At the time when the controller11advances to S15, the document images contained in the scanned data70are allocated and combined in the respective allocation areas55in the template data50(seeFIG. 10). Namely, composite data100is completely generated before execution of S15.

Accordingly, in the printing operation (S15), the controller11transmits to the MFP30a print execution command along with the composite data100, and terminates the control program. In response to receipt of the print execution command and the composite data100, the controller31of the MFP30controls the printing unit36to print the composite data100on a sheet.

Thereby, the printing system1can obtain a printed output that has images of a plurality of document sheets formed thereon to be allocated in respective user-intended positions. Thus, when the user desires a printed output with images of a plurality of document sheets incorporated into respective user-intended positions, the printing system1can present the user-desired output, reducing a user's burden.

In S16to be executed when the number of the document images N is not equal to the number of the allocation areas M (S9: No), the controller11performs an exceptional operation (S16). In the exceptional operation (S16), the controller11carries out, e.g., an operation of informing about an error caused due to a shortage of one or more document images. After that, the controller11terminates the control program.

As described above, the printing system1and the control program (seeFIG. 2) of the first embodiment can read images of a plurality of document sheets in a single scanning operation and present a printed output that has the scanned images allocated in respective user-intended positions. At this time, the user needs not perform scanning for each of the document sheets. Therefore, the printing system1and the control program can reduce a user's burden.

Further, the printing system1and the control program display the document set guide screen60on the display unit25(seeFIGS. 5 and 6). By referring to the information displayed on the document set guide screen60, the user can grasp appropriate set positions of the document sheets relative to the flatbed. Consequently, the printing system1and the control program can certainly present an output printed in a user-desired fashion.

Further, the document set guide screen60includes the display orientation informing image62, the template orientation informing images63, and the set orientation informing images64. By confirming the information62to64displayed on the document set guide screen60, the user can grasp the relationship between the actual situation and the information displayed on the document set guide screen60, and appropriate orientations of the document sheets to be set. Thus, the printing system1and the control program can more certainly present an output printed in a user-desired fashion.

In addition, the printing system1and the control program change the display manner in which the document set guide screen60is displayed (seeFIGS. 5 and 6) and the operations (S32to S37) to be applied for providing the image identifications, depending on the type of the template data50(the vertically-long document type or the horizontally-long document type). Thereby, the printing system1and the control program can present an output printed in a user-desired fashion regardless of whether the template data50is of the vertically-long document type or the horizontally-long document type.

Second Embodiment

Subsequently, an explanation will be provided about a second embodiment, in which one or more aspects of the present invention are applied to an MFP30. A basic configuration of the MFP30in the second embodiment is the same as that of the MFP30in the first embodiment. Therefore, differences between the first and second embodiments will be set forth below.

In the second embodiment, the control program (seeFIGS. 2,3, and7) is stored on a storage unit (e.g., the ROM33) of the MFP30. The control program is executed by the controller31of the MFP30.

Further, the control program of the second embodiment is different from that of the first embodiment in operations of S3to S6, and S7. The operations in the other steps in the second embodiment are the same as those in the first embodiment. Next, the differences between the first and the second embodiments will be described.

In S3, the controller31displays the document set guide screen60on the display panel38. In this respect, except for that the document set guide screen60is displayed on the display panel38, the operations of S3are the same as those in the first embodiment.

In S4, the controller31determines, based on an operation of the keypad39, whether a scan execution operation has been performed.

In S5, the controller31controls the scanning unit35to perform auto-crop scanning, without performing communication with the computer10. The operations to be executed by the MFP30in S5of the second embodiment are the same as those of the first embodiment, except for that S5of the second embodiment is not executed in response to receipt of an external instruction to perform scanning.

In S6, the controller31stores onto the RAM34the scanned data generated in S5, without performing communication with the computer10. In other respects, the operations to be executed in S6of the second embodiment are the same as those of the first embodiment.

In S15, the controller31controls the printing unit36to print the composite data100stored on the RAM34on a sheet, without performing communication with the computer10. The operations to be executed by the MFP30in S15of the second embodiment are the same as those of the first embodiment, except for that S15of the second embodiment is not executed in response to receipt of a print execution command and the composite data100from the computer10.

The MFP30and the control program, configured as above in the second embodiment, can provide the same effects as the first embodiment. Namely, the MFP30and the control program can reduce a user's burden in obtaining a printed output that has images of a plurality of document sheets allocated in respective user-intended positions. Further, the MFP30and the control program can certainly present a printed output that has the images of the plurality of document sheets combined in a user-desired fashion.

In the aforementioned embodiments, the composite data100is output in a manner printed on a sheet. However, the composite data100may be output in any other manner. For example, the composite data100may be faxed using the facsimile unit37. Alternatively, the composite data100may be output and stored on an external storage device.

In the aforementioned embodiments, the template data50which the user creates is employed. However, a predetermined format of template data may be employed. In this case, since allocation areas are already determined in the template data, the steps S1and S2inFIG. 2may be omitted. Consequently, it is possible to reduce a processing load to detect allocation areas.

In the aforementioned embodiments, each of the allocation areas55is shaped to be rectangular. However, the allocation areas55may be shaped in any other form such as an elliptical form. In this case, in S12, the document images75may be trimmed into respective shapes (e.g., elliptical shapes) corresponding to the allocation areas55. Thus, it is possible to obtain composite data in which the document images75are allocated in a wide variety of fashions.

In the first embodiment, the MFP30performs auto-crop scanning and extracts each document image75from the scanned data70. However, the MFP30may transmit the scanned data70to the computer10without extracting the document images75, and the computer10may extract each document image75from the scanned data70.

Furthermore, the document set guide screen60may not be displayed. The processing for the scanned data may not necessarily be performed after the processing for the template data50. In other words, the processing for the template data50may be performed after the processing for the scanned data.