LoginSignup
1
1

More than 5 years have passed since last update.

OpenCVのdrawContoursに関するメモ書き

Posted at

drawContours()

findContours()などで取得した輪郭を描画する関数。

使い方

基本的なところはopencv.orgにある。

CV_FILLEDってなんだ

opencv.orgにあったソースコードではthicknessにCV_FILLEDが指定されていた。

main.cpp
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace std;

int main(int argc, char** argv)
{
    std::cout << "CV_FILLED is " << CV_FILLED << std::endl;
}
result
CV_FILLED is -1

CV_FILLEDは-1のことだった。負の数を指定することで塗りつぶしを行っている。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1