Borrar filtros
Borrar filtros

Normalized Cross Correlation for rgb image

4 visualizaciones (últimos 30 días)
Nataliya
Nataliya el 14 de Dic. de 2014
Respondida: Image Analyst el 14 de Dic. de 2014
Here is the code for to find normalized cross correlation between two images.
function NK = NormalizedCrossCorrelation(origImg, distImg)
origImg = double(origImg);
distImg = double(distImg);
NK = sum(sum(origImg .* distImg)) / sum(sum(origImg .* origImg));
But it works for grey scale images. When I run it for rgb image, error occurred: ??? Error using ==> mrdivide Inputs must be 2-D, or at least one input must be scalar.
Error in ==> NormalizedCrossCorrelation at 15 NK = sum(sum(origImg .* distImg)) / sum(sum(origImg .* origImg)); Can you please help me modify this code for rgb image. Thanks in advance.
  2 comentarios
Mohammad Abouali
Mohammad Abouali el 14 de Dic. de 2014
Sorry, but that is not Normalized cross correlation even for a gray scale image.
Nataliya
Nataliya el 14 de Dic. de 2014
Are you sure? Can you provide me the code for normalized cross correlation?

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Dic. de 2014
See my attached demo of it.

Más respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by