How to display clickable RGB image similar to pyqtgraph ImageView?

后端 未结 2 1789
你的背包
你的背包 2021-01-15 01:41

Despite not being a proficient GUI programmer, I figured out how to use the pyqtgraph module\'s ImageView function to display an image that I can pan/zoom and click on to ge

2条回答
  •  北海茫月
    2021-01-15 02:30

    pyqtgraph.ImageView does support rgb / rgba images. For example:

    import numpy as np
    import pyqtgraph as pg
    data = np.random.randint(255, size=(100, 100, 3))
    pg.image(data)
    

    ..and if you want to display the exact image data without automatic level adjustment:

    pg.image(data, levels=(0, 255))
    

提交回复
热议问题