def color_test():
    pibo = Edu_Pibo()
    pibo.start_camera()
    time.sleep(2)
    color = pibo.search_color()
    print("Search Color: ", color)
    pibo.stop_camera()
def train_face_test():
    pibo = Edu_Pibo()
    print("Start DB:", pibo.get_facedb()["data"][0])

    # Train face
    pibo.start_camera()
    time.sleep(2)
    pibo.train_face("Kim")
    print("After Train, DB:", pibo.get_facedb()["data"][0])
    pibo.stop_camera()

    # Recognize
    pibo.start_camera()
    time.sleep(2)
    ret = pibo.search_face()
    print("Recognize: ", ret["data"])
    pibo.stop_camera()

    # Save DB
    pibo.save_facedb('./facedb')
    
    # Reset DB
    # pibo.init_facedb()
    # print('After reset db, DB: ', pibo.get_facedb()["data"][0])

    # Load DB
    pibo.load_facedb()
    print('After Load db, DB: ', pibo.get_facedb()["data"][0])

    # Delete Face
    ret=pibo.delete_face("Kim")
    print('After Delete face: ', pibo.get_facedb()["data"][0])
def face_test():
    pibo = Edu_Pibo()

    pibo.start_camera()
    time.sleep(3)
    face = pibo.search_face()
    print(face)
    pibo.stop_camera()
Ejemplo n.º 4
0
def detect_test():
    pibo = Edu_Pibo()

    pibo.start_camera()
    time.sleep(2)
    obj = pibo.search_object()
    qr = pibo.search_qr()
    text = pibo.search_text()
    print("Search Object: ", obj)
    print("Search QR: ", qr)
    print("Search Text: ", text)
    pibo.stop_camera()
Ejemplo n.º 5
0
def capture_test():
    pibo = Edu_Pibo()

    # Version 1. Camera on
    pibo.start_camera()
    time.sleep(1)
    pibo.capture()
    time.sleep(3)
    pibo.stop_camera()

    # Version 2. Camera off
    pibo.capture("capture_cameraoff.png")
def streaming_test():
    pibo = Edu_Pibo()

    pibo.start_camera()
    time.sleep(3)
    pibo.stop_camera()