OpenCV: IplImage versus Mat, which to use?

后端 未结 11 1160
一整个雨季
一整个雨季 2020-12-13 01:56

I\'m pretty new to OpenCV (about 2 months now). I have the book Learning OpenCV by Bradski and Kaehler. My question is, if I want to do everything in a 2.0+ manner, when sho

11条回答
  •  轮回少年
    2020-12-13 02:11

    thanks for the help.

    I also discovered since posting this question that a function with a Mat as a argument can take an IplImage directly in the place of that Mat argument, which makes it pretty easy to update your code in chunks if it's already broken into convenient functions. Just change the function arguments from IplImage* to Mat, then modify the function to work on a Mat. Other code calling that function should still work fine (it has in my experience).

提交回复
热议问题