This function is used to set the threshold for the confidence (accuracy) of object detection, 0 being low confidence and 1 being high confidence.
With the threshold value, you can set the level of confidence required for object detection.
Function Definition: setthreshold(threshold = 0.5)
Name | Type | Description | Expected Values | Default Value |
---|---|---|---|---|
threshold | float | Confidence value. 0 being low confidence and 1 being high confidence. | 0-1 | 0.5 |
This function is used to set the threshold for the confidence (accuracy) of object detection, 0 being low confidence and 1 being high confidence.
With the threshold value, you can set the level of confidence required for object detection.
sprite = Sprite('Tobi')
quarky = Quarky()
cards = RecognitionCards()
cards.video("on", 0)
cards.enablebox()
cards.setthreshold(0.5)
quarky.setirthreshold("IRL", 3000)
quarky.setirthreshold("IRR", 3000)
quarky.initializelinefollower(35, 40, 10)
quarky.drawpattern("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
while True:
if not (quarky.getirstate(35) and quarky.getirstate(34)):
quarky.dolinefollowing()
else:
quarky.stoprobot()
cards.analysecamera()
if cards.isnumberdetected(1):
quarky.drawpattern("ccccccccccccccccccccccccccccccccccc")
break
quarky.runrobot("FORWARD", 40)
Copyright 2024 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy