NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

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

   

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until October 1st.

Click to save your free spot now

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.