How to reduce unwanted pixels?

3 visualizaciones (últimos 30 días)
Thuy Dung Nguyen
Thuy Dung Nguyen el 3 de Ag. de 2018
Editada: Thuy Dung Nguyen el 3 de Ag. de 2018
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 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 3 de Ag. de 2018
Which pixels are unwanted pixels?
Thuy Dung Nguyen
Thuy Dung Nguyen el 3 de Ag. de 2018
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.

Iniciar sesión para comentar.

Respuesta aceptada

Guillaume
Guillaume el 3 de Ag. de 2018
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 comentario
Thuy Dung Nguyen
Thuy Dung Nguyen el 3 de Ag. de 2018
Editada: Thuy Dung Nguyen el 3 de Ag. de 2018
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by