saber_track.py 文件源码

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

项目:Vision_Processing-2016 作者: Sabercat-Robotics-4146-FRC 项目源码 文件源码
def update ( self ):
        cap = self.capture.read( ) # Capture the frame from the webcam
        show_cap = cap.copy()
        # Render needed video outputs
        if self.settings["hsv"]:
            hsv = cv2.cvtColor( cap, cv2.COLOR_BGR2HSV )
            self.show( 'hsv', hsv )
        if self.track: # if the program should track an item
            for k, v in self.limits.items( ): # Cycle through each item in the limits
                if k in self.settings["filters"]: # if the value is in the filters given,
                    v[0] = self.get_upper_trackbar( k ) # set the upper to the trackbar value
                    v[1] = self.get_lower_trackbar( k ) # set the lower to the trackbar value
                self.get_bounding_rect( k, cap, show_cap, k, v[0], v[1] ) # Get the bounding rect of the capture with limits
        if self.settings["original"]:
            self.show( 'original', show_cap )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号