CV.py 文件源码

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

项目:reconstruction 作者: microelly2 项目源码 文件源码
def animpingpong(self):
        print self
        print self.Object
        print self.Object.Name
        obj=self.Object
        img = cv2.imread(obj.imageFile)
        gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
        gray = np.float32(gray)
        dst = cv2.cornerHarris(gray,3,3,0.00001)
        dst = cv2.dilate(dst,None)
        img[dst>0.01*dst.max()]=[0,0,255]

        from matplotlib import pyplot as plt
        plt.subplot(121),plt.imshow(img,cmap = 'gray')
        plt.title('Edge Image'), plt.xticks([]), plt.yticks([])
        plt.subplot(122),plt.imshow(dst,cmap = 'gray')
        plt.title('Corner Image'), plt.xticks([]), plt.yticks([])
        plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号