Automatic Face blur plugin

Hi

I am using the rest api to take pictures using the face blur plugin

e.g.

http://192.168.1.163:8888/blur/commands/execute 

{ 
    "name": "camera.takePicture"
}

which sends back the following response

{

"name": "camera.takePicture",

"progress":{

"completion": 0

},

"state": "inProgress"

}

Where/How do I get the blurred picture file name

for instance

http://192.168.1.163/files/150100525831424d4207c503deb28400/100RICOH/B0010138.JPG

I have looked at the source code of the embeded webclient from here

but it doesn’t look for the taken picture filename, it seems to me that the application is not complete.

My workaround so far is to extend the plugin with an extra api which calls the /osc/state api that returns "_latestFileUrl":

where this is the full response

{

"fingerprint": "FIG_0008",

"state":{

"_apiVersion": 2,

"batteryLevel": 0.88,

"_batteryState": "charging",

"_cameraError":[

"HIGH_TEMPERATURE"

],

"_captureStatus": "idle",

"_capturedPictures": 0,

"_latestFileUrl": "http://192.168.1.163/files/150100525831424d4207c503deb28400/100RICOH/R0010138.JPG",

"_pluginRunning": true,

"_pluginWebServer": true,

"_recordableTime": 0,

"_recordedTime": 0,

"storageUri": "http://192.168.1.163/files/150100525831424d4207c503deb28400/"

}

}

and then I have to change the filename from R0010138.JPG to B0010138.JPG in order to download the blurred version of the shoot.

It seems strange that I need to do all these steps, am I missing something?

Many thanks

Massimo

I haven’t used the blur plug-in extensively.

In the example you provided above, it seems that camera.takePicture doesn’t return the file name because the camera is still in process.

image

I would expect it to return fileUri. documentation

This might be some minor problem in the way that the plug-in is accessing the web (REST) API inside of the camera. The response you’re getting is not what is documented. :frowning:

If the plug-in in the store operates the same as the plug-in on GitHub, you’ll probably need to grab the string from the previous file name using the method you describe.

I think we should replicate this response from the camera.takePicture call in a simple plug-in and then send this information to Ricoh.

I can help with that, but I want to replicate a test first to verify that camera.take doesn’t provide the info per the documentation.

There’s a newish GitHub repo with a sample program to just take the picture or video.

thank you for your reply.

yes the blur plugin api doesn’t return the filename but contrary to the base api /osc/commands/execute it doesn’t return the id either
e.g.

{

"id": "133",

"name": "camera.takePicture",

"progress":{

"completion": 0

},

"state": "inProgress"

}

without the id I cannot query the api to find out when the picture is ready and get the file URL like you would normally do using the base osc api
e.g.

POST /osc/commands/status

request

{
  "id" : "133"
}

response
{

"name": "camera.takePicture",

"results":{

"fileUrl": "http://192.168.1.163/files/150100525831424d4207c503deb28400/100RICOH/R0010163.JPG"

},

"state": "done"

}

The plugin actually calls this same api when taking pictures but it doesn’t expose it on the web interface, instead binds the results to an httplistener which I don’t know whose purpose is.

My feeling is that the face blur plugin api workflow is not complete as it doesn’t allow to access the produced images, instead after taking the picture one has to use the ricoh app to download them.

Using a mix of face blur plugin api and base osc api from the faceblur webclient is also out of the question because of issues with CORS as the api are on different ports.

The only solution I understand is to extend by enhancing or exposing part of the osc api into the face blur api, which is what I am doing at the moment.

cheers

Massimo

1 Like

Thanks for this test. I am going to send this to a guy I know at Ricoh. If I hear anything back, I will report here. Thanks.