If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
- Part Of The Furniture
- Posts: 2660
- Joined: Sun Jan 03, 2010 5:45 pm
OpenCV itself can show a bitmap using imshow() function but sometimes one may want to display a bitmap acquired with OpenCV using a wxWidgets GUI. The most convenient class for doing that in wxWidgets is wxBitmap.
Code: Select all
bool ConvertMatBitmapTowxBitmap(const cv::Mat& matBitmap, wxBitmap& bitmap)
converts an OpenCV bitmap encoded as BGR CV_8UC3 (the most common format) to a wxBitmap. The function also comes with a simple program which uses OpenCV and wxWidgets to acquire and display bitmaps coming from several sources: image file, video file, default webcam, and IP camera. The program also benchmarks how long a bitmap took to acquire, convert, and display.
All the code and additional information is available here:
UI of the test app