소스 뷰어
# 컬러 영상 읽기
import numpy as np
from matplotlib import pyplot as plt
# 컬러 영상 읽기
plt.imshow( plt.imread( 'messi5.jpg' ) )
plt.show()
import numpy as np
from matplotlib import pyplot as plt
# 컬러 영상 읽기
img = plt.imread( 'messi5.jpg' )
# 관심 영역 추출
margin = 0.10
height = img.shape[0] ; width = img.shape[1]
mh = int( height*margin )
mw = int( width*margin )
roi = img[ mh : -mh, mw : -mw ]
plt.imshow( roi ); plt.show()