Commit a48f1192 authored by Ivan Tyagov's avatar Ivan Tyagov

Disable prints to stdout (too verbose).

parent 0a6c02be
...@@ -132,7 +132,7 @@ async def main(): ...@@ -132,7 +132,7 @@ async def main():
contours, _ = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) contours, _ = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
now = time.time() * 1000 now = time.time() * 1000
diff = (now-before) diff = (now-before)
print("Processing time = %.2f ms, countours = %d" %(diff, len(contours))) #print("Processing time = %.2f ms, countours = %d" %(diff, len(contours)))
contour_detected = False contour_detected = False
for cnt in contours: for cnt in contours:
area = cv2.contourArea(cnt) area = cv2.contourArea(cnt)
...@@ -158,7 +158,7 @@ async def main(): ...@@ -158,7 +158,7 @@ async def main():
result = 3.0 result = 3.0
# printout # printout
print("\tDetected area (px)=%.2f, result=%d, shape changes=%d" %(area, result, shape_change_counter)) #print("\tDetected area (px)=%.2f, result=%d, shape changes=%d" %(area, result, shape_change_counter))
# update list for last X results (FILO) # update list for last X results (FILO)
if current_shape != result: if current_shape != result:
...@@ -179,7 +179,7 @@ async def main(): ...@@ -179,7 +179,7 @@ async def main():
shape_change_counter += 1 shape_change_counter += 1
await myvar.write_value(result) await myvar.write_value(result)
current_shape = result current_shape = result
print("\tNo shape detected, result=%d, shape changes=%d" %(result, shape_change_counter)) #print("\tNo shape detected, result=%d, shape changes=%d" %(result, shape_change_counter))
# show current MASK and camera output windows # show current MASK and camera output windows
if not headless: if not headless:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment