1

I'm coding using Jupyter Notebook with Python 2 + OpenCV 3, and I need to show my results using images. The images are very small and it's hard to observe the results.

from matplotlib import pyplot as plt
import cv2

thresh = 127
maxValue = 255
file_path = "dados/page1.jpg"
%matplotlib notebook

image = cv2.imread(file_path)
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
plt.title("First image")
plt.imshow(gray_image)

Output image

Image is too small. How can I zoom it?

1 Answer 1

1

As usual you can set the figure size using

plt.figure(figsize=(8,12))

The maximal figure size is (50,50), however you need to choose sensible values yourself depending on your screen size.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.