Image processing apparatus and non-transitory computer readable medium for calculating a position at which to superimpose a design object onto an image
An image processing apparatus includes a processor configured to receive an image having a foreground segment and a background segment, receive a design object, calculate a position for superimposing the design object, on a basis of respective features of the foreground segment, the background segment, and the design object, and perform output to superimpose the design object at the calculated position.
1. An image processing apparatus comprising:
a processor configured to:
receive an image having a foreground segment and a background segment;
receive a design object;
obtain a centroid position of the foreground segment, and obtain a centroid position of the design object on a basis of the centroid position of the foreground segment;
calculate a position for superimposing the design object, on a basis of respective features of the foreground segment, the background segment, and the design object; and
perform output to superimpose the design object at the calculated position.
2. The image processing apparatus according to claim 1 ,
wherein the processor obtains the centroid position of the design object to place the centroid position of the design object at a position symmetrical to the centroid position of the foreground segment with respect to a center of the image.
3. The image processing apparatus according to claim 2 ,
wherein the processor obtains the centroid position of the foreground segment with inclusion of a color difference of color of the foreground segment from color of the background segment.
4. The image processing apparatus according to claim 3 ,
wherein the processor obtains the centroid position of the design object with inclusion of a color difference of color of the design object from color of the background segment.
5. The image processing apparatus according to claim 2 ,
wherein the processor obtains the centroid position of the design object with inclusion of a color difference of color of the design object from color of the background segment.
6. The image processing apparatus according to claim 1 ,
wherein the processor obtains the centroid position of the foreground segment with inclusion of a color difference of color of the foreground segment from color of the background segment.
7. The image processing apparatus according to claim 6 ,
wherein the processor obtains the centroid position of the design object with inclusion of a color difference of color of the design object from color of the background segment.
8. The image processing apparatus according to claim 1 ,
wherein the processor obtains the centroid position of the foreground segment with inclusion of a color difference of color of the foreground segment from color of the background segment.
9. The image processing apparatus according to claim 8 ,
wherein the processor obtains the centroid position of the design object with inclusion of a color difference of color of the design object from color of the background segment.
10. The image processing apparatus according to claim 1 ,
wherein the processor obtains the centroid position of the design object with inclusion of a color difference of color of the design object from color of the background segment.
11. The image processing apparatus according to claim 1 ,
wherein the processor calculates the position for superimposing the design object with inclusion of data regarding a type of the foreground segment.
12. The image processing apparatus according to claim 1 ,
wherein the processor calculates the position for superimposing the design object with inclusion of data regarding a type of the design object.
13. The image processing apparatus according to claim 1 ,
wherein when the design object protrudes from the image, the processor moves the design object to superimpose the design object within the image.
14. The image processing apparatus according to claim 1 ,
wherein if the design object overlaps the foreground segment, the processor moves the design object to superimpose the design object within the background segment.
15. The image processing apparatus according to claim 1 ,
wherein the processor receives a first design object and a second design object, calculates a position for superimposing the first design object, on a basis of respective features of the foreground segment, the background segment, and the first design object, and calculates a position for superimposing the second design object, by using the foreground segment having the first design object added to the foreground segment.
16. A non-transitory computer readable medium storing a program causing a computer to execute a process comprising:
receiving an image having a foreground segment and a background segment;
receiving a design object;
obtaining a centroid position of the foreground segment, and obtaining a centroid position of the design object on a basis of the centroid position of the foreground segment;
calculating a position for superimposing the design object, on a basis of respective features of the foreground segment, the background segment, and the design object; and
performing output to superimpose the design object at the calculated position.