Drawing Line, Rectangle, Circle, Polygon

김민혁·2025년 1월 30일
0

컴퓨터 비전

목록 보기
5/19

Minhyeok의 Notion - 노션에서 옮기는 중

Rectangle

Rect rect = Rect(10, 10, 100, 100);
rectangle(image, rect, Scalar(255, 0, 0), 4, 8, 0);

Line

Point p1(25, 25), p2(100, 50);
line(image, p1, p2, Scalar(255, 0, 0), 3, 8, 0);

Polygon

Text

putText(image, format("width: %d, height: %d", w, h), Point(50,80), FONT_HERSHEY_SIMPLEX, 1, Scalar(0, 200, 200), 4);

Histogram

파일 저장

  • imwrite(~)
  • VideoWriter video(~)
    • video.write(frame);
    • video.release;
profile
해야한다면, 다 하게 되더라.

0개의 댓글