비전/opencv

numpy 객체를 내부에서 이미지 데이터로 변환하기

스스배 2021. 7. 15. 13:52
data = np.full((300,300), 125)

buffer = cv2.imencode(".jpg", data)[1].tobytes()

dst = cv2.imdecode(np.frombuffer(buffer, np.uint8), -1)