Image processing method, image processing apparatus, and program
AssigneeCanon Kabushiki Kaisha
InventorSatoshi Naito
Life of this patent
Estimating the term…
Abstract
Every time clustering processing for a predetermined number of pixels is complete, a small cluster having the number of allocated pixels, which is equal to or smaller than a pixel count threshold, is discriminated. The small cluster, which is discriminated to have the number of allocated pixels equal to or smaller than the pixel count threshold, is merged to a cluster having the nearest representative feature vector. With this arrangement, the number of clusters which are to undergo distance calculations of feature vectors is reduced. According to this arrangement, region segmentation of an image can be executed faster by the clustering processing.
Claims15
A method of processing an image by segmenting the image into a plurality of clusters, comprising:
- a cluster generation step of
- (a) allocating, when a distance between a feature vector of a processing target pixel that is selected from the image sequentially and a representative feature vector of a cluster that has the nearest representative feature vector to the feature vector of the processing target pixel in a plurality of pre-defined clusters is not more than a first distance threshold, the processing target pixel to the cluster which has the nearest representative feature vector to the feature vector of the processing target pixel in the plurality of pre-defined clusters, and,
- (b) when the distance between the feature vector of the processing target pixel and the representative feature vector of the cluster which has the nearest representative feature vector to the feature vector of the processing target pixel in the plurality of pre-defined clusters is more than the first distance threshold, defining a new cluster and allocating the processing target pixel to the new defined cluster;
- and
- a cluster merging step of merging, after said cluster generation step has been performed on a predetermined number of processing target pixels, a small cluster to a cluster having the nearest representative feature vector to a representative feature vector of the small cluster in the plurality of pre-defined clusters, wherein the small cluster is a cluster of which a number of allocated pixels is not more than a pixel count threshold.
A computer-readable storage medium which stores a program causing a computer to serve as:
- a cluster generation unit configured to
- (a) allocate, when a distance between a feature vector of a processing target pixel that is selected from the image sequentially and a representative feature vector of a cluster that has the nearest representative feature vector to the feature vector of the processing target pixel in a plurality of pre-defined clusters is not more than a first distance threshold, the processing target pixel to the cluster which has the nearest representative feature vector to the feature vector of the processing target pixel in the plurality of pre-defined clusters, and,
- (b) to define, when the distance between the feature vector of the processing target pixel and the representative feature vector of the cluster which has the nearest representative feature vector to the feature vector of the processing target pixel in the plurality of pre-defined clusters is more than the first distance threshold, a new cluster and to allocate the processing target pixel to the new defined cluster;
- and
- a cluster merging unit configured to merge, after said cluster generation step has been performed on a predetermined number of processing target pixels, a small cluster to a cluster having the nearest representative feature vector to a representative feature vector of the small cluster in the plurality of pre-defined clusters, wherein the small cluster is a cluster of which a number of allocated pixels is not more than a pixel count threshold.
An image processing apparatus for processing an image by segmenting the image into a plurality of clusters, comprising:
- a cluster generation unit configured to
- (a) allocate, when a distance between a feature vector of a processing target pixel that is selected from the image sequentially and a representative feature vector of a cluster that has the nearest representative feature vector to the feature vector of the processing target pixel in a plurality of pre-defined clusters is not more than a first distance threshold, the processing target pixel to the cluster which has the nearest representative feature vector to the feature vector of the processing target pixel in the plurality of pre-defined clusters, and,
- (b) to define, when the distance between the feature vector of the processing target pixel and the representative feature vector of the cluster which has the nearest representative feature vector to the feature vector of the processing target pixel in the plurality of pre-defined clusters is more than the first distance threshold, a new cluster and to allocate the processing target pixel to the new defined cluster;
- and
- a cluster merging unit configured to merge, after said cluster generation step has been performed on a predetermined number of processing target pixels, a small cluster to a cluster having the nearest representative feature vector to a representative feature vector of the small cluster in the plurality of pre-defined clusters, wherein the small cluster is a cluster of which a number of allocated pixels is not more than a pixel count threshold.
Dependencies are inferred from the claim text.