1. An image processing apparatus comprising: an object extraction unit configured to extract an object from an input image; a metadata extraction unit configured to extract metadata related to the object; a determination unit configured to determine, on the basis of whether or not another object exists near the object, whether to describe a first vector path description or to describe a second vector path description, wherein the first vector path description is data of a first frame which circumscribes the object with a shape similar to a shape of the object, and wherein the second vector path description is data of a second frame which circumscribes the object with a predetermined shape, and wherein the determination unit determines to describe the first vector path description when another object exists near the object, and wherein the determination unit determines to describe the second vector path description when another object does not exist near the object; a frame creation unit configured to create the first vector path description in the case that the determination unit determines to describe the first vector path description, and to create the second vector path description in the case that the determination unit determines to describe the second vector path description; and a document creation unit configured to create an electronic document including data of the input image and the created first or second vector path description with which the metadata is associated, wherein when a keyword search is performed on the created electronic document, highlight display is performed in accordance with the created first or second vector path description with which metadata that matches the keyword is associated.