フィルターのクリア

How to make points on the contour of the picture?

3 ビュー (過去 30 日間)
Veronika
Veronika 2016 年 9 月 19 日
コメント済み: Veronika 2016 年 9 月 24 日
Dear all,
I tried to make points on the contour of the picture, like this:
This is my contour of picture:
Because I would like to after that create FEM model of this picture (contour).
This is my code:
clc;close all;clear all;
grayImage = imread('thorax-mdl.jpg');
[rows, columns, numberOfColorChannels] = size(grayImage);
if numberOfColorChannels > 1
grayImage = grayImage(:, :, 2);
end
mask_pater = grayImage > 220;
figure(3)
imshow(mask_pater);
contour(mask_pater,1,'b', 'LineWidth',4);
Thank you for your answers.
  2 件のコメント
KSSV
KSSV 2016 年 9 月 19 日
You should have attached the image...
Veronika
Veronika 2016 年 9 月 19 日
Sorry, I forgot. Here is the image.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2016 年 9 月 19 日
Lower your threshold and then call bwperim() or bwboundaries().
  13 件のコメント
Image Analyst
Image Analyst 2016 年 9 月 24 日
(Sigh) Veronika, yes you do. You do need to use a binary image. Don't you remember that you said you had to use a threshold of exactly 220? Well, what does that do? It creates a binary image.
Alright, I did it for you. Just look at the code attached below the images it creates.
See -- the outlines are exactly around the small really bright blobs which you wanted. These regions are from the binary image you got when you thresholded at 220. I even put the little circles on the boundaries like you wanted.
Veronika
Veronika 2016 年 9 月 24 日
Thank you VERY much!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by