-
sobel, canny, laplacian filterBase Line/python 기초 코드 2022. 12. 3. 12:16
import cv2 src = cv2.imread("normal.jpg", cv2.IMREAD_COLOR) gray = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY) sobel = cv2.Sobel(gray, cv2.CV_8U, 1, 0, 3) laplacian = cv2.Laplacian(gray, cv2.CV_8U, ksize=3) canny = cv2.Canny(src, 100, 255) cv2.imwrite('normal_canny.jpg', canny) #cv2.save #cv2.imshow("sobel", sobel) #cv2.imshow("laplacian", laplacian) #cv2.imshow("canny", canny) cv2.waitKey() cv2.destroyAllWindows()
'Base Line > python 기초 코드' 카테고리의 다른 글
리스트 딥카피 (0) 2023.08.24 Genetic Algorithm(feature selection) + LightGBM (0) 2022.08.25 Auto encoder (0) 2022.08.23 sklearn 회귀관련 모델 정리 (0) 2022.08.16 torch check list (0) 2022.08.14