Java... it is web application...

On Thursday, November 10, 2016 at 6:13:56 PM UTC+5:30, Pietro Gagliardi 
(andlabs) wrote:
>
> And what's the code on the client side, which I assume is in Go?
>
> On Nov 10, 2016, at 5:26 AM, nova...@gmail.com <javascript:> wrote:
>
> try{
>     byte[] imageBytes=mymultipart imagefile;
>
>     httpTransport = GoogleNetHttpTransport.newTrustedTransport();
>     JsonFactory jsonFactory = GsonFactory.getDefaultInstance();
>
>     Vision.Builder builder = new Vision.Builder(httpTransport, jsonFactory, 
> null);
>     builder.setVisionRequestInitializer(new
>             VisionRequestInitializer(myvisionAPIkey));
>     Vision vision = builder.build();
>
>     AnnotateImageRequest request =
>             new AnnotateImageRequest()
>                 .setImage(new Image().encodeContent(imageBytes))
>                 .setFeatures(ImmutableList.of(
>                     new Feature()
>                         .setType("TEXT_DETECTION")
>                         .setMaxResults(1),
>                     new Feature()
>                         .setType("LOGO_DETECTION")
>                         .setMaxResults(1)));
>         Vision.Images.Annotate annotate =
>             vision.images()
>                 .annotate(new 
> BatchAnnotateImagesRequest().setRequests(ImmutableList.of(request)));
>         BatchAnnotateImagesResponse batchResponse = annotate.execute();
>     }catch(Exception e){
>         e.printStackTrace();
>     }
>
>
> This is my code. but its look when i use a image without any Letters or 
> many users using this call. not sure in which scenario this happens and i 
> can't replicate.
>
>
> On Thursday, November 10, 2016 at 1:23:36 AM UTC+5:30, Dave Cheney wrote:
>>
>> Can you please post the full stack trace of the crash and a piece of code 
>> to reproduce the issue.
>>
>> Thanks.
>>
>> On Thursday, 10 November 2016 00:26:03 UTC+11, nova...@gmail.com wrote:
>>>
>>> Hi i am using Google Cloud vision API in my server side (JAVA) but when 
>>> no results found my server got crashed not sure why it is happening could 
>>> anyone help me?
>>>
>>> Thanks in advance
>>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to