Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. syntax = "proto3";
  2.  
  3. package com.bartek.ccr.core;
  4.  
  5. option java_outer_classname = "Commands";
  6.  
  7. message Rectangle {
  8.     int32 x1 = 1;
  9.     int32 y1 = 2;
  10.     int32 x2 = 3;
  11.     int32 y2 = 4;
  12. }
  13.  
  14. message InitRequest {
  15.     Type type = 1;
  16.     enum Type {
  17.         RECOGNITION = 0;
  18.         RATING = 1;
  19.     }
  20. }
  21.  
  22. message InitResponse {
  23.     bool success = 1;
  24.     string token = 2;
  25. }
  26.  
  27. message Image {
  28.     int64 imageSize = 1;
  29.     string imageFormat = 2;
  30.     string hashCode = 3;
  31.     Rectangle recognitionRectangle = 4;
  32.     bytes image = 5;
  33. }
  34.  
  35. message ImageResponse {
  36.     bool success = 1;
  37. }      
  38.  
  39. message RecognitionResult {
  40.     repeated Character character = 1;
  41.  
  42.     message Character {
  43.         int32 index = 1;
  44.         string character = 2;
  45.         int32 certainty = 3;
  46.         Rectangle characterRectangle = 4;      
  47.     }
  48. }
  49.  
  50. message CharacterRateRequest {
  51.     string token = 1;
  52.     int64 characterIndex = 2;
  53.     bool valid = 3;
  54. }
  55.  
  56. message CharacterRateResponse {
  57.     bool success = 1;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement