Example #1
0
    pb.show()
    visualiseInfo['fig_nn']=fig_nn
else:
    visualiseInfo=None

# Read and test images from iCub eyes in real-time

#fig_input = pb.figure()
#subplt_input = fig_input.add_subplot(111)

while( True ):
    try:
        testFace = mySAMpy.readImageFromCamera()
        print "Face data shape 0 " + str(testFace.shape[0]) + " Face data shape 1 " + str(testFace.shape[1])
        #subplt_input.imshow(testFace, cmap=plt.cm.Greys_r)
        mySAMpy.testing(testFace, visualiseInfo)
        #pp = mySAMpy.testing(testFace, visualiseInfo)
        #time.sleep(0.5)
        #l = pp.pop(0)
        #l.remove()
        #pb.draw()
        #del l
        pb.waitforbuttonpress(0.1)
        
    except KeyboardInterrupt:
        print 'Interrupted'
        try:
            sys.exit(0)
        except SystemExit:
            os._exit(0)
Example #2
0
#fig_input = pb.figure()
#subplt_input = fig_input.add_subplot(111)

while (True):
    try:
        if yarpRunning:
            print "Reading from Camera"
            testFace = mySAMpy.readImageFromCamera()
        else:
            pass
            #TODO mysampy.ytestn
        print "Face data shape 0 " + str(
            testFace.shape[0]) + " Face data shape 1 " + str(testFace.shape[1])
        #subplt_input.imshow(testFace, cmap=plt.cm.Greys_r)
        mySAMpy.testing(testFace, visualiseInfo)
        #pp = mySAMpy.testing(testFace, visualiseInfo)
        #time.sleep(0.5)
        #l = pp.pop(0)
        #l.remove()
        #pb.draw()
        #del l
        pb.waitforbuttonpress(0.1)

    except KeyboardInterrupt:
        print 'Interrupted'
        try:
            sys.exit(0)
        except SystemExit:
            os._exit(0)