Question: img 1 : Image 1 . img 2 : Image 2 . c 1 : Center ( in image coordinate ) of the window in

img1: Image 1.
img2: Image 2.
c1: Center (in image coordinate) of the window in image 1.
C2: Center (in image coordinate) of the window in image 2.
R: R is the radius of the patch, 2*R R 1 is the window size
Returns:
NCC matching score for two input windows.
"""
### YOUR CODE HERE
raise NotImplementedError("Delete this line once you implement the function")
### END YOUR CODE
return matching_score
```
[19]:
# Here is the code for you to test your implementation
img1= np.array([[1,2,3,4],[4,5,6,8],[7,8,9,4]])
img2= np.array([[1,2,1,3],[6,5,4,4],[9,8,7,3]])
result1= ncc_match(img1, img2, np.array([1,1]), np.array([1,1]),1)
# should print 7.69189
print(f"Result 1: {result1}")
result2= ncc_match(img1, img2, np.array([2,1]), np.array([2,1]),1)
# should print 7.61185
print(f"Result 2: {result2}")
result3= ncc_match(img1, img2, np.array([1,1]), np.array([2,1]),1)
# should print 5.63282
print(f"Result 3: {result3}")
 img1: Image 1. img2: Image 2. c1: Center (in image coordinate)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!