ADEEPT AWR Wheeled Robot Manual page 99

4wd smart robot kit compatible with raspberry pi 4 3 model b+ b, opencv target tracking
Table of Contents

Advertisement

90
import
threading
import
imutils
class
CVThread(threading.Thread):
'''
This class is used to process OpenCV analysis of video frames in the background. For more basic usage principles of
the multi-threaded class, please refer to 14.2
'''
def
__init__(self, *args, **kwargs):
self.CVThreading =
super(CVThread, self).__init__(*args, **kwargs)
self.__flag = threading.Event()
self.__flag.clear()
def
mode(self, imgInput):
'''
This method is used for incoming video frames that need to be processed
'''
self.imgCV = imgInput
self.resume()
def
elementDraw(self,imgInput):
'''
Draw elements in the picture
'''
return
imgInput
def
doOpenCV(self, frame_image):
'''
Add the content to be processed by OpenCV here
'''
self.pause()
def
pause(self):
'''
Block the thread and wait for the next frame
'''
self.__flag.clear()
0

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AWR Adeept Wheeled Robot and is the answer not in the manual?

This manual is also suitable for:

Picar-b

Table of Contents

Save PDF