def image_canvas_test(): obj = Image() obj.img = camera() obj.cn = 0 frame = wx.Frame(None, title='gray test') canvas = ICanvas(frame, autofit=True) canvas.set_img(obj) frame.Show()
def complex_test(): frame = wx.Frame(None, title='blend') canvas = Canvas(frame, autofit=True) canvas.set_img(fftshift(fft2(camera()))) canvas.set_rg((0, 31015306)) canvas.set_log(True) frame.Show() if __name__ == '__main__': app = wx.App() #gray_test() #rgb_test() #rgb_gray_blend() #complex_test() frame = wx.Frame(None, title='blend') canvas = Canvas(frame, autofit=True) image = Image() image.img = camera() image.pos = (0, 0) canvas.images.append(image) image = Image() image.img = astronaut() image.pos = (100, 200) image.cn = (0, 1, 2) canvas.images.append(image) frame.Show() app.MainLoop()