homography.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:SantosGUI 作者: santosfamilyfoundation 项目源码 文件源码
def load_image(self, image):
        """
        Call this to load a new image from the provide QImage into
        this HomographyView's scene. The image's top left corner will
        be placed at (0,0) in the scene.
        """
        self.scene_image = image
        new_scene = QtWidgets.QGraphicsScene(self)
        pmap = QtGui.QPixmap().fromImage(image)
        pmapitem = new_scene.addPixmap(pmap)
        new_scene.setBackgroundBrush(QtGui.QBrush(QtGui.QColor(0, 0, 0)))
        self.setScene(new_scene)
        self.fitInView(0, 0, pmap.width(), pmap.height(), Qt.KeepAspectRatio)
        self.show()
        self.image_loaded = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号