I have generated a
map_server package. I want to display it in an OpenCV window. How can I achieve this?
I am currently trying this -
std::string file_name = "map_1.pgm"; cv::Mat m = cv::imread(file_name.c_str(), 0); cv::namedWindow("map_1"); cv::imshow("map_one_window", m); cv::waitKey(0);
This is my
image: map_1.pgm resolution: 0.050000 origin: [-100.000000, -100.000000, 0.000000] negate: 0 occupied_thresh: 0.65 free_thresh: 0.196
However, on doing the above steps, I get a big OpenCV window which is completely grey.
How do I solve this problem?