Example #1
0
from lcd import LCD

display = LCD("0x3f")
display.enable()
display.display("HELLO",1)
display.display("WORLD!",2)
display.display("WHATS",3)
display.display("UP?",4)
Example #2
0
                if weights[i] > 0.4:
                    result.append(rects[i])
            result = np.array([[x, y, x + w, y + h]
                               for (x, y, w, h) in result])
            result = non_max_suppression(result,
                                         probs=None,
                                         overlapThresh=0.65)
            outbox.put((result, rgb))


try:
    inbox = Queue(maxsize=1)
    outbox = Queue(maxsize=1)
    frame_queue = Queue()
    screen = LCD()
    screen.display(
        " People counter\n    made by\n Zajac&Wieczorek\n\n Initializing...")
    time.sleep(1)

    # initializing detector
    hog = cv2.HOGDescriptor()
    hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())

    p = Process(target=detection_task, args=(
        hog,
        inbox,
        outbox,
    ))
    p.daemon = True
    p.start()

    clear = lambda: os.system('clear')
Example #3
0
            result = non_max_suppression(result,
                                         probs=None,
                                         overlapThresh=0.65)
            outbox.put((result, rgb))


#
#def collection_task(inbox,outbox,frame_queue):
#    while True:

try:
    inbox = Queue(maxsize=1)
    outbox = Queue(maxsize=1)
    frame_queue = Queue()
    screen = LCD()
    screen.display("Initializing...")
    time.sleep(1)
    screen.display("\n  PEOPLE COUNT\n       0")

    # initializing detector
    hog = cv2.HOGDescriptor()
    hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())

    p = Process(target=detection_task, args=(
        hog,
        inbox,
        outbox,
    ))
    p.daemon = True
    p.start()