Last active
August 12, 2017 01:31
-
-
Save PeaceAndHiLight/02f43f5f92f5697ef43a to your computer and use it in GitHub Desktop.
Test Numpy Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import cv2 | |
import numpy as np | |
# 画像を読み込んでおきます | |
img = cv2.imread('sample.jpg') | |
# 画像の情報をみることができます | |
print 'ndim is ' + str(img.ndim) | |
print 'shape is ' + str(img.shape) | |
print 'size is ' + str(img.size) | |
print 'dtype is ' + str(img.dtype) |
python2で書いてあるので、3で書き直す必要がありますね。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test Numpy Method
ndim, shape, size, dtype