Azzera filtri
Azzera filtri

Correlation of 300 frames

3 visualizzazioni (ultimi 30 giorni)
SUJITH D S
SUJITH D S il 17 Apr 2021
Commentato: SUJITH D S il 18 Apr 2021
Please provide a solution for how to find a correlation value for 300 frames by considering its pixel values and stored it in array or some memory space. For example if we found correlation of first and second image, we will get one correlation value like 0.9. Then we should find a correlation between second and third image, third and fourth, etc. Like this how to find for 300 adjacent images.

Risposta accettata

Austin Thai
Austin Thai il 17 Apr 2021
You can use the 2-D correlation coefficient function
corr2(A,B)
Depending on how the data for your frames are stored, you can write a for loop to compare consecutive pairs.
For example, if you had a 3D array of frames called frameArray that is 512x512x300 :
imageCorrelation=zeros(299,1)
for i=1:299
imageCorrelation(i)=corr2(frameArray(:,:,i),frameArray(:,:,i+1))
end
  16 Commenti
SUJITH D S
SUJITH D S il 17 Apr 2021
Please change and send the code sir it's more important for me sir please
SUJITH D S
SUJITH D S il 18 Apr 2021
Please can u solve this below error sir... I'm getting an error like this...
Subscripted assignment dimension mismatch.
Error in matlab1 (line 3)
frameArray(:,:,i)=imread(['images/frame' num2str(i-1) '.jpg'])

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by