DrawBoundingBoxes(BlobList, Color, FigureHandle);
ブロブの特徴を含むリストで、AnalyzeBlobsで生成される
構成要素3つになるベクトルで、 各構成要素は0以上で、1以下である
境界する四角を描くが描かれるウィンドーのハンドルである。本引数はオプショナルである。指定されないと、現在のウィンドーに描かれる。
RGB = imread('contrib\IPD-5.0\demos\teaset.png'); Image = RGB2Gray(RGB); ThresholdedImage = SegmentbyThreshold(Image, 200); BlobImage = SearchBlobs(ThresholdedImage); FilteredBlobImage = FilterBySize(BlobImage, 100); // Small objects are removed. IsCalculated = CreateFeatureStruct(%f); // Feature struct is generated. IsCalculated.BoundingBox = %t; // The bounding box shall be calculated for each blob. BlobStatistics = AnalyzeBlobs(FilteredBlobImage, IsCalculated); Figure = figure(); ShowImage(FilteredBlobImage, 'BlobImage', jetcolormap(16)); DrawBoundingBoxes(BlobStatistics, Figure, [1 1 1]); // Bounding boxes are drawn in white.