Ask Your Question
0

i get a solid grey color on my window if i open a image [closed]

asked 2013-07-05 04:07:34 -0600

YOGENDRARP gravatar image

updated 2013-07-05 04:11:55 -0600

Guanta gravatar image

Steve sir as u said i tried with new versions of opencv but problem still pertains.. please help me out this is the code

#include "stdafx.h"
#include "cv.h"      
#include "highgui.h"

int _tmain(int argc, _TCHAR* argv[])
{
 IplImage* img = cvLoadImage( "image" );
 cvNamedWindow( "MyJPG", CV_WINDOW_AUTOSIZE );
 cvShowImage("MyJPG", img);
 cvWaitKey(0);
 cvReleaseImage( &img );
 cvDestroyWindow( "MyJPG" );
 return 0;
}
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by StevenPuttemans
close date 2013-07-05 04:22:12.753080

Comments

Since you have already a topic open about this, please use that topic to continue looking for a solution. I shall copy the answer of @Guanta to that topic.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-05 04:19:35 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-07-05 04:15:08 -0600

Guanta gravatar image

Guess your path is simply wrong, currently it searches after "image". Don't you mean "image.jpg" or "image.png" or sth else? You are using also the C-API, I can only recommend to switch to C++ , see e.g. http://docs.opencv.org/doc/tutorials/introduction/display_image/display_image.html#display-image .

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-07-05 04:07:34 -0600

Seen: 84 times

Last updated: Jul 05 '13