How to reduce unwanted pixels?

3 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Get Started with Image Processing Toolbox 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by