Profile of image in grey scales
4 ビュー (過去 30 日間)
古いコメントを表示
Good afternoon, I would really appreciate if you could help me with a particular issue related with image analysis. I have a set of images in grey scales. From the images I require to get an edge of the profile. I have tried different commands to get the profile or edge of the flow. Using canny and imerode and imdilate commands the best that I got is as shown in the image. However I need to get an edge of the whole profile as with the red line in image attached.
Any suggestions
Thanks a lot in advance
Best regards,
The script for this part is:
threshold = graythresh(MyImage); bw = im2bw(MyImage,threshold); se = strel('disk',2); bw = imclose(bw,se); BWsdil = imdilate(bw, se); BWsdil = bwperim(BWsdil); BWoutline=edge(BWsdil, 'canny',0,1);
Segout = MyImage; Segout(BWoutline) = 255;
figure(1), imshow(Segout)

0 件のコメント
回答 (2 件)
Image Analyst
2013 年 4 月 23 日
You don't need edge detection at all. Just threshold and go along column by column using find() to find the top row. Something like (untested)
binaryImage = grayImage > 50; % Adjust the value to eliminate dark background.
binaryImage = bwareaopen(binaryImage, 200); % Get rid of blobs smaller than 200
imshow(binaryImage);
[rows columns] = size(binaryImage);
topRows = rows * ones(rows, columns, 'int32'); % Initialize
for col = 1 : columns
topRows(col) = find(binaryImage(:, col), 1, 'first');
end
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
