Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

no, you can't malloc() a cv::Mat, it's a complex structure, that relies on its constructor being called properly, and you're not doing that.

no, you can't malloc() a cv::Mat, it's a complex structure, that relies on its constructor being called properly, and you're not doing that.

new/delete would be a differernt story, but please, try to avoid that, too. (along with all unnessecary manual memory manegement).

prefer auto storage, and use vector<mat> and such, this is c++, not C !

no, you can't malloc() a cv::Mat, it's a complex structure, that relies on its constructor being called properly, and you're not doing that.

new/delete would be a differernt story, but please, try to avoid that, too. (along with all unnessecary manual memory manegement).

prefer auto storage, and use vector<mat> vector<Mat> and such, this is c++, not C !

no, you can't malloc() a cv::Mat, it's a complex structure, that relies on its constructor being called properly, and you're not doing that.

new/delete would be a differernt story, but please, try to avoid that, too. (along with all unnessecary manual memory manegement).management, and also raw pointers in general).

prefer auto storage, and use vector<Mat> and such, this is c++, not C !

no, you can't malloc() a cv::Mat, it's a complex structure, that relies on its constructor being called properly, and you're not doing that.

new/delete would be a differernt different story, but please, try to avoid that, too. (along with all unnessecary manual memory management, and also raw pointers in general).

prefer auto storage, and use vector<Mat> and such, this is c++, not C !

no, you can't malloc() a cv::Mat, it's a complex structure, c++ class, that relies on its constructor being called properly, and you're not doing that.

new/delete would be a different story, but please, try to avoid that, too. (along with all unnessecary manual memory management, and also raw pointers in general).

prefer auto storage, and use vector<Mat> and such, this is c++, not C !

  • no, you can't malloc() a cv::Mat, it's a complex c++ class, that relies on its constructor being called properly, and you're not doing that.

  • new/delete would be a different story, but please, try to avoid that, too. (along with all unnessecary manual memory management, and also raw pointers in general).

  • prefer auto storage, and use vector<Mat> and such, this is c++, not C !

  • again, please reconsider your general design with this.