How to Reduce the size of camera source in mobile vision API text detection
Asked Answered
A

1

8

As google vision api text detection previews full screen to scan text. I want a small rectangle for text detection and display the recognized text below in a textbox

Angularity answered 11/9, 2016 at 18:42 Comment(0)
W
1

You can control the size of the preview widget. Change this line https://github.com/googlesamples/android-vision/blob/master/visionSamples/ocr-reader/app/src/main/res/layout/ocr_capture.xml#L12 to whatever you want.

This is the Android documentation about the possible values you can use for layout_width and layout_height properties https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html

Weasner answered 12/9, 2016 at 20:25 Comment(4)
I have already done it. but the camera is still recognizing the text which is not in the preview area.Angularity
i want to reduce the area of camerapreview and also i want to capture only the text within the area by the camera.Angularity
i have reduced the camera preview area. but camera is capturing the full area and recognizing text..... I want only that text to be recognized which is within the previewAngularity
You mean like a ROI(region of interest)? No vision API doesn't support that now.Weasner

© 2022 - 2024 — McMap. All rights reserved.