0
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.

OpenCV の NORM_RELATIVE_L2

Posted at

cv::norm を使おうとしてネットに上がっているリファレンスを読んだら相対差分値ノルムなるものがあって使おうとしたら,そんなものは無いとコンパイラに怒られた.
環境は OpenCV 2.4.11 / 3.0

NORM_RELATIVE_L2 は無くて, cv::NORM_RELATIVE | cv::NORM_L2 としなければならない.(INFもL1も同様)

ちゃんと書く気もなかったので適当ですが,少しハマってOpenCVのソースを追っかけるはめになったのでメモ.

OpenCV 3.0 のヘッダから引用すると

opencv2/core/base.hpp
enum NormTypes { NORM_INF       = 1,
                 NORM_L1        = 2,
                 NORM_L2        = 4,
                 NORM_L2SQR     = 5,
                 NORM_HAMMING   = 6,
                 NORM_HAMMING2  = 7,
                 NORM_TYPE_MASK = 7,
                 NORM_RELATIVE  = 8, //!< flag
                 NORM_MINMAX    = 32 //!< flag
               };

おっ,フラグって付いてる.

0
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
0
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?