1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Opencv2.4 画像の2値化処理

Posted at
hoge.cpp
// グレースケール画像を読み込む
// カラー画像の場合は、グレースケールに変換する
cv::Mat gray_imag=cv::imread("hoge.png");
cv::Mat bin_img;

// 引数は、入力画像、出力画像、閾値、出力画像の最大値、処理方法
cv::threshold(gray_img, bin_img, 0, 255, THRESH_BINARY);
1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?