user813813
user813813

Reputation: 355

How do I capture what is displayed on my camera surface area?

I am using a standard Android camera/surface area. I am not using the full screen, and have implemented the preview surface area with a height of 200dp. However, when I save the photo, it is saved as if the preview/surface area is the full screen.

Is there a way for me to save to a jpeg exactly what is displayed on the preview/surface area?

Some context for the question, I am using the camera to capture the text of a street sign, so I only need a very small image.

Upvotes: 1

Views: 355

Answers (1)

Konstantin Pribluda
Konstantin Pribluda

Reputation: 12367

In my OCR applications I capture preview, and then extract subimages for further processing based on position of ROI ( determined by some surface overlay ).

See android demo code ( demos/ ) : http://sourceforge.net/projects/javaocr/

I'm not aware of interface allowing ti capture only subimage

Upvotes: 1

Related Questions