コード例 #1
0
 def getGoal(self, image, headinfo):
     #now = time.time()
     # Filter the snapshots and return the angle and the color
     (_, head) = headinfo
     goalLoc = None
     yellow = goal.run(image, head[1], 'yellow')
     if yellow:
         goalLoc = ('Yellow', yellow)
     else:
         blue = goal.run(image, head[1], 'blue')        
         if blue:    
             goalLoc = ('Blue',blue)
     return goalLoc
コード例 #2
0
def getGoal(image, headinfo):
    # now = time.time()
    # Filter the snapshots and return the angle and the color
    (_, head) = headinfo
    goalLoc = None
    yellow = goal.run(image, head[1], "yellow")
    if yellow:
        goalLoc = ("Yellow", yellow)
    else:
        blue = goal.run(image, head[1], "blue")
        if blue:
            goalLoc = ("Blue", blue)
    return goalLoc
コード例 #3
0
ファイル: visionInterface.py プロジェクト: Haya1/Master
 def getGoal(self, image, headinfo):
     #now = time.time()
     # Filter the snapshots and return the angle and the color
     (_, head) = headinfo
     goalLoc = None
     yellow = goal.run(image, head[1], 'yellow')
     if yellow:
         goalLoc = ('Yellow', yellow)
     else:
         blue = goal.run(image, head[1], 'blue')
         if blue:
             goalLoc = ('Blue', blue)
     return goalLoc
コード例 #4
0
 def getGoal(self, image, headinfo):
     #now = time.time()
     # Filter the snapshots and return the angle and the color
     (_, head) = headinfo
     goalLoc = None
     yellow = goal.run(image, head[1], 'yellow')
     if yellow:
         goalLoc = ('Yellow', yellow)
         # yellow goal , anyone got a better value?
         self.ledProxy.fadeRGB('LeftFaceLeds',0x00ff3000, 0)     
     else:
         blue = goal.run(image, head[1], 'blue')        
         if blue:    
             goalLoc = ('Blue',blue)
             # blue LeftFaceLed
             self.ledProxy.fadeRGB('LeftFaceLeds', 0xffffff, 0)
     return goalLoc