How to select the desired object in a certain region in an image?

8 visualizaciones (últimos 30 días)
Wenying Zhang
Wenying Zhang el 3 de Jul. de 2020
Comentada: Image Analyst el 4 de Jul. de 2020
Hi all,
I have plenty images to process and calculate the frost area/ volume on a heat exchanger. First, I have some local images and I used matlab to crop them to a certain size that I have only two fins. Then, I want to calculte the triangle area between fins and tubes because I want to calculate the frost area = the difference of this trangle area between images. Thanks to this forum, I've been able to crop the images, deblur the images, covert them to binary image, find the closed area/ objects in the image, label the objects and calculate the areas.
However, there are about 30 objects in each image and I just need two of them in the central part (The green and yellow triangles, for example). How can I select and output the information, like shape, areas, centroids of those two objects? Can I achieve this based on the boundary limitation of the initial triangle region? Also, How can I plot the difference of image 1 and 2, so that I can show the frost thickness?
Thank you in advance!

Respuestas (2)

Wenying Zhang
Wenying Zhang el 3 de Jul. de 2020
I suppose "polygon" and "inpolygon" can be used to achieve the goal.
  3 comentarios
Wenying Zhang
Wenying Zhang el 4 de Jul. de 2020
Editada: Wenying Zhang el 4 de Jul. de 2020
For example, I can find two desired centroids in the 1st image and imwrite the information I need. However, I have noise in the 2nd image and I have to manually choose the info I want.
Wenying Zhang
Wenying Zhang el 4 de Jul. de 2020
I found "bwareaopen" can be used for removing small noise. This might be helpful for the beginning, when the desired triangle areas are larger. However, in the later process, those areas can become much smaller, close to the noise...

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 4 de Jul. de 2020
Just check the area and centroid and throw out those that aren't close enough to the middle and large enough
labeledImage = bwlabel(binaryImage);
props = regionprops(labeledImage, 'Area', 'Centroid');
allAreas = [props.Area];
xy = vertcat(props.Centroid);
y = xy(:, 2);
[rows, columns] = size(binaryImage);
keepers = (area >= minimumAcceptableSize) & (abs(y - rows/2) > rows/8)) % Find big blobs in the middle quarter of the image.
% Get new binary image
binaryImage = ismember(labeledImage, find(keepers));
% Get new properties
props = regionprops(binaryImage, 'Area')
  6 comentarios
Wenying Zhang
Wenying Zhang el 4 de Jul. de 2020
As I said, at the beginning, the gap between the fin and tubes are large and there is no frost. The noise are all smaller and far away from the middle. However, as what I attached, the gap between the frost become smaller and it also moves away from the middle. Now, it's the tricky part to divide the noise and the desired objects. For your question, I know it's noise because it' clear in the original images. I can show you a series of the images as time goes by. The latter part is really diffcult to calculate.
Image Analyst
Image Analyst el 4 de Jul. de 2020
I don't see a problem. When the frost grows and the ice blobs merge, of course they will eventually merge into a giant blob, and your measurements will reflect that. Why not just subtract the time zero image from all the others to find out what pixels are now icy? The total area of all ice blobs would be a good metric for how much frost accumulation there is. Why do you need anything beyond that?

Iniciar sesión para comentar.

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by