I have checked this thread :
It seems like in java,just use:
Utils.matToBitmap(mRgba, bitmap);
Would someone please tell me how to do this in python?
Update I actually want to combine wxwidget with open cv like this
class BaseImageView(wx.BoxSizer):
def __init__(self, project, panel, fps=5):
.......
#blow line will give error
self.bmp = wx.BitmapFromBuffer(width, height, self.removeBG(frame))
self.image = statbmp.GenStaticBitmap(panel, wx.ID_ANY, self.bmp)
self.Add(self.image)
.......
def removeBG(self, origFrame):
return cv2.createBackgroundSubtractorMOG2().apply(origFrame)