Ask Your Question
0

How to draw canvas as same resolution/size across multiple android devices?

asked 2015-11-23 04:33:13 -0600

updated 2018-10-26 15:52:24 -0600

hi, i'm drawing a circle on canvas in front camera and i take a snap at a particular angle in front of a glass so i get two reflections, now i detect the circles and find the distance between them from their center point, the distance and circle size varies from phone to phone on the same glass.. but how do i make a constrain where the distance remains the same with different phones with different resolutions with the same glass ? Thanks...

edit retag flag offensive close merge delete

Comments

Could you make it visual and provide of drawing or image of the actual problem?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-11-23 08:04:10 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-05-09 04:59:37 -0600

kpachinger gravatar image

You should utilize a constant, such as a marker object... i.e. a QR code or some such unique symbol to be used as reference. Without leveraging a depth sensor or some known variable there is no telling. Is the circle the constant... the glass? It's a hall of mirrors otherwise, so you need an extra "variable", such as a ruler in every picture, to extrapolate.

Also, the javascript blueimp LoadImage is helpful for image alignment. It will rotate images using EXIF/orientation codes (using the canvas option). You may also set min/max width/height, which should help relative comparison*. I think it does not mirror front/back camera though.

*OpenCV images read as responsive size, whereas canvas will maintain original size..?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-11-23 04:33:13 -0600

Seen: 634 times

Last updated: May 09 '20