# in image processingm how can we find the location of the correlation coefficient maximum for two consecutive frames?

2 Ansichten (letzte 30 Tage)
Parastoo am 8 Feb. 2024
Kommentiert: Image Analyst am 8 Feb. 2024
Dear Friends,
I hope this message finds you well.
I am currently working on a project that involves conducting correlation analysis between every pair of consecutive frames in a dataset. To achieve this, I'm utilizing the corr2 function to compute the correlation coefficients.
However, I am in need of assistance with locating the maximum correlation coefficient within each pair. Could anyone kindly provide guidance on how to accomplish this task? Any help or advice you could offer would be greatly appreciated.
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

Image Analyst am 8 Feb. 2024
See my attached demos for going through frames of a video. You just need to have a loop that starts at the second frame and compute the coefficient between the current frame and the prior one and store the result into an array. Then when the loop is done and all correlation coefficients have been computed, you can use max to find the frame and value that has the highest correlation coefficient. Let me know if you can't figure it out (adapt it).
##### 2 KommentareKeine anzeigenKeine ausblenden
Parastoo am 8 Feb. 2024
Thank you so much for your kind reply. I understand the logic of your code. However, what I actually need is not the maximum of the correlation peak among all of my frames. Instead, I require the location of the correlation peak for every two consecutive frames.
Image Analyst am 8 Feb. 2024
Oh, then you need normxcorr2. See attached example.

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Region and Image Properties finden Sie in Help Center und File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by