CPC G06T 3/60 (2013.01) [G06F 3/12 (2013.01); G06T 3/40 (2013.01); G06T 7/70 (2017.01); G06T 11/00 (2013.01); G06T 2207/20081 (2013.01)] | 13 Claims |
1. An information processing apparatus that determines a leaning of an object image in a case of inserting the object image into a nail area included in a captured image, the information processing apparatus comprising:
a detection unit configured to detect a single nail area from the captured image in which a nail having a leaning is captured;
a generation unit configured to obtain respective coordinates of an uppermost part, a lowermost part, a leftmost part, and a rightmost part of the single nail area detected by the detection unit, and to generate a rectangle that passes through all of the obtained coordinates and that includes the single nail area; and
a determination unit configured to:
(1) in a first case where only one rectangle that passes through all of the obtained coordinates is generated for the single nail area by the generation unit, determine a leaning of the rectangle relative to a horizontal line or perpendicular line of the captured image as the leaning to be used for inserting the object image, and
(2) in a second case where a plurality of rectangles that pass through all of the obtained coordinates are generated for the single nail area by the generation unit, determine the leaning to be used for inserting the object image by use of a leaning of any one of the plurality of rectangles based on a selection reference,
wherein (a) the selection reference selects a rectangle whose leaning is largest among the plurality of rectangles, or (b) the selection reference selects a rectangle whose leaning is smallest among the plurality of rectangles, or (c) the selection reference selects a rectangle in accordance with a median leaning of leanings of the plurality of rectangles, or (d) the selection reference selects a rectangle in accordance with an average leaning of leanings of the plurality of rectangles.
|