user15957418
user15957418

Reputation:

How to magnify certain part of the image?

I want to magnify certain part of the image and plot it as show in the figure. How can i do this using matplotlib libraryenter image description here

Upvotes: 1

Views: 428

Answers (1)

AlixaProDev
AlixaProDev

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

Related Questions