フィルターのクリア

Outline of an image

24 ビュー (過去 30 日間)
Thanos Lampridis
Thanos Lampridis 2016 年 9 月 3 日
回答済み: Image Analyst 2016 年 9 月 3 日
I have a .bmp image of one tool.I want to find the outline of the object but not with the use of imcontour but with the help of bwtraceboundary or something familiar.How can i achieve this?What will appear is a Q matrix
and i want to convert it as a table.I'm new to matlab so there are still much things to learn.Please help.

回答 (1 件)

Image Analyst
Image Analyst 2016 年 9 月 3 日
First make sure you have a binary image. If you have a gray scale image, do this first
binaryImage = grayImage > 128;
Then call imclearborder() and bwboundaries()
binaryImage = imclearborder(binaryImage);
boundaries = bwboundaries(binaryImage);
x = boundaries{1}(:, 2);
y = boundaries{1}(:, 1);
hold on;
plot(x, y, 'r-', 'LineWidth', 2);

カテゴリ

Help Center および File ExchangeCode Generation, GPU, and Third-Party Support についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by