Image processing apparatus, image processing method, and image processing program
An image processing apparatus includes a memory and a processor coupled to the memory and configured to perform acquiring object area information representing an image area of a target object in an image from an image database, using the object area information to calculate a distance map representing distance values from a contour of the target object inside the image area, and generating, based on the distance map, a line of points representing a curved line reflecting a global shape of the target object.
1. An image processing apparatus, comprising:
a memory; and
a processor coupled to the memory and configured to perform;
acquiring object area information representing an image area of a target object in an image from an image database;
using the object area information to calculate a distance, map representing distance values from a contour of the target object inside the image area; and
generating, based on the distance map, a line of points representing a curved line reflecting a global shape of the target object.
2. The image processing apparatus as claimed in claim 1 , wherein the processor is configured to generate the line of points by detecting a plurality of points having a higher distance value than neighboring points such as to trace a ridge that is defined by height corresponding to the distance values inside the image area and that extends in a certain direction.
3. The image processing apparatus as claimed in claim 1 , wherein the processor is further configured to add, to the line of points, perturbation components generated based on random numbers in a direction different from a direction in which the curved line extends.
4. The image processing apparatus as claimed in claim 3 , wherein the processor is configured to apply a smoothing process to a series of the random numbers to generate the perturbation components.
5. The image processing apparatus as claimed in claim 1 , wherein the processor is further configured to function as a machine learning model, wherein the machine learning model is configured to receive, as input training data, a plurality of images and a plurality of curved lines generated in a same manner as the curved line for each of the plurality of images, and to receive the object area information for the plurality of images as correct output data for training.
6. An image processing method, comprising:
acquiring object area information representing an image area of a target object in an image from an image database;
using the object area information to calculate a distance map representing distance values from a contour of the target object inside the image area; and
generating, based on the distance map, a line of points representing a curved line reflecting a global shape of the target object.
7. A non-transitory computer-readable recording medium having a program embodied therein for causing a computer to perform;
acquiring object area information representing an image area of a target object in an image from an image database;
using the object area information to calculate a distance map representing distance values from a contour of the target object inside the image area; and
generating, based on the distance map, a line of points representing a curved line reflecting a global shape of the target object.