Information processing apparatus, control method of information processing apparatus, and storage medium
AssigneeCanon Kabushiki Kaisha
InventorRyoya Kawai
Life of this patent
Estimating the term…
Abstract
An information processing apparatus, which determines a leaning of an object image in a case of inserting the object image into a predetermined area included in a captured image, includes: a detection unit configured to detect the predetermined area from the captured image; a generation unit configured to generate a rectangle that includes the predetermined area detected by the detection unit; and a determination unit configured to 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.
Claims13
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.
A non-transitory computer-readable storage medium storing a program which causes a computer 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 to function as a plurality of units 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.
Dependencies are inferred from the claim text.