Some problem about displaying a raw image file
hello every body, last time I posted this question. I have a raw image of 256 by 256 with 8 bits per pixels. The image is a gray scale image. As per answer, I wrote the following code:
/*******************************************/
#include <opencv\cv.h>
#include <opencv\highgui.h>
#include <math.h>
using namespace cv;
int main(int argc, char** argv){
Mat img = Mat(256, 256, CV_8UC1);
img = imread("1.IMG", 1);
namedWindow( "RawImage", 1 );
imshow( "RawImage", img );
cvWaitKey();
return 0;
}
/**********************************************/
But I can't display the image. abort is called. Could anyone help me figure out the problem?
Thanks in advance.