cv.setMouseCallback() 사용 시, 매개 변수 flags의 역할
import cv2 as cv import sys img = cv.imread("1.png") if img is None: sys.exit("해당 파일을 찾지 못하였습니다.") BrushSiz = 5 LColor,RColor = (255,0,0),(0,0,255) def painting(event,x,y,flags,param): if event == cv.EVENT_LBUTTONDOWN: cv.circle(img,(x,y),BrushSiz,LColor,-1) elif event == cv.EVENT_RBUTTONDOWN: cv.circle(img,(x,y),BrushSiz,RColor,-1) elif event == cv.EVENT_MOUSEMOVE and flags == cv.EVENT_FLAG_LBU..
더보기