%matplotlib inline
import numpy as np
from scipy import misc
import matplotlib.pyplot as plt
In [5]:
from skimage import data
photo_data = misc.imread('./wifire/sd-3layers.jpg')
type(photo_data)
Out[5]:
In [6]:
plt.figure(figsize = (15,15))
plt.imshow(photo_data)
Out[6]:
In [7]:
photo_data.shape
Out[7]:
In [8]:
photo_data.size
Out[8]:
In [9]:
photo_data.min(), photo_data.max()
Out[9]:
In [10]:
photo_data.mean()
Out[10]:
In [11]:
photo_data[150, 250]
Out[11]:
In [12]:
photo_data[150, 250, 1]
Out[12]:
In [14]:
photo_data[150, 250] = 0
plt.figure(figsize=(10,10))
plt.imshow(photo_data)
Out[14]:
In [15]:
photo_data[200 : 800 , : , 1] = 255
plt.figure(figsize=(10, 10))
plt.imshow(photo_data)
Out[15]:
In [16]:
photo_data[200 : 800 , : ] = 255
plt.figure(figsize=(10, 10))
plt.imshow(photo_data)
Out[16]:
In [17]:
photo_data[200 : 800 , : ] = 0
plt.figure(figsize=(10, 10))
plt.imshow(photo_data)
Out[17]:
'Python Library > Numpy' 카테고리의 다른 글
Day 4. Image Processing with a numpy -02 (0) | 2019.06.12 |
---|---|
Day 4. Numpy02 (0) | 2019.06.12 |
Day 3. Numpy01 (0) | 2019.06.11 |