# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 2
#     language: python
#     name: python2
# ---

# + deletable=true editable=true
import cv2
import matplotlib.pyplot as plt
# %matplotlib inline


# + deletable=true editable=true
# load the image and show some basic information on it
image = cv2.imread('hongkong_airport.jpg')
print "width: %d pixels" % (image.shape[1])
print "height: %d pixels" % (image.shape[0])
print "channels: %d" % (image.shape[2])



# + deletable=true editable=true
cv_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

plt.axis("off")
plt.imshow(cv_rgb)

# cv2.imwrite("newimage.jpg", image)

# %time

# + deletable=true editable=true
print "OpenCV Version : %s " % cv2.__version__


# +
import sys

sys.path.append('/code/opencv_tutorials')
from image_utils import Ipy

# + deletable=true editable=true


# + deletable=true editable=true
Ipy.showimage(image)
# %time

# + deletable=true editable=true


StarcoderdataJupyterScriptsDedupFiltered