April 2019
Intermediate to advanced
336 pages
8h 22m
English
In Chapter 2, Searching for Luxury Accommodations Worldwide, we wrote a file, WxUtils.py, that contains a utility function, wxBitmapFromCvImage, to convert OpenCV images to wxPython bitmaps. We used this utility function in our Python projects throughout this book.
Our implementation of wxBitmapFromCvImage relied in part on wxPython's wx.BitmapFromBuffer function. On some versions of Raspberry Pi and Raspbian, wx.BitmapFromBuffer suffers from a platform-specific bug that causes it to fail. As a workaround, we can do a less efficient, two-step conversion using the wx.ImageFromBuffer and wx.BitmapFromImage functions. Here is some code to check whether we are running on an early model of Raspbperry ...
Read now
Unlock full access