BE/C++
[OpenCV][C++] opencv tracking 함수
coding_jelly
2019. 5. 11. 19:41
opencv 함수 중 tracking 구현
1) boundingBox 초기화
tracker->init(video.frame[0], boundingbox);
2) tracker를 update하고 init bondingbox와 가장 유사한 새로운 bounding box를 찾는다.
tracker->update(video.frame[0], boundingbox);
3) 이미지에 사각형그리기
rectangle(video.frame[i], bbox, Scalar(0,255,0), 2,1);
//인자의 순서는 이미지, bundingbox,사각형 그릴 색상, 사각형의 굵기, shift값