0

I am using openCV2.3.1 on windows7 in visual studio 2010, and whenever i try to create an image with cvCreateImage() it gives an unhandled exception. But when I try my code on code blocks it runs without errors.

here is my code

imgToTreate = cvCreateImage (cvSize (250, 250), IPL_DEPTH_8U, 1);
cvResize(img, imgToTreate);

I don't understand why, I need your help...

thank you !

user1931907
  • 41
  • 10

1 Answers1

0

You need to check that:

  • img is loaded correctly in Visual Studio (you use relative paths, don't you?)
  • img has the same type and number of channels as imgToTreate.
Barney Szabolcs
  • 11,846
  • 12
  • 66
  • 91