The present invention relates to a printer, a method of printing, and a computer-readable storage medium.
Japanese Patent Application Laid-Open Publication No. 2006-341604 discloses a handheld printer that includes a navigation subsystem for tracking the movement of the handheld printer on a printing surface and a print head controller for propelling ink from a print head onto the printing surface in accordance with the movement of the handheld printer and an image stored in an image buffer.
The handheld printer disclosed in Patent Document 1 determines the boundaries of a printing region as the printer is moved by a user and scales and prints the image to fit within those boundaries.
The handheld printer disclosed in Japanese Patent Application Laid-Open Publication No. 2006-341604 makes it possible to set the boundaries of the printing region and then scale and print the image to fit within that printing region.
However, if the original image is small relative to the printing region, the enlarged image will appear distorted. Similarly, if the original image is large relative to the printing region, the reduced image will appear blurry.
Conventional printers (handheld printers) thus suffer from a problem in which the image quality of an image deteriorates when attempting to print that image in the printing region of a printing medium.
The present invention was made in view of the abovementioned problems and aims to provide a printer, a method of printing, and a computer-readable storage medium that make it possible to extract, from a plurality of pre-arranged images, an image that can be printed in a printing region defined on a printing medium such that the image is printed as large as possible without expanding or shrinking the image. Accordingly, the present invention is directed to a scheme that substantially obviates one or more of the problems due to limitations and disadvantages of the related art.
Additional or separate features and advantages of the invention will be set forth in the descriptions that follow and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
To achieve these and other advantages and in accordance with the purpose of the present invention, as embodied and broadly described, in one aspect, the present disclosure provides a controller for controlling a printing unit of a printer, the controller performing: a movement distance measuring process that measures a movement distance of the printing unit relative to a printing medium on the basis of signals received from a movement distance sensor in the printer; a coordinate recording process that calculates a plurality of coordinates on the basis of the movement distance measured in the movement distance measuring process and records the coordinates in a memory in the printer; a printing region setting process that sets a printing region on the basis of the plurality of the coordinates recorded in the storage unit in the coordinate recording process; and a printing image selection process that identifies an image that has the largest area from at least one image, the at least one image being extracted from a group of images pre-recorded in the storage unit by designating such images that fit within the printing region set by the printing region setting process.
In another aspect, the present disclosure provides a method of selecting a printing image to be executed by a controller for controlling a printing unit of a printer, including: a movement distance measuring process that measures a movement distance of a printing unit relative to a printing medium on the basis of signals received from a movement distance sensor in the printer; a coordinate recording process that calculates a plurality of coordinates on the basis of the movement distances measured in the movement distance measuring process and records the coordinates in a memory in the printer; a printing region setting process that sets a printing region on the basis of the plurality of the coordinates recorded in the storage unit in the coordinate recording process; and a printing image selection process that identifies an image that has the largest area from at least one image, the at least one image being extracted from a group of images pre-recorded in the storage unit by designating such images that fit within the printing region set by the printing region setting process.
In another aspect, the present disclosure provides a non-transitory storage medium that stores instructions executable by a controller for controlling a printing unit of a printer, the instructions causing the controller to execute the following: a movement distance measuring process that measures a movement distance of the printing unit relative to a printing medium on the basis of signals received from a movement distance sensor in the printer; a coordinate recording process that calculates a plurality of coordinates on the basis of the movement distance measured in the movement distance measuring process and stores the coordinates in a memory in the printer; a printing region setting process that sets a printing region on the basis of the plurality of the coordinates recorded in the storage unit in the coordinate recording process; and a printing image selection process that identifies an image that has the largest area from at least one image, the at least one image being extracted from a group of images pre-recorded in the storage unit by designating such images that fit within the printing region set by the printing region setting process.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory, and are intended to provide further explanation of the invention as claimed.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention, and together with the general description given above and the detailed description of the embodiments given below, serve to explain the principles of the invention.
Next, a printer 1 according to one embodiment will be described with reference to figures. Note that the same reference characters are used for components that are the same or equivalent in the figures.
The printing medium 2 may be printing paper, printing labels, or cardboard, for example, but is not limited to these examples. The printing medium 2 is also known as a recording medium or a printing object. Here, the printing medium 2 is made of paper and a resin, but the printing medium 2 may be any object in which a material that can accept ink is formed so as to provide a surface that can accept ink.
The images to be printed may be characters, symbols, graphics, patterns, pictures, or photographs, for example, but are not limited to these examples. The images to be printed are also known as print images or print patterns.
As illustrated in
The case 10 provides a space in which to arrange the components of the printer 1 such as the case 10, the printing unit 20, the movement distance measuring unit 30, the interface 40, the controller 50, and the storage unit 60. As illustrated in
The printing unit 20 is fixed on the bottom surface of the case 10 and prints the images to be printed onto the printing medium 2. The printing unit 20 prints using an inkjet technology and includes an ink tank 21 that is filled with ink and a printing head 22 that dispenses droplets of the ink in the ink tank 21. The ink tank 21 supplies ink to the printing head 22. The printing head 22 includes a plurality of nozzles 23 arranged running in a primary scanning direction and in a secondary scanning direction. In the printing head 22, heaters inside of the nozzles 23 apply heat to the ink to form vapor bubbles, and the formation of these vapor bubbles causes the ink to be propelled from the nozzles 23 onto the printing medium 2. The ink may also be propelled using another method or technique that does not require application of heat.
The movement distance measuring unit 30 is a sensor that measures the amount of relative movement of the printer 1 and the printing unit 20 of the printer 1 relative to the printing medium 2. As illustrated in
The interface 40 accepts user input such as instructions to start printing, stop printing, start setting a printing region, or stop setting a printing region and also provides information to the user. The interface 40 sends any received instructions to start printing or stop printing to the controller 50 and provides any information received from the controller 50 to the user. The interface 40 may be buttons, keys, or a touch pad for accepting user input and a liquid crystal display or speakers for providing information to the user (or a touch panel that handles both), for example, but is not limited to these examples.
The controller 50 is a processor that executes a program to control the printer 1. The controller 50 includes a printing controller 51, a coordinate recording unit 52, a printing region setting unit 53, and a selection unit 54. The controller 50 may be a central processing unit (CPU), for example, but is not limited to this example.
When the interface 40 receives an instruction to start printing, the printing controller 51 obtains the printing start instruction information from the interface 40 and then controls the printing unit 20 in order to start printing. At this time, the user takes hold of the case 10 and begins to move the printer 1 in order to begin printing. The printing controller 51 then gets the movement distance measured by the movement distance measuring unit 30 and controls the printing unit 20 in order to print the portion of the print image corresponding to the current position of the printing unit 20. Once the entire print image has been printed, the printing controller 51 controls the printing unit 20 in order to stop printing.
When the interface 40 receives an instruction to start setting a printing region, the coordinate recording unit 52 obtains the information for the instruction to start setting the printing region from the interface 40 and then starts recording a plurality of coordinates starting from the current position of the printing unit 20 (a starting point P0).
Next, the method used by the coordinate recording unit 52 to calculate the coordinates will be described in more detail.
The printing region setting unit 53 then sets the printing region according to the plurality of coordinates recorded by the coordinate recording unit 52.
Next, the method used by the printing region setting unit 53 to set the rectangle R1 as the printing region will be described in more detail. The printing region setting unit 53 extracts, from the coordinates of the points P0, P1, . . . , and Pn stored in the storage unit 60 by the coordinate recording unit 52, the X coordinate with the maximum value Xmax, the X coordinate with the minimum value Xmin, the Y coordinate with the maximum value Ymax, and the Y coordinate with the minimum value Ymin. The printing region setting unit 53 then sets the rectangle bounded by the four straight lines X=Xmin, X=Xmax, Y=Ymin, and Y=Ymax as the printing region R1. Setting the printing region in this way makes it possible to set the smallest rectangle R1 that bounds all of the points P0, P1, . . . , and P22 as the printing region.
The printing controller 51 prints when the position of the printing unit 20 is inside of the printing region R1 set by the printing region setting unit 53 and does not print if the position of the printing unit 20 is outside of the printing region R1.
The storage unit 60 stores programs and data used when the controller 50 executes processes and functions as a working region for when the controller 50 is executing processes. The storage unit 60 can store a program for controlling the printing unit 20 in order to print, a program for controlling the movement distance measuring unit 30 in order to measure movement distances, a program for setting the printing region, the coordinates of the printing unit 20, and data corresponding to the images to be printed, for example, but is not limited to storing these examples. The storage unit 60 may be a read-only memory (ROM) or a random-access memory (RAM), for example, but is not limited to these examples.
The printing region setting process begins when the interface 40 receives an instruction to start setting a printing region from the user and the controller 50 gets that instruction to start setting the printing region from the interface 40. Then, in step S101, the coordinate recording unit 52 sets up the coordinate system in which the current position of the printing unit 20 is the origin and stores the origin in the storage unit 60 as the starting point P0.
In this state, once the user moves the printer 1, the process proceeds to step S102, where the coordinate recording unit 52 gets the movement distances measured by the movement distance measuring unit 30, calculates the current coordinates of the printing head 20 based on the pre-movement position and the retrieved movement distances, and then stores those coordinates in the storage unit 60.
After the coordinates are stored in the storage unit 60, the process proceeds to step S103, where the coordinate recording unit 52 determines whether the interface 40 has received an instruction to stop setting the printing region and whether that instruction to stop setting the printing region has been retrieved from the interface 40. If it is determined that no stop instruction has been retrieved (NO in step S103), the process returns to step S102. Note that the coordinates of the position at which the instruction to start setting the printing region was received (the starting point P0) do not necessarily have to be exactly the same as the coordinates of the position at which the instruction to stop setting the printing region is received.
If it is determined that a stop instruction has been received (YES in step S103), the process proceeds to step S104, where the printing region setting unit 53 gets the plurality of stored coordinates from the storage unit 60.
Once the plurality of coordinates have been retrieved, the process proceeds to step S105, where the printing region setting unit 53 calculates the smallest rectangle R1 that bounds all of those coordinates and sets that rectangle R1 as the printing region.
Once the rectangle R1 has been calculated and set as the printing region, the process proceeds to step S106, where the printing region setting unit 53 stores the printing region in the storage unit 60, thus ending the printing region setting process.
In one embodiment, a storage unit 60 stores a plurality of images each containing at least one of either a character string or design and expressing similar content to one another, with at least one of either the size or shape of each of the plurality of images being different from the other images. The plurality of images may be predefined images from the manufacturer of the printer 1, or alternatively may be images created by the user via the printer 1. “Similar content to one another” as described above means that the images may express a “compliment,” for example. Specifically, a plurality of images containing at least one of either a character string expressing a compliment such as “Very good!” or a design such as one showing a thumbs-up gesture express similar content to one another and are thus stored in the storage unit 60 and defined as one group of a plurality of images. Furthermore, a plurality of images defined as a group of images in this manner are stored in a plurality of groups in the storage unit 60. The plurality of images contained in the other groups express content other than compliments, such as “urgent/ASAP,” for example. Alternatively, the groups may contain differing images.
As shown in
Next, the method used by the selection unit 54 to set the printing image will be described with reference to figures.
The selection unit 54 starts the printing image selection process upon a pre-determined operation by the user via the interface 40. The selection unit 54 presents a plurality of categories that the user can print on the interface 40 (step S201) and receives an operation selecting one of the categories from the user via the interface 40 (step S202). The categories are each designated based on similar content, as described above. The selection unit 54 organizes and displays text such as “compliment” or “urgent/ASAP,” for example, thereby presenting the plurality of categories. The selection unit 54, upon receiving from the user the operation selecting one category, selects a plurality of images belonging to the one selected category, or namely, the six rectangular images expressing a “compliment,” as described above (step S203). At this time, the selected images are no longer presented by the interface 40.
In regard to all images selected in step S203 above, the selection unit 54 compares the length XR1 of the printing region R1 in the X axis direction to the lengths of the respective images 101, . . . , 106 in the X axis direction, and compares the length YR1 of the printing region R1 in the Y axis direction to the lengths of the respective images 101, . . . , 106 in the Y axis direction (step S204). Then, the selection unit 54 selects all of the images for which the length in the X axis direction is less than or equal to XR1 and the length in the Y axis direction is less than or equal to YR1 (step S204: YES, step S205). In the example illustrated in
From the one or more images fitting within the printing region R1, the selection unit 54 compares the areas of the selected images, i.e., the products of the respective lengths in the X axis direction and the Y axis direction, selects the image with the greatest area, and sets that image as the printing image (step S206). In the example illustrated in
Configuring the printer 1 according to one embodiment as described above and executing the printing region setting process and the printing image selection process as described above makes it possible to extract, from a plurality of pre-arranged images, an image that can be printed in a printing region defined on a printing medium such that the image is printed as large as possible without expanding or shrinking the image.
In this manner, the printer 1 selects and prints an image of a size and shape that matches the printing region, thereby making it possible to eliminate the burden of the user having to manually select an image to print while considering the size and shape of the printing region.
Next, a printing process executed by a printer 1 according to one embodiment will be described with reference to figures. It should be noted that, during the transition from the printing range setting process to the printing process, the movement distance measuring unit 30 continues to measure a movement amount of the printer; thus, it is preferable that the surface of the printer on which the movement distance measuring unit 30 is provided not leave the printing surface of the printing medium 2.
In one embodiment, when a printing controller 51 controls a printing unit 20 in order to print the portion of a printing image corresponding to the position of the printing unit 20, those portions that have been printed are stored in a storage unit 60 as previously printed regions. The printing controller 51 then continues printing if the position of the printing unit 20 corresponds to a portion of the printing image that still needs to be printed but does not print if that portion is already stored as a previously printed region in the storage unit 60.
Next, the operation of the printing controller 51 at representative positions of the printing unit 20 will be described. When the position of the printing unit 20 on the printing medium 2 corresponds to the point I in
When the position of the printing unit 20 on the printing medium 2 corresponds to the point J in
When the position of the printing unit 20 on the printing medium 2 corresponds to the point K in
The printing process begins when an interface 40 receives an instruction to start printing from the user and a controller 50 gets that instruction to start printing from the interface 40. First, in step S301, the printing controller 51 determines whether the position of the printing unit 20 is within a rectangle R1 (the printing region).
If it is determined that the position of the printing unit 20 is within the printing region (YES in step S301), the process proceeds to step S302, where the printing controller 51 determines whether the position of the printing unit 20 is within the previously printed region.
If it is determined that the position of the printing unit 20 is not within the previously printed region (NO in step S302), the process proceeds to step S303, where the printing controller 51 controls the printing unit 20 in order to print the portion of the printing image corresponding to the position of the printing unit 20.
Once that portion has been printed, the process proceeds to step S304, where the printing controller 51 stores the portion that has been printed in the storage unit 60 as a previously printed region.
Once the previously printed region has been recorded, the process proceeds to step S305, where the printing controller 51 determines whether the entire printing image has been printed.
Once it is determined that the entire printing image has been printed (YES in step S305), the printer 1 ends the printing process.
If it is determined that the printing image has not been entirely printed yet (NO in step S305), the process proceeds to step S306, where the printing controller 51 gets the movement distances measured by a movement distance measuring unit 30 and then calculates the current position of the printing unit 20. The process then returns to step S301.
If it is determined in step S302 that the position of the printing unit 20 is not within the previously printed region (YES in step S302), the process proceeds to step S306.
If it is determined in step S301 that the position of the printing unit 20 is not within the printing region (NO in step S301), the process proceeds to step S306.
Configuring the printer 1 according to one embodiment as described above and executing the printing region setting process, the printing image extraction process, and the printing process as described above makes it possible to extract, from a plurality of pre-arranged images, an image that can be printed in a printing region defined on a printing medium such that the image is printed as large as possible without expanding or shrinking the image, and then printing the extracted image in the printing region defined on the printing medium as described above.
Furthermore, the printer 1 does not print outside of the printing region, thereby making it possible to prevent printing in locations in which the user does not want printing to occur, such as outside of the printing medium 2 or in locations where another image has already been printed. Furthermore, the printer 1 does not print again in previously printed regions, thereby making it possible to prevent wasteful usage of ink and bleeding of the ink due to repeated printing in the same location.
In addition, during the printing process itself, the user can simply focus on moving the printer 1 without having to worry about the printing region or the previously printed regions, thereby making it possible to improve the ease of using of the printer 1 during the printing process.
Although an embodiment of the present invention was described above, this embodiment is only an example, and the scope of the present invention is not limited to this example. In other words, embodiments of the present invention may take a wide variety of forms, and all such embodiments are included in the scope of the present invention.
For example, in the embodiments described above, the printing unit 20 includes the ink tank 21 and the printing head 22 and prints using an inkjet technology, but the present invention is not limited to this example. The printing unit may print using any printing technology, including thermal printing or thermal transfer printing.
In the embodiments described above, the movement distance measuring unit 30 includes the LED 31 and the image sensor 32 and measures movement distances by using the image sensor 32 to detect light that reflects off of the printing medium 2 when the LED 31 is illuminated. However, the present invention is not limited to this example. The movement distance measuring unit 30 may alternatively include rollers or wheels arranged on the bottom surface of the case 10 and may measure movement distances by measuring the rotations of those rollers or wheels. Alternatively, the movement distance measuring unit 30 may include a laser light source and may measure movement distances by using the image sensor 32 to detect laser light that reflects off of the printing medium 2 when the laser light source emits light.
The printer 1 may include a plurality of the movement distance measuring units 30.
In one embodiment, the printer 1 ended the printing process once it was determined that the entire printing image had been printed. However, the present invention is not limited to this example. The printer 1 may alternatively control the printing unit 20 in order to end the printing process when the interface 40 receives an instruction to stop printing from the user and the controller 50 then gets the information that an instruction to stop printing was received from the interface 40.
As illustrated in
In one embodiment, the printing region setting unit 53 gets the coordinates of all of the points and then calculates the smallest rectangle R1 that bounds all of those points in order make it possible to set the printing region. However, the present invention is not limited to this example. The largest rectangle R2 that does not include any of the recorded points may be calculated and set as the printing region instead. Alternatively, a rectangle R3 that is smaller than the rectangle R1 but larger than the rectangle R2 may be calculated and set as the printing region.
In one embodiment, the printing region setting unit 53 sets a rectangular printing region, but the present invention is not limited to this example. The printing region setting unit 53 may alternatively set a circular, elliptical, or polygon-shaped region or any shape bounded by straight lines or curved lines as the printing region. Alternatively, the interface 40 may present various shape options to the user in advance and receive an instruction for selecting the shape the user would like to set as the printing region, and then the printing region setting unit 53 may get the information for the selected shape in order to set the shape to use for the selected region. Moreover, the user may move the printer 1 to trace out a freehand shape to be set as the printing region.
The coordinate recording unit 52 sets a coordinate system in which the center of the printing unit 20 is the origin, but the present invention is not limited to this example.
When the coordinate recording unit 52 sets the coordinate system illustrated in
Furthermore, the present invention may be provided in the form of a printer that already includes all of the components required to achieve the features of the present invention, or an existing information processing device or the like may use programs in order to function as the printer according to the present invention. In other words, programs for implementing the features of the printers described above in one embodiment and in the modification examples may be executed by a CPU or the like for controlling an existing information processing device or the like in order to make it possible for that information processing device to function as the printer according to the present invention. Moreover, the method of printing according to the present invention may be implemented using such a printer.
In addition, such programs may be implemented and used in any manner. For example, the programs may be stored on and used from a computer-readable storage medium such as a floppy disk, a Compact Disc Read-Only Memory (CD-ROM), a Digital Versatile Disc Read-Only Memory (DVD-ROM), or a memory card. Furthermore, the programs may be superimposed onto a carrier wave and then used via a communication medium such as the internet. For example, the programs may be posted on and distributed via a bulletin board system (BBS) on a communication network. Furthermore, the programs may be launched and executed similar to other applications and programs by an operating system (OS) in order to provide a configuration that can execute the processes described above.
Preferred embodiments of the present invention were described above. However, the present invention is not limited to the embodiments described above and includes all inventions included in the scope of the claims as well as their equivalents.
The present invention was described using the specific embodiment above as an example. However, the technical scope of the present invention is not limited to the embodiment described above. The scope of the present invention is not limited to the embodiment described above, and any configurations included in the scope of the claims and their equivalents are also encompassed by the present invention.
It is understood to persons skilled in the art that various modifications or improvements can be made to the specific embodiments described above, and such modifications and improvements are included within the technical scope of the present invention as defined by the claims.
Number | Date | Country | Kind |
---|---|---|---|
2016-059859 | Mar 2016 | JP | national |
2017-042399 | Mar 2017 | JP | national |