영상처리3 [OpenCV] Histogram (Stretching, Equalization) 히스토그램 (Histogram) Histogram : 이미지를 구성하는 픽셀값 분포에 대한 그래프 x축은 픽셀값 (범위 0~255) 즉 밟기 레벨을 의미 , y축은 이미지에 해당 픽셀값을 가진 픽셀의 갯수를 의미한다. 좌측으로 치우친 픽셀 수가 많을수록 색상이 어둡고 덜 선명하게 표현되며, 우측으로 치우친 픽셀 수가 많을 수록 색상이 더 밝고 진하게 표현된다. 보통 갯수로 표현시 영상의 크기에 따라 빈도 경향이 달라지므로 전체 픽셀수로 나눈 Normalizaed Histogram을 사용한다. 히스토그램 스트레칭 (Histogram Stretching) 영상 내 픽셀의 최소, 최대값의 비율을 이용하여 고정된 비율로 영상을 낮은 밝기를 높은 밝기로 당겨주는 처리, 즉 특정 밝기 영역에 영상픽셀의 밝기값이 집.. Computer Vision 2021. 8. 31. [OpenCV] 색상공간변환 (Grayscale, YCbCr) + Pretrained Model에 Grayscale Image 학습 시키는 방법 OpenCV 색상 공간 변환 함수 # main code import cv2 src = cv2.imread("Image/crow.jpg", cv2.IMREAD_COLOR) dst = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY) cv2.imshow("src", src) cv2.imshow("dst", dst) cv2.waitKey() cv2.destroyAllWindows() # detailed code dst = cv2.cvtcolor(src, code, dstCn) src : 입력 이미지 code : 색상 변환 코드 dstCn : 출력 채널 dst : 출력 이미지 [채널 범위] 형식 범위 CV_8U 0 ~ 255 CV_16U 0 ~ 65535 CV_32F 0 ~ 1 [색상 공간 코.. Computer Vision 2021. 8. 22. [CS131] Lecture 3 & 4 (Convolutions, Cross-Correlation, Seperable Filters) 본 게시글은 Standford University (Department of Computer Science)의 강의 자료를 바탕으로 공부한 내용입니다. Images that we deal in computer vision are digital. (discrete representations of the photographed scenes). Image is also treated as a function f : $R^2$ → $R^N$ eg) Part 1 : Convolutions Convolution : System that uses information from neighboring pixels to filter the target pixel Commutative Property (교환 법칙) Shi.. Computer Vision/CS131 2021. 7. 18. Prev 1 Next