Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Draw a square on camera screen based on focul length and dpi

Goal:

I'm trying to draw a square for credit card in the middle of camera screen using react native. As different phones has different focal length and DPI so static square didn't work. I want to draw square based on focal length and DPI so user can fit card inside that square while capturing image.

Problem:

I've following input param but don't know how to draw exact square based on camera properties. Please help me about formula or something.

  • Focal Length

  • Image Quality

  • Image Dimensions

Distance will be 7-8 feet away from camera.

Comments