Finding sum of intensity in each frame of tif stack image
9 views (last 30 days)
Show older comments
Makunda Aryal
on 6 Nov 2022
Commented: Makunda Aryal
on 6 Nov 2022
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?
0 Comments
Accepted Answer
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));
end
t=table;
t.Frame = (1:num_images)';
t.Intensity = intensity';
writetable(t,'filename.txt')
More Answers (0)
See Also
Categories
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!