コード例 #1
0
print actionList
print '-------------------'


yarp.Network.init()
inputInteractionPort = yarp.BufferedPortBottle()
inputObjectPort = yarp.BufferedPortBottle()

inputInteractionPort.open("/sam/actions/interaction:i");
inputObjectPort.open("/sam/actions/objects:i");
choice = yarp.Bottle();
objectLocation = yarp.Bottle();

# Creates a SAMpy object
# YARP ON
mySAMpy = SAMDriver_actions(True,inputActionPort="/visionDriver/image:o")
# YARP OFF
#mySAMpy = SAMDriver_actions(False,inputActionPort="/visionDriver/image:o")

# Specification of the experiment number
experiment_number = 4044#1010

# Location of face data
root_data_dir=dataPath

# Image format
#image_suffix=".ppm"

# Based on directories where files are held
# 1. Array of participants to be recognised
participant_index=participantList
コード例 #2
0
print actionList
print '-------------------'

if yarpRunning:
    yarp.Network.init()
    inputInteractionPort = yarp.BufferedPortBottle()
    inputObjectPort = yarp.BufferedPortBottle()

    inputInteractionPort.open("/sam/actions/interaction:i");
    inputObjectPort.open("/sam/actions/objects:i");
    choice = yarp.Bottle();
    objectLocation = yarp.Bottle();

# Creates a SAMpy object
# YARP ON
mySAMpy = SAMDriver_actions(True,inputActionPort="/visionDriver/image:o")
# YARP OFF
#mySAMpy = SAMDriver_actions(False,inputActionPort="/visionDriver/image:o")

# Specification of the experiment number
experiment_number = 4044#1010

# Location of face data
root_data_dir=dataPath

# Image format
#image_suffix=".ppm"

# Based on directories where files are held
# 1. Array of participants to be recognised
participant_index=participantList