OpenCV

행동 영상을 탐지한 후에, BBOX에 한글을 출력하고자 했다. ChatGPT에게 물어봤더니, opencv-contrib-python을 설치한 후 freetype 으로 하면 된다고 아래와 같이 샘플 코드를 제시해주었다 import cv2 import numpy as np # 이미지를 불러오거나 생성합니다. image = np.zeros((500, 500, 3), dtype=np.uint8) # freetype 모듈을 불러옵니다. ft = cv2.freetype.createFreeType2() # 한글 폰트 파일의 경로를 지정합니다. font_path = 'NanumGothic.ttf' ft.loadFontData(fontFileName=font_path, id=0) # 이미지에 텍스트를 추가합니다. 위치,..
이미지는 array이지만 현실 세계에서는 파일로 저장하고, 파일마다 형식이 다르게 존재하고 있음. 파일 형식에 따라 이미지를 다양한 값의 조합으로 구현함(확장자가 중요한 것은 아님) 제일 중요한 것은, 파일을 불러와서 해석할 수 있어야 함 # tensorflow - GPU import tensorflow as tf im = tf.io.read_file('moon.jpg') t= tf.image.decode_image(im) ss = tf.cast(t, 'float32') ss/127.5 - 1 # -1 ~ 1로 만듦 # Opencv - CPU import cv2 s = cv2.imread('moon.jpg) s.dtype >> dtype('uint8') #강도 python opencv는 numpy 기본으..
Gaussian Filter와 Bilateral Filter의 차이점 https://dsp.stackexchange.com/questions/8316/the-difference-between-bilateral-filter-and-gaussian-filter The Difference Between Bilateral Filter and Gaussian Filter I would like to know the basic differneces between Gaussian filter and Bilateral filter in digital image processing... I just know that both are used to smooth out an image but I would really ap..
Hanna 한나
'OpenCV' 태그의 글 목록