Finding sum of intensity in each frame of tif stack image

9 views (last 30 days)
I have 850 frames of tif image(16-bit) (41 by 41 pixels) and I want to find the sum of intensity of each frame and save that as text file for which first column would be frame number and second column sum of intensities. How can I do that?

Accepted Answer

Kevin Holly
Kevin Holly on 6 Nov 2022
[filename, folder] = uigetfile('*.tif*');
Image_info = imfinfo(fullfile(folder,filename));
num_images = numel(Image_info);% Find how many frames are in multi-TIFF file
for ii = 1:num_images
frame = imread(fullfile(folder,filename),ii, 'Info', Image_info);% Obtains last frames in image stack
intensity(ii) = sum(sum(frame));
t.Frame = (1:num_images)';
t.Intensity = intensity';

Sign in to comment.

More Answers (0)


Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!