Analyzing the colour change over multiple images.
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Akshat Dalal
2023-12-19
编辑:Akshat Dalal
2023-12-19
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 个评论
另请参阅
类别
在 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!