Skip to content
/ vivid Public

Vivid is a simple Google Vision java client with much simple api and less dependencies

Notifications You must be signed in to change notification settings

kiwionly/vivid

Repository files navigation

Build Status

Vivid = Google Vision java Client

Vivid is a simple Google Vision java client with much simple api and less dependencies.

	   RequestBuilder builder = new RequestBuilder()
				  .content(toBase64(new File("test/text.jpg")))
		        .addFeature(FeatureType.TEXT_DETECTION);

		Request request = builder.build();

		List<Request> requests = new ArrayList<>();
		requests.add(request);
		
		Result result = post("test text OCR", requests);
				
		TextAnnotation ann = result.getResponses().get(0).getFullTextAnnotation().get(0);
				
		assertNull(result.getErrors());		
		assertTrue(ann.getText().contains("GPS"));
		assertTrue(ann.getText().contains("3.81730"));
		assertTrue(ann.getText().contains("永泰饼家"));

dependecies:

	compile 'com.alibaba:fastjson:1.+'
	compile 'com.squareup.okhttp3:okhttp:3.+'

Refer to unit test for difference scenario.

The Version is sync with Google Vision version. E.g. vivid version 1.0 == Google Vision v1.

About

Vivid is a simple Google Vision java client with much simple api and less dependencies

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages