image analysis of specified area in the image
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Jialin Men
il 22 Giu 2022
Commentato: Jialin Men
il 22 Giu 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
0 Commenti
Risposta accettata
Image Analyst
il 22 Giu 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.
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!