I have install TensorRT1.0 on GTX1080, and can run the samples, but I test my own pictures such as .jpg in sampleMnist,I always get the wrong classify result,I have read the function “void readPGMFile(const std::string& fileName, uint8_t buffer[INPUT_H*INPUT_W])”,and have a test,when I input jpg file,I get the messy code. and when I input a .pgm file,the buffer has values in 0-255.
I want to know how can i get the correct buffer using other picture format? just imread the picture by opencv and change it to gray? or i can use ios::binary get the correct buffer?
Thanks very much.