UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out 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.