フィルターのクリア

How to reduce unwanted pixels?

2 ビュー (過去 30 日間)
Thuy Dung Nguyen
Thuy Dung Nguyen 2018 年 8 月 3 日
編集済み: Thuy Dung Nguyen 2018 年 8 月 3 日
From a grayscale image I already segmented the main region into a binary image. What I want right now is to reduce the unwanted pixels between each part of the main region as much as possible. It's a little bit difficult because as you can see in the original image, there's no change in the intensity. I'm thinking about finding the centroid of the circle and directions of each parts and the angles between them. So that I can set the pixels in the defined region black. It's just an idea and I dont know how to make it work. If you guys have any ideas to solve this problem, please help.
Pictures provided for understanding. Thank you all
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 8 月 3 日
Which pixels are unwanted pixels?
Thuy Dung Nguyen
Thuy Dung Nguyen 2018 年 8 月 3 日
those are the parts which connect each part of the spray together. I want to get rid of them to get 8 separate parts of the sprays.

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

採用された回答

Guillaume
Guillaume 2018 年 8 月 3 日
Your image looks like a shadowgraph or schlieren image of some spray and it looks like you've got some very strong density gradients in your background. Can your test conditions be better controlled to avoid these density gradient? It may be easier than trying to fix the image processing problem.
Otherwise, finding the centroid of the nozzle is fairly simple. An opening of your binary image should isolate the central part from the sprays.
imgopened = imopen(yourbinaryimage, strel('disk', 8));
imshow(imgopened)
props = regionprops(imgopened, {'Centroid', 'Orientation'});
centroids = vertcat(props.Centroid); %location of centroids of all the blobs
[height, width] = size(imgopened);
[~, row] = min(hypot(centroids(:, 1) - width/2, centroids(:, 2) - height/2)); %find nearest centroid to image centre
nozzlecentroid = centroids(row, :)
hold on; plot(nozzlecentroid(1), nozzlecentroid(2), 'r*');
You could use the orientation property returned by regionprops to help find the axis of the sprays , then find the edge. Sorry I haven't got the time to write that for you.
  1 件のコメント
Thuy Dung Nguyen
Thuy Dung Nguyen 2018 年 8 月 3 日
編集済み: Thuy Dung Nguyen 2018 年 8 月 3 日
Thank you for your answer. It's exactly the schlieren image of a spray. Unfortunately the test condition can not be better controlled. I've come to the conclusion that the strong background can not be separated from the spray because of the unchanged intensity. What I want to do right now is to get 8 separate parts of the spray as clean as possible. So at least the bigger ring disappears and the image looks cleaner. A little part of the background attached to the spray is acceptable.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by