Remove temporal intensity changes in image series
4 次查看(过去 30 天)
显示 更早的评论
I have a series of images in which a person (relatively still) is in the foreground with a stationary background with controlled lighting. A structured light pattern is projected on to the scene and observed by a webcam. However, due to some noise source, the intensity of the complete image changes randomly though uniformly through out the series. I would like to compensate for this intensity change from the foreground. I thought about using an roi from the background and averaging its intensity per frame over time to somehow use as a reference signal. What would be the best approach for compensating this change in intensity in the foreground?
0 个评论
回答(1 个)
Bjorn Gustavsson
2021-4-23
I'd try something like this:
ImFiles = dir('*.png'); % well you have your images somehow...
roi_c = [11 37 17 51];
for iIm = numel(ImFiles):-1:1
currIm = double(imread(ImFiles(iIm).name));
rioAvg(i1,1) = mean2(currIm(roi_c(1):roi_c(2),roi_c(3):roi_c(4),1));
rioAvg(i1,2) = mean2(currIm(roi_c(1):roi_c(2),roi_c(3):roi_c(4),2));
rioAvg(i1,3) = mean2(currIm(roi_c(1):roi_c(2),roi_c(3):roi_c(4),3));
end
That should give you the RGB-intensity-averages in the image-regions.
When you subtract those background intensities you might have to ensure that the imagesc doesn't become negative to display with image, imagesc and imshow etc.
HTH
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!