Reputation:
I want to magnify certain part of the image and plot it as show in the figure. How can i do this using matplotlib library
Upvotes: 1
Views: 428
Reputation: 560
If you want to magnify the image there might be different ways. But the one which comes into my mind is if you crop the specific portion that you want to magnify and then scale up it and then you can do to this scaled-up image whatever you want. below is a sample code.
import cv2
# Reading the image
source = cv2.imread("ok.jpg",1)
# Croping the Image
crop = source[50:150,20:200]
# showing the image
cv2.imshow("Cropped Image",crop)
Upvotes: 1