![]() |
ROC SDK
2.4.0
Scalable Face Recognition Software
|
The Web API exposes the core SDK functions for template generation, comparison and search, via Protocol Buffers over HTTP. Client-side libraries for the Web API are available in C++, C#, Java, JavaScript, Objective-C, PHP, Python, and Ruby.
You can use the Web API if you want all processing to take place on a remote server and the client machine does not have a licensed installation of the ROC SDK. You'll need a copy of the standard ROC SDK (you have it if you are reading this) to run the server, and a copy of the "roc-web" SDK for client-side development.
In the above commands we construct a simple gallery of five faces from a single image and then launch the Web API server on port 8080, hosting the gallery file roc.t over HTTP and logging connection activity to the console.
In the roc-web SDK open example.html in your web browser. By default this example looks for the server at localhost:8080 so you should see the first template in the gallery as soon as the page loads. Try using data/josh_1.jpg and data/josh_2.jpg for Search and Verify.
You can use the Web API on your server to recieve data transmitted by ROC software without having a licensed installation of the ROC SDK. You'll need a copy of the standard ROC SDK (you have it if you are reading this) to run the thick-client that computes and transmits templates, and a copy of the "roc-web" SDK for server-side development.
In the above commands we launch a simple Web API server on port 8080 that prints the received templates, and then we send templates to it via roc-track.
- (single dash) as the gallery file name to roc-serve.POST with Content-Type: application/octet-stream and the body being the Protobuf request message.web-api/roc.proto you'll observe two root message types:web-api/roc.proto are named to mirror the Application Programming Interface.roc_error message type. If it isn't, the client can safely assume that the response type corresponds to the request type.
1.8.15