Ejemplo n.º 1
0

        all_omorosa.update_omoroi_sequence(face_recognizer.get_mean_of_smiles())
        # 盛り上がり度の部分時系列を取得
        length = 20
        all_omoroi_subsequence = all_omorosa.get_subsequence(all_omorosa.omoroi_sequence,length)
        all_graph.set_graph_data(x = numpy.arange(len(all_omoroi_subsequence)),
                                 y = all_omoroi_subsequence,
                                 pos = (w-300,h-300))

        #graph_drawer内のgraphを更新
        graphs =[]
        for face in face_recognizer.faces:
            graphs.append(face.graph)
        graphs.append(all_graph)
        graph_drawer.reprace_graphs(graphs)
        frame_face = graph_drawer.draw_graphs(frame_face)

        #out.write(np.asarray(frame_face,np.uint8))

        #表示 なぜか初期は
        if(count > 10):
            cv2.imshow('FACE', frame_face)
        else:
            count += 1
        #if omorosa.omoroi_sequence[-1] > omorosa.omoroi_max*0.9:
        #    _,image = face_recognizer.cap.read()
        #    cv2.imwrite("image.png",image )
        #    break