piwall.py 文件源码

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

项目:piwall-cvtools 作者: infinnovation 项目源码 文件源码
def find(self, mode):
        self.mode = mode
        if mode == 1:
            self.modeDesc = 'Run gaussianBlur(), then cannyThresholding'
            self.gaussianBlur()
            self.cannyThresholding()
        elif mode == 2:
            # Check Gimp Hints
            self.gimpMarkup()
            #self.cannyThresholding()
            self.modeDesc = 'Run gimpMarkup'
        elif mode == 3:
            # Massively mask red as a precursor phase
            self.gaussianBlur()
            self.colourMapping()
            self.solidRedFilter()
            #self.cannyThresholding()
            self.modeDesc = 'Run gaussianBlur(), colourMapping(), solidRedFilter(), #cannyThresholding'
        elif mode == 4:
            self.modeDesc = 'Run gaussianBlur(), then cannyThresholding with RETR_EXTERNAL contour removal mode'
            self.gaussianBlur()
            self.cannyThresholding(cv2.RETR_EXTERNAL)
        elif mode == 5:
            self.modeDesc = 'Run gaussianBlur(), then cannyThresholding with RETR_TREE contour removal mode'
            self.gaussianBlur()
            self.cannyThresholding(cv2.RETR_TREE)
# Apply Heuristics to filter out false
        self.squares = filterContoursRemove(self.img, self.squares)
        return self.squares
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号