Coding/Open CV
OpenCV_ROI,COI
잉_민
2022. 2. 14. 16:50
728x90
반응형
관심 영역(Region of Interest, ROI) 표시하기.
import numpy as np
array = np.zeros((1280,1920,3), np.uint8)//y,x,channal
x,y,w,h = 100,100,300,300 //시작점 크기
roi=array[x:x+w,y:y+h] //roi 자른다
print(array.shape)
print(roi.shape)
(1280, 1920, 3)
(300, 300, 3)
관심채널 : COI
import numpy as np
array = np.zeros((1280,1920,3), np.uint8)//y,x,channal
coi = array [:,:,0] //채널을 하나만 선택해서 용량을 줄인다.
print(array.shape)
print(coi.shape)
(1280, 1920, 3)
(1280, 1920)
728x90
반응형