- Crop the two images appropriately to exclude the dark areas (with intensity values 0) using the function imcrop
- From the description of your question, it's a bit unclear what exactly it is that you want out of correlation. Typically, the function corr2 returns the 2-D correlation coefficient as a scalar, the function corrcoeff returns a matrix of correlation coefficients, or you could also use xcorr2 which would return the spatial correlation of image1 with respect to image2.
Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How can I correlate two images excluding a specific value?
조회 수: 1 (최근 30일)
이전 댓글 표시
My goal is to correlate these two images, but I need to exclude the values outside the red and blue squares. They are transparent in the original png, but get a value of 0 when imported to matlab.
Any help would be highly appreciated.

댓글 수: 0
답변 (1개)
Vinai Datta Thatiparthi
2020년 2월 7일
Hey Ariana,
A simple workflow would be -
The function that you finally end up using depends on the kind of output that you want out of correlation.
Hope this helps!
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!