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.

cv::Mat の演算を高速化したいです

Last updated at Posted at 2012-03-16

OpenCVで画像処理していたら、以下のような計算で時間がかかってました。RGB画像をプレーンごとに係数掛けて足しています。バイラテラルフィルタよりかなり遅い(5倍程度)のが腑に落ちない・・・・・・。

dst_plane[0] = sc_r[0]*src_plane[0] + sc_g[0]*src_plane[1] + sc_b[0]*src_plane[2] + shift_r;
dst_plane[1] = sc_r[1]*src_plane[0] + sc_g[1]*src_plane[1] + sc_b[1]*src_plane[2] + shift_g;
dst_plane[2] = sc_r[2]*src_plane[0] + sc_g[2]*src_plane[1] + sc_b[2]*src_plane[2] + shift_b;
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?