필터 지우기
필터 지우기

Normalized Cross Correlation for rgb image

조회 수: 4 (최근 30일)
Nataliya
Nataliya 2014년 12월 14일
답변: Image Analyst 2014년 12월 14일
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
Mohammad Abouali
Mohammad Abouali 2014년 12월 14일
Sorry, but that is not Normalized cross correlation even for a gray scale image.
Nataliya
Nataliya 2014년 12월 14일
Are you sure? Can you provide me the code for normalized cross correlation?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2014년 12월 14일
See my attached demo of it.

추가 답변 (0개)

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by