Remove temporal intensity changes in image series
조회 수: 3 (최근 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!