Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

C++ map with <cv::mat, iplimage*=""> key-value format

Hello,

I am trying to create a key-value pair (keyed by Mat images and associated values are in IplImage*). The fraction of my code that does the job is as follows:

   std::map<cv::Mat, IplImage*> testObj;
   cv::Mat testMat = cv::Mat();
   IplImage* testIplImagePtr = new IplImage();

   testObj[testMat] = testIplImagePtr; // So that it either inserts or updates

This is giving me error "cannot convert from cv::MatExpr to bool". I cannot understand why this is making a problem. Is it because IplImage is used in the internal structure of cv::Mat class?