ROI Image Processing -- Approach Question

Hello,
I currently have images of the following nature:
The goal is to have the code display the mean value of each of the squares. The position of each square slightly shifts from image to image. The images are stored as 1024 x 1024 matrices (type = double). Any suggestions on what approach to take in this case?
Thank you for your time!

 채택된 답변

Image Analyst
Image Analyst 2017년 8월 29일
편집: Image Analyst 2017년 8월 29일

0 개 추천

Use regionprops
binaryImage = grayImage > 2e6;
binaryImage = bwareafilt(binaryImage, [3000, inf]);
labeledImage = bwlabel(binaryImage);
props = regionprops(labeledImage, grayImage, 'MeanIntensity');

댓글 수: 4

itend
itend 2017년 8월 29일
Many thanks!
I will certainly check out the tutorial :)
Quick clarifying question, I would like to automate the detection threshold (above you entered 2e6), how do I do this?
Is this the best method:
normalizedThresholdValue = 0.4; % In range 0 to 1.
thresholdValue = normalizedThresholdValue * max(max(originalImage)); % Gray Levels.
binaryImage = im2bw(originalImage, normalizedThresholdValue);
Any other methods that would be more applicable to my situation?
Thanks!
Image Analyst
Image Analyst 2017년 8월 30일
That's a quick question? Threshold selection can be a complicated subject.
You might start out with imbinarize(). If that doesn't work, you might try my triangle thresholding method, attached.
itend
itend 2017년 8월 30일
Didn't mean to be facetious! While working on my current set of problems, I am very quickly beginning to appreciate that ><
imbinarize seemed to do the trick!
Thank you!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2017년 8월 29일

댓글:

2017년 8월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by