Analyzing the colour change over multiple images.
1 view (last 30 days)
Show older comments
Hello,
For my thesis project I need to analyse the intermixing region over multiple images (900 in total). I'm already able to plot the HSV values over the 900 frames. I was able to do this with a code I found in a previous question with a similar problem: https://nl.mathworks.com/matlabcentral/answers/1586589-variation-of-color-hue-over-time-for-multiple-images
Although this was already very helpfull, I would like to see the evolution (change) of the intermixing region over the 900 images in a single image. I know that you can use the 'deltaE' function to compute the change between 2 images (and the difference is then shown in a single image), but I would like to see the change over 900 images. Is it possible to make a script for this?
To clarify it more: In attachement are 4 images (from a total of 900 images), and I want to see the change of the intermixing region (the part were the two channels form one channel) over these 4 images in a single output.
Thank you in advance for the help.
0 Comments
Answers (1)
Akshat Dalal
on 19 Dec 2023
Edited: Akshat Dalal
on 19 Dec 2023
Hi Frederic,
I understand that you want to analyse the accumulated change of the intermixing region between 900 images in a single image. You could do it by iterating through all your images, capturing the difference between consecutive images, and then use the captured differences to create a histogram or any other data visualization plot. Here is an example script on how you could go about doing it:
% Initialize a variable to hold the differences
imageChanges = [];
% Specify the directory where the images are stored
imageDir = 'path_to_your_images'; % Change this to your images directory
imageFiles = dir(fullfile(imageDir, '*.jpg')); % Change the extension if needed
% Loop over all images to calculate the accumulated change
for i = 2:length(imageFiles)
% Read the current and previous image
currentImage = imread(fullfile(imageDir, imageFiles(i).name));
previousImage = imread(fullfile(imageDir, imageFiles(i-1).name));
% Calculate the absolute difference between the current and previous image
% You could also use deltaE - it computes Color difference based on CIE76 standard.
imageChange = abs(double(currentImage) - double(previousImage));
% Accumulate the change
imageChanges(end + 1) = imageChange
end
Once you have the difference's in the 'imageChanges' array, you could use it to to generate various plots and analyze the changes.
Hope this helps!
0 Comments
See Also
Categories
Find more on Image Processing Toolbox 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!