Borrar filtros
Borrar filtros

image analysis of specified area in the image

1 visualización (últimos 30 días)
Jialin Men
Jialin Men el 22 de Jun. de 2022
Comentada: Jialin Men el 22 de Jun. de 2022
Hallo everyone,
I have a question about image analysis. I have this following picture.
I only would like to know the specified part(the part surrounded by the green line) which i want to investigate.
Picture size is 64*48.
How i could know that part position and take all that matrix value from that area out?
Thanks so much in advance
JL

Respuesta aceptada

Image Analyst
Image Analyst el 22 de Jun. de 2022
That picture has more resolution than 64x48.
To get a mask for the green encircled regions in your starting image, you can do
[rows, columns, numberOfColorChannels] = size(rgbImage)
[r, g, b] = imsplit(rgbImage);
greenMask = r == 0 & g == 255 & b == 0;
% Fill to make solid
greenMask = imfill(greenMask, 'holes');
% Get mean values inside mask
meanR = mean(r(greenMask))
meanG = mean(g(greenMask))
meanB = mean(b(greenMask))
% Get mean values outside mask
meanRout = mean(r(~greenMask))
meanGout = mean(g(~greenMask))
meanBout = mean(b(~greenMask))
We don't know what to do next because what you said you want to do is so vague. Like exactly what does " take all that matrix value from that area out" mean? Do you want to crop the bounding box out to a new image? Do you want the mean R, G, and B in the regions? Do you want to mask the original image, blackening inside the green outlines? Do you want to measure areas or perimeters? Something else? I have no idea.
Please read
and clarify your request.
  1 comentario
Jialin Men
Jialin Men el 22 de Jun. de 2022
Thanks so much for your reply.
Matrix value that i use is not RGB value. I did EDX analysis, get values from it, and the values form is also 64*48.
As you see, similar like this picture. i just want to get all the values which inside of the red lines. therefore i need to know its positions(x,y) and then i could take values from it.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by