Commit 24a55c54 authored by Ivan Tyagov's avatar Ivan Tyagov

Lower default threshold.

parent 2075d848
...@@ -31,7 +31,7 @@ DEFAULT_US = (190, 255,) ...@@ -31,7 +31,7 @@ DEFAULT_US = (190, 255,)
DEFAULT_UV = (190, 255,) DEFAULT_UV = (190, 255,)
# the minimal number of pixes which we consider as a shape # the minimal number of pixes which we consider as a shape
# and the maximal (configurable) such # and the maximal (configurable) such
DEFAULT_AREA = (10000, 50000,) DEFAULT_AREA = (6000, 50000,)
# command line handling # command line handling
parser = argparse.ArgumentParser(description='Run optical inspection OPC UA server.') parser = argparse.ArgumentParser(description='Run optical inspection OPC UA server.')
...@@ -165,7 +165,7 @@ async def main(): ...@@ -165,7 +165,7 @@ async def main():
result_stack = result_stack[-default_occurence_number:] result_stack = result_stack[-default_occurence_number:]
# to avoid sometimes errors in detection algorithm we change OPC UA node # to avoid sometimes errors in detection algorithm we change OPC UA node
# variable only if at least we have 40% (2) of last 5 items detected as this # variable only if at least we have 2 (40%) of last 5 (100%) items detected as this
# shape. Not complex but avoid false results. # shape. Not complex but avoid false results.
count = result_stack.count(result) count = result_stack.count(result)
if count >= 2: if count >= 2:
......
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