I have some processing algorithms done using opencv in monogray images. I was wondering what's the best way to transform the cv::Mat object to a wxBitmap object in terms of speed and type of images. I am working on the images types CV_32FC1 that after is normalized to CV16UC1. As you see they have one channel so they are in gray scale, also I am doing stuff with CV_8UC1 images.
At the moment in order to convert my cv::Mat images to wxBitmap I am doing the following:
Code: Select all
// converting cv bitmap into wxBitmap
cv::cvtColor(image, image, cv::COLOR_GRAY2BGR);
wxImage test(image.cols, image.rows, image.data, true);
m_bitmap = wxBitmap(test);