TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

How to get info about size of AVcaptureOutput frames or data from Camera sensors

Forums > SwiftUI

Hi, I am new here. I am a blind developer and irony of fate I am dealing with ios camera issues. I should obtain the real distance from an object (a known object) in the frame. I am following the formula Distance = focalLength objectRealDimension / objectDimensionInTheFrame. I need not scientific measurement of course. I get the focalLnegth from exifdata in 35mm corrispondence. I have the real height of the object in mm, but I do not know how to get the dimension of the object in the frame. I have its bounds from VNBarcodeObservation but it is a scalar value. I supposte I sould multiply these values by the camera activeformat resolution? I should obtain pixels and how I could obtain real dimension in millimeters? How can I obtain resolution of the AVcaptureOutput frames? Thansk you all in advanceHi all, I am new here. I am a blind developer and irony of fate, I am dealing with camera issues. I have to obtain an approximate value of the distance from a kwnown object in the frame. Following the formula Distance = focalLHi, I am new here and I am a blind developer. Irony of fate, I am dealing with camera issues. I have to obtain the distance from an object (known object) in the frame and I am following the formula: Distance = focalLength objectRealDimension / obth * objectREealHeight / obJectDimensions in the frame I could obtain what I am searching. I take the focalLength from exifdata (in 35mm version in mm). I have the real dimension of my objectin mm, but I do not know how to get the dimension of the object in the frame. I have developer and

2      

Hacking with Swift is sponsored by Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.