Can't read MatND (Bug #285)


Added by Sebastian Gerke almost 15 years ago. Updated almost 15 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:James Bowman % Done:

0%

Category:python bindings
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

The Python bindings lack support for reading MatNDs, while writing works. I added the following two lines to interfaces/python/cv.cpp:

@@ -2392,6 +2392,8 @@
     return FROM_IplImagePTR((IplImage*)r);
   else if (strcmp(t->type_name, "opencv-matrix") == 0)
     return FROM_CvMat((CvMat*)r);
+  else if (strcmp(t->type_name, "opencv-nd-matrix") == 0)
+      return FROM_CvMatNDPTR((CvMatND*)r);
   else if (strcmp(t->type_name, "opencv-haar-classifier") == 0)
     return FROM_CvHaarClassifierCascade((CvHaarClassifierCascade*)r);
   else {

History

Updated by James Bowman almost 15 years ago

Awesome. Thanks for the patch.

Applied in r3024, along with regression test in test_Save.

  • (deleted custom field) set to fixed

Also available in: Atom PDF