- Either pre-define the region of interest in the image or,
- Select the region of interest using a line tool on the image when the function is called
Analyze intensity of a specific region.
2 views (last 30 days)
Show older comments
This is a fluorescence microscopic image of concrete sample. The darken areas represent the aggregates and the greentone area (the rest) is the cement paste. I'm trying to analyze the overall intensity of this cement paste (only in the cement paste) (without calculating the small green indications in the darken areas). Please could you help me to find a solution for this?
Also I'm looking for a matlab script to analyize more samples (similer to this one)

0 Comments
Answers (2)
Rahul
on 24 Dec 2024
To obtain and analyze the intensity of the given image and simillar images, intensity profiles obtained using 'improfile' function can be useful.
This function enables you to
Here is an example:
img = imread('RGB2.jpg');
imshow(img);
improfile; % This function provides a 3D intesity plot
The following MATLAB Answer can also be referred:
The following MathWorks documentation can be referred to know more:
Thanks.
0 Comments
DGM
on 24 Dec 2024
If you just want basic color statistics within a region:
% a color image
inpict = imread('image.jpeg');
% reduce it to some sort of single-channel image
% representing whatever "intensity" metric you want
inpict = im2gray(inpict); % this is BT601 luma
% select the region of interest
mask = inpict > 45;
% refine the mask by eliminating small speckles
mask = bwareaopen(mask,500);
mask = ~bwareaopen(~mask,500);
imshow(mask)
% select the pixels within the ROI
roipixels = im2double(inpict(mask));
% get the average value within the ROI
meanintensity = mean(roipixels) % represented in unit-scale
% get the standard deviation within the ROI
intensitystd = std(roipixels)
... and so on.
If you want to be more particular with the masking, you'd have to start deciding which of the questionable small regions belong in the foreground. If you only have a few images, it might be quickest to do some of the mask cleanup manually using the ROI tools and boolean combination of masks.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!