Detect API test

async test.test_sence.test_face_detect()[source]

Test face count detection

Detect the number of faces, 10s timeout, and wait for the reply

#FaceDetectResponse.count: the number of faces

#FaceDetectResponse.isSuccess: Is it successful

#FaceDetectResponse.resultCode: Return code

async test.test_sence.test_face_analysis()[source]

Test face analysis (gender)

Detect face information (gender, age), time out 10s, and wait for the reply result

When multiple people are in front of the camera, return the face information that accounts for the largest proportion of the screen

Return value: Example {“age”: 24, “gender”: 99, “height”: 238, “width”: 238}

age: age

gender: [1, 100], females less than 50 are females, males greater than 50

height: the height of the face in the camera image

width: the width of the face in the camera image

async test.test_sence.test_object_recognise_flower()[source]

Test object (flower) recognition

Let the robot recognize the flower (you need to manually put the flower or flower photo in front of the robot), time out 10s, and wait for the result

#RecogniseObjectResponse.objects: array of object names [str]

#RecogniseObjectResponse.isSuccess: Is it successful

#RecogniseObjectResponse.resultCode: Return code

async test.test_sence.test_object_recognise_fruit()[source]

Test object (fruit) recognition

Let the robot recognize the flower (you need to manually put the fruit or fruit photo in front of the robot), time out 10s, and wait for the result

#RecogniseObjectResponse.objects: array of object names [str]

#RecogniseObjectResponse.isSuccess: Is it successful

#RecogniseObjectResponse.resultCode: Return code

async test.test_sence.test_object_recognise_gesture()[source]

Test object (gesture) recognition

Let the robot recognize the flower (need to manually make a gesture in front of the robot), time out 10s, and wait for the result

#RecogniseObjectResponse.objects: array of object names [str]

#RecogniseObjectResponse.isSuccess: Is it successful

#RecogniseObjectResponse.resultCode: Return code

async test.test_sence.test_take_picture()[source]

Test photo

Let the robot take a photo immediately and wait for the result

#TakePictureResponse.isSuccess: Is it successful

#TakePictureResponse.code: Return code

#TakePictureResponse.picPath: The storage path of the photo in the robot

async test.test_sence.test_face_recognise()[source]

Test face recognition

Let the robot perform face recognition detection, time out 10s, and wait for the result

#FaceRecogniseResponse.faceInfos: [FaceInfoResponse] face information array

FaceInfoResponse.id: face id

FaceInfoResponse.name: name, if it is a stranger, the default name is “stranger”

FaceInfoResponse.gender: gender

FaceInfoResponse.age: age

#FaceRecogniseResponse.isSuccess: Is it successful

#FaceRecogniseResponse.resultCode: Return code

Returns:

async test.test_sence.test_get_infrared_distance()[source]

Test infrared distance detection

Get the infrared distance detected by the current robot and wait for the result

#GetInfraredDistanceResponse.distance: Infrared distance

async test.test_sence.test_get_register_faces()[source]

Test to obtain registered face information

Get all the face information registered in the robot and wait for the result

#GetRegisterFacesResponse.faceInfos: [FaceInfoResponse] face information array

#FaceInfoResponse.id: face id

#FaceInfoResponse.name: name

#FaceInfoResponse.gender: gender

#FaceInfoResponse.age: age

#GetRegisterFacesResponse.isSuccess: Is it successful

#GetRegisterFacesResponse.resultCode: Return code

Returns:

async test.test_sence.main()[source]