Taking Pictures with REST Protocol


#1

I am creating a C++ library for the 360fly 4k camera using REST protocol. I’ve had luck taking videos, downloading videos and accessing the livestream, but the URL for taking pictures is not recognized. I’ve been trying do perform a POST at “http://localhost/360fly/camera/photo” but have been receiving an error 404 message. Has the URL for taking photos been changed from this?

Here is the link to the API library I have been going off of: https://github.com/EyeSee360/360flyAPI


#2

@mill7000, @ron360fly

The API is implemented and exists. You can see it at work in our Mobile apps when we press the shutter button in still mode or when we press the “ear” on the shutter button while recording a video. In our app code, we formulate the parameters this way:

Log.d(TAG, "Capture button tapped, current record status: " + mRecordingState);

recordParams.put(FlyAsyncRequest.HTTP_REQUEST_PATH_KEY, mFlyDevice.getHTTPChannel().getIpAddress() +"/360fly/camera/photo");
recordParams.put(FlyAsyncRequest.HTTP_REQUEST_METHOD_KEY, FlyAsyncRequest.HTTPMethod.POST);
recordParams.put(FlyAsyncRequest.HTTP_REQUEST_FLY_DEVICE_ID_KEY, mDeviceId);

I do not see the config command in the Public ReST spec that I have. I believe it is only a GET method anyway. What exactly are you trying to change?

The LiveView stream is not configurable – you get what you get. We cannot even change it.

Not sure what you mean by “distortion matrix”. We convert to equirectangular in our Director app if you want to try that. Otherwise, since our lens is fairly linear, we just use OpenGL to map the fisheye to a sphere. If you have more details, we might be able to give you some further guidance.


#3

I have tried transforming the fisheye image into a landscape, equirectangular image by essentially converting the pixels from polar points to Cartesian points, resulting in a 4:1 panoramic image with some distortion. I then do a transformation to obtain a rectilinear image from a small FOV of this image, which still has some distortion. Is there a better way of doing this?

How do you map the fisheye to a sphere? And how do you view the spherical image as a flat image?