Photography Asked by karthees on December 3, 2020
I’m overlaying images on the cameraView and based on the user input of room width & height. The images are displaying proportionally to width & height ratio. but i need to overlay the images based on the distance. If 5feet means, then i need to display the images closer, if it’s 8ft means i need to overlay images littlebit far. I referred these links https://stackoverflow.com/questions/11913355/scaling-ar-pictures-based-on-the-distance-from-the-camera , https://stackoverflow.com/questions/13190932/how-to-find-out-focal-length-of-camera-in-ios-and-what-is-the-sensor-height?lq=1. But the result size is too small.
int imagesize_height = (152.4*199)/0.33;
int imagesize_width = (152.4*350)/0.33;
distance in cm = 152.4 and ipadMini camera focal length is 3.3mm = 0.33cm, image width is 350 & height is 199
Depending on the INT_MAX your variables may overflow significantly. INT_MAX being 32768 is not uncommon at all.
int imagesize_height = (152.4*199)/0.33
=91901,818181818181818181818181818
int imagesize_width = (152.4*350)/0.33
=161636,36363636363636363636363636
Answered by Euri Pinhollow on December 3, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP