How to fix Assertion Failure Opencv Programming - Visual C++ 2008 Express -
i made windows form based program load image using opencv in visual c++ 2008. but, following code failed load image, , got assertion failure.
private: system::void buttoncitra_click(system::object^ sender, system::eventargs^ e) { if (openfiledialog1->showdialog() == system::windows::forms::dialogresult::ok) { //error detected here variable citra citra = cv::imread(marshalstring(openfiledialog1->filename)); pictureboxcitra->image = iplimagetobitmap(&(iplimage) citra); this->width = pictureboxcitra->image->width+33; this->height = pictureboxcitra->image->height+85; } }
when compile , build it, nothing happened, , form appeared properly. when chose image using openfiledialog in directory file, got dialog box titled "microsoft visual c++ debug library" contains assertion failure,as follow :
"debug assertion failed! program: .....try.exe file f:\dd\vctools\crt_bld\self_x86\crt\src\fopen.c line 53 expression: (file!=null)"
Comments
Post a Comment