Matlplotlib+OpenCV

Matplotlib is a plotting library for Python which gives you wide variety of plotting methods.You can zoom images, save it etc using Matplotlib.
First of all to use matplotlib you need to have certain other libraries too:
1.)Numpy
2.)Dateutil
3.)Pytz
4.)Pyparsing
5.)Six

All of these can be found at — LINK

After setting up everything you will now be able to peacefully use matplotlib.

Here is an example code:

import numpy as np
import cv2
from matplotlib import pyplot as plt

img = cv2.imread('image.jpg',0)
plt.imshow(img, cmap = 'gray', interpolation = 'bicubic')
plt.xticks([]), plt.yticks([]) # to hide tick values on X and Y axis
plt.show()

For further info on matplotlib visit — LINK

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s