Remove temporal intensity changes in image series

2 visualizaciones (últimos 30 días)
ecartman22
ecartman22 el 23 de Abr. de 2021
Respondida: Bjorn Gustavsson el 23 de Abr. de 2021
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?

Respuestas (1)

Bjorn Gustavsson
Bjorn Gustavsson el 23 de Abr. de 2021
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

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by