Help To Crop Dilated Images

3 visualizaciones (últimos 30 días)
Tip Riel
Tip Riel el 5 de Feb. de 2016
Comentada: Tip Riel el 6 de Feb. de 2016
hi, how can I crop or get the ROI of the white area (the rectangle) of the image? I used imdilate then imfill.
here's the code:
%Dilation
Id = imdilate(gg1, strel('diamond', 1));
figure, imshow(Id); title('Dilation');
%Fill
If = imfill(Id, 'holes');
figure, imshow(If); title('Fill');

Respuestas (3)

Walter Roberson
Walter Roberson el 5 de Feb. de 2016
bwareafilt() and then look for the blob that best matches the right aspect ratio (in the bounding box) out of what is left ?

Image Analyst
Image Analyst el 5 de Feb. de 2016
If you know it's the blob closest to the center, you can compute the distance from the centroid to the center of the image and take the one that is closest. Or adapt my attached demo to find rectangles.
  1 comentario
Tip Riel
Tip Riel el 6 de Feb. de 2016
thanks sir I will try this one

Iniciar sesión para comentar.


Dima Lisin
Dima Lisin el 5 de Feb. de 2016
I would use regionprops. It can compute many shape parameters, such as area, perimeter, eccentricity, etc. You can probably come up with a some combination of those parameters, that will let you tell the license plane from the other shapes.
  1 comentario
Tip Riel
Tip Riel el 6 de Feb. de 2016
thanks sir I will try this one

Iniciar sesión para comentar.

Categorías

Más información sobre Computer Vision with Simulink en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by