This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2014-108503 filed May 26, 2014.
The present invention relates to an image processing apparatus, an image forming apparatus, and a non-transitory computer readable medium.
According to an aspect of the invention, there is provided an image processing apparatus including:
a reception unit that receives designation of a foreground portion included in a foreground region of an image displayed on a display screen; and
a region forming unit that forms a foreground candidate region including the foreground portion,
wherein the reception unit receives designation of an addition to the image after the foreground candidate region is formed, and
the region forming unit sets whether the designation of the addition is used to designate the foreground region or a background region of the image excluding the foreground region according to whether the designation of the addition is present outside or inside the foreground candidate region, and re-forms the foreground candidate region according to the foreground portion and the designation of the addition.
Exemplary embodiments of the present invention will be described in detail based on the following figures, wherein:
Hereinafter, exemplary embodiments of the invention will be described with reference to the accompanying drawings.
<Configuration of Image Processing Apparatus and Image Forming Apparatus>
The image forming apparatus 10 shown in
The image acquisition unit 20 acquires the image P shown in
The display unit 30 includes a display screen 31 (see
The manipulation unit 40 is, for example, a touch panel that is formed integrally with the display screen 31 of the display unit 30 and transmits the image P displayed on the display screen 31, which may receive designation of a part of the image P by a contact manipulation using a finger, a stylus pen or the like. The manipulation unit 40 receives designation of a foreground seed Sf (foreground portion) included in a foreground region Pf (see
When designating the foreground seed Sf, the user presses a “Fore” button (not shown) displayed, on the display screen 31, and then traces a portion inside a range that the user desires to extract as the foreground region Pf using a finger, a stylus pen or the like. Thus, the overwritten portion is set as the foreground seed Sf. The number of the designated foreground seed Sf is not only one as shown in
When designating the background, seed Sb, the user presses a “Back” button (not shown) displayed on the display screen 31, and then traces a portion outside the range that the user desires to extract as the foreground region Pf using a finger, a stylus pen or the like. Thus, the overwritten portion is set as the background seed Sb. The number of the designated background seed Sb is not only one, but may also be two or more.
Only the foreground seed Sf may be designated, and the background seed Sb may not be designated.
On the display screen 31, a “Cut” button (not shown) is displayed, in addition to the “Fore” button and the “Back” button. Thus, after the designation of each of the foreground seed. Sf and the background seed Sb or the designation of only the foreground seed Sf is completed, by pressing the “Cut” button, a formation process of the foreground candidate region Pf0 in the control unit 50 to be described later is executed.
The manipulation unit 40 (see
The control unit 50 controls respective operations of the image acquisition unit 20, the display unit 30, the manipulation unit 40, and the storage unit 60. Further, the control unit 50 forms the foreground candidate region Pf0 as a region that includes the foreground seed Sf (see
As a method for forming the foreground candidate region Pf0 by the foreground seed Sf and the background seed Sb, for example, a graph cut algorithm may be applied.
After the foreground candidate region Pf0 is formed, the control unit 50 (see
That is, before the additional seed St is received, the manipulation (pressing of the “Fore” button) of specifying that the additional seed St is the foreground seed or the manipulation (pressing of the “Back” button) of specifying that the additional seed St is the background seed is not performed, but the control unit 50 sets whether to cause the additional seed St to function as the foreground seed or to cause the additional seed St to function as the background seed according to the position relation between the additional seed St and the foreground candidate region Pf0.
The control unit 50 stores the additional seed St set as the foreground seed or the background seed in the storage unit 60.
In the present exemplary embodiment, since the additional seed St is formed of the line, a part of the line may be formed inside the foreground candidate region Pf0, and the other part thereof may be formed outside the foreground candidate region Pf0.
In the examples shown in
As shown in
In this way, if the additional seed St is set as the foreground seed or the background seed, the control unit 50 (see
The image forming unit 70 forms an image using the foreground candidate region Pf0 formed by the control unit 50. Specifically, the image forming unit 70 may print only the formed foreground candidate region Pf0, or may generate a composite image by attaching the foreground candidate region Pf0 to a part of another image to print the composite image.
<Operation of Image Processing Apparatus and Image Forming Apparatus>
An operation of the image processing apparatus 80 and the image forming apparatus 10 as configured above will be described with reference to
First, the image acquisition unit 20 (see
The image P displayed on the display screen 31 is visually recognized by a user. When the user designates the foreground region Pf that the user desires to extract from the image P, the user presses the “Fore” button displayed on the display screen 31, and then designates the foreground seed Sf inside a region that the user desires to extract as the foreground region Pf using a finger or a stylus pen (see
Similarly, when the user designates the background region Pb in the image P, the user presses the “Back” button displayed on the display screen 31, and then designates the background seed Sb inside a region that the user desires to extract as the background region Pb using a finger or a stylus pen (see
According to the pressing of the “Cut” button, the control unit 50 sets the foreground candidate region Pf0 as a region that includes the foreground seed Sf received through the manipulation unit 40 and does not include the background seed Sb according to the graph cut algorithm (S4). Here, the region of the image P displayed on the display screen 31 of the display unit 30, excluding the portion extracted as the foreground candidate region Pf0, is in a state of being covered by a mask having luminance of such a degree that the region is transmitted, as shown by a hatched portion in
The formed foreground candidate region Pf0 is stored in the storage unit 60, together with the received foreground seed Sf and background seed Sb.
Here, as shown in
On the other hand, as shown in
After the manipulation unit 40 receives the additional seed St (Yes in S5), the control unit 50 (see
Specifically, in the additional seed St shown in
Further, in the additional seed St shown in
The additional seed St set as the foreground seed or the background seed is stored in the storage unit 60.
The control unit 50 re-sets the foreground, candidate region Pf0 in the image P stored in the storage unit 60 based on the additional seed St stored in the storage unit 60 and the foreground seed Sf and the background seed Sb (see
When the re-set and displayed foreground candidate region Pf0 matches the foreground region Pf that the user desires to extract as shown in
When the re-set and displayed foreground candidate region Pf0 does not match the foreground region Pf, the procedure from the process of further receiving the additional seed St (S5) to the process of re-setting and displaying the foreground candidate region Pf0 (S7) is repeated.
If the process of extracting the foreground candidate region Pf0 is finished, the control unit 50 outputs the foreground candidate region Pf0 stored in the storage unit 60 to the image forming unit 70, and then, the image forming unit 70 prints the foreground candidate region Pf0, or generates a composite image by attaching the foreground candidate region Pf0 to a part of another image to then print the composite image.
According to the image processing apparatus 80 and the image forming apparatus 10 of the present exemplary embodiment as configured above, when the formed foreground candidate region Pf0 that the user desires to extract as the foreground region Pf is corrected by the additional seed St, it is not necessary for the user to designate whether the additional seed St is used to designate the foreground region or the background region. That is, it is not necessary for the user to perform the operation of pressing the “Fore” button for specifying the intention of designating the foreground region or the “Back” button for specifying the intention of designating the background region before the additional seed St is input.
Further, in the image processing apparatus 80 and the image forming apparatus 10 of the present exemplary embodiment, the additional seed St is received as the line. Thus, the designated region is enlarged compared with a case where the additional seed St is designated by points.
In the image processing apparatus 80 and the image forming apparatus 10 of the above-described exemplary embodiment, the additional seed St is received by the line, but for example, as shown in
Further, the control unit 50 may re-form the foreground candidate region Pf0 by primarily re-forming a portion K01 close to the point m1 received earlier in a time series manner among two points m1 and m2 received as the additional seed St, in the boundary line K0 that defines the foreground candidate region Pf0. According to the image processing apparatus 80 and the image forming apparatus 10 of this exemplary embodiment, the portion K01 of the boundary line K0 to be re-set is defined.
<Exemplary Embodiment of Program>
The computer 59 includes a central processing unit (CPU) 51, a read only memory (ROM) 52, a random access memory (RAM) 53, an image output unit interface (image output unit I/F) 54, a panel interface (panel I/F) 55, an image input unit interface (image input unit I/F) 56, and a local interface (local I/F) 57.
The ROM 52 stores a program to be executed by the CPU 51. The CPU 51 reads the program stored in the ROM 52, executes the program by using the RAM 53 as a work area, and controls operations of the ROM 52, the RAM 53, the image output unit I/F 54, the panel I/F 55, the image input unit I/F 56, and the local I/F 57 according to the program.
The image output unit I/F 54 performs communication of data of the foreground candidate region Pf0, a control signal or the like with the image forming unit 70. The panel I/F 55 performs communication of information or a control signal with an image display device 35 and a reception unit 45. The image input unit I/F 56 performs communication of data of the image P or a control signal with the image acquisition unit 20. The local I/F 57 performs communication of data with the storage unit 60.
The image display device 35 displays an image on a display screen thereof. The reception unit 45 is a touch panel provided on the display screen of the image display device 35, for example. The reception unit 45 may employ a mouse, a touch pad or the like that is an input interface of a personal computer.
The CPU 51 in which the program is read displays the image P acquired, from the image acquisition unit 20 through the image input unit I/F 56 on the display screen of the image display device 35 through the panel I/F 55, and stores the image P in the storage unit 60 through the local I/F 57, Further, the CPU 51 receives the foreground seed Sf included in the foreground region Pf (see
The CPU 51 forms the foreground candidate region Pf0 that includes the foreground seed Sf and does not include the background seed Sb, using the RAM 53 as a work area, with respect to the image P stored in the storage unit 60, based on the received foreground seed Sf and background seed Sb. The CPU 51 displays the formed foreground candidate region Pf0 on the display screen of the image display device 35 through the panel I/F 55, and stores the foreground candidate region Pf0 in the storage unit 60 through the local I/F 57.
After the foreground, candidate region Pf0 is formed on the display screen of the image display device 35, the CPU 51 receives the additional seed St through the reception unit 45. After the additional seed St is received, the CPU 51 stores the additional seed St in the storage unit 60, and sets whether the additional seed St is used to designate a foreground region or a background region according to whether the additional seed St is present outside or inside the foreground candidate region Pf0.
Further, the CPU 51 re-forms the foreground candidate region Pf0 that includes the foreground seed Sf, does not include the background seed Sb, and includes the additional seed St set in the foreground seed, or re-forms the foreground candidate region Pf0 that includes the foreground seed Sf, does not include the background seed Sb, and does not include the additional seed St set in the background seed, using the RAM 53 as a work area, with respect to the image P stored in the storage unit 60 based on the foreground seed Sf and the background seed Sb stored in the storage unit 60 and the additional seed St set as the foreground seed or the background seed.
According to the program as configured above, the computer 59 may function as the control unit 50 in the image processing apparatus 30 shown in
Accordingly, the same effects as in the above-described image processing apparatus 80 may be obtained according to such a program.
The foregoing description of the exemplary embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2014-108503 | May 2014 | JP | national |