<< DilateImage IPD - Image Processing Design DrawBoundingBoxes >>

IPD - Image Processing Design >> IPD - Image Processing Design > DistanceTransform

DistanceTransform

はエッジになる画像における距離変換を計算する

呼び出し

DistanceImage = DistanceTransform(EdgeImage);

引数

EdgeImage

2次元の行列で、型はbooleanである

DistanceImage

2次元の行列で、型はuint8で、次元はEdgeImageと同じである

説明

本関数はエッジになる画像における距離変換を計算する。

global IPD_PATH;

RGB = ReadImage(IPD_PATH + 'demos\teaset.png');

Image = RGB2Gray(RGB);

global EDGE_SOBEL;

Gradient = EdgeFilter(Image, EDGE_SOBEL);

EdgeImage = ~SegmentByThreshold(Gradient, 60);

DistanceImage = DistanceTransform(EdgeImage);

figure(); ShowImage(DistanceImage, 'Result of Distance Transform', jetcolormap(256));

参考

<< DilateImage IPD - Image Processing Design DrawBoundingBoxes >>