1

I am new to Xamarin and Android development. I have a camera in my android app. with which I can take pictures and send it for OCR using Tesseract. But, the results are not at all accurate.

So, I want to reduce the scannable area by customizing the camera view. For that, I need a overlay rectangle, so that when a picture is taken, only the image inside the overlay will be sent to OCR.

How can I put this overlay this overlay in camera view. I need some kind of start.

Marcus25
  • 863
  • 1
  • 15
  • 31

1 Answers1

0

I am using Xlabs for taking photos using the ,

var result = await _mediaPicker.TakePhotoAsync(new CameraMediaStorageOptions
{
DefaultCamera = CameraDevice.Front,
MaxPixelDimension = 400
}
);

But before doing this, I need to customize the camera view so that I can put a transparent overlay, and the image which is captured is only the part which is inside the overlay.

Custom renderer is on my mind. I will be implementing a custom renderer view https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/view/

But, I am not sure exactly how it is done. Inside the custom renderer, I guess, I will have to draw a rectangle class.

I am really stuck here. I just need a path or some guidance with which I could go ahead

Marcus25
  • 863
  • 1
  • 15
  • 31