In [ ]:
import cv2
import numpy as np
import matplotlib.pyplot as plt
In [ ]:
# read the left image
image_left = cv2.imread('left.jpg',0)
# read the right image
image_right = cv2.imread('right.jpg',0)
In [ ]:
# Initiate ORB detector
orb = cv2.ORB_create(nfeatures=5000)

# find the keypoints with ORB
kp1 = orb.detect(image_left,None)
kp2 = orb.detect(image_right,None)
# compute the descriptors with ORB
kp1, des1 = orb.compute(image_left, kp1)
kp2, des2 = orb.compute(image_right, kp2)
In [ ]:
image1_copy= image_left
image2_copy= image_right

image1_copy = cv2.drawKeypoints(image_left,kp1,None,(255,0,0),4)
image2_copy = cv2.drawKeypoints(image_right,kp2,None,(255,0,0),4)
In [ ]:
cv2.imshow("Left image",image1_copy)
cv2.imshow("Right image",image2_copy)
cv2.waitKey(0)