PST SDK
6.0.0.0-272350a
|
As with the previous example, to receive image data it is important to make sure the server is started (required only once at the start or after PSTapi/Pause has been called in the meantime). In order to get the image stream, image transfer should be enabled on the PST Tracker first by using PSTapi/EnableImageTransfer. Enabling image transfer will ensure new images are pushed to the image stream buffer.
curl --header "Content-Type: application/json" --request POST --data "{}" http://localhost:7278/PSTapi/Start
curl --header "Content-Type: application/json" --request POST --data "{\"Framerate\":30}" http://localhost:7278/PSTapi/SetFramerate
curl -X GET http://localhost:7278/PSTapi/GetExposureRange
curl --header "Content-Type: application/json" --request POST --data "{\"Exposure\":0.0001189}" http://localhost:7278/PSTapi/SetExposure
curl --header "Content-Type: application/json" --request POST --data "{}" http://localhost:7278/PSTapi/EnableImageTransfer
curl -X GET http://localhost:7278/PSTapi/StartRawImageDataStream
Type | message |
---|---|
COMMAND | curl --header "Content-Type: application/json" --request POST --data "{}" http://localhost:7278/PSTapi/Start |
RESPONSE | {"message":"Server Started"} |
COMMAND | curl --header "Content-Type: application/json" --request POST --data "{\"Framerate\":30}" http://localhost:7278/PSTapi/SetFramerate |
RESPONSE | {"message":"Frame rate set successfully"} |
COMMAND | curl -X GET http://localhost:7278/PSTapi/GetExposureRange |
RESPONSE | {"ExposureRange":{"max":0.0024999999441206455,"min":9.9999997473787516e-05}} |
COMMAND | curl --header "Content-Type: application/json" --request POST --data "{\"Exposure\":0.0001189}" http://localhost:7278/PSTapi/SetExposure |
RESPONSE | {"message":"Exposure time set successfully"} |
COMMAND | curl --header "Content-Type: application/json" --request POST --data "{}" http://localhost:7278/PSTapi/EnableImageTransfer |
RESPONSE | {"message":"Image transfer enabled"} |
COMMAND | curl -X GET http://localhost:7278/PSTapi/StartRawImageDataStream |
RESPONSE | data: /9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgH...<rest of a base64 char array of the jpeg image 1, frame 0> |