Reading 16 bit unsigned raw image in c++ -
i trying read 16 bits unsigned image (192*256) saved in raw format using following lines of code:
file * pfile; pfile = fopen("d:\\s1.raw", "r"); unsigned short bufferimage[1][192*256]; fread(&bufferimage[0][0], 256*192*sizeof(unsigned short),1, pfile);
however values stored in bufferimage not correspond pixels values in image. appreciate that.
Comments
Post a Comment