[ad_1]
Earlier than this will get flagged as a replica I want to say that I’ve checked out the next and so they haven’t been of a lot assist:
I need to convert a price, f, given to me by body.rawFeaturePoint right into a coordinate in display coordinate area, g.
My objective is to take f flip it into g, after which feed it into the getColor() perform of the capturedImageSampler class which converts YCrCb to RGBA.
Word: phrases like ‘world area’, ‘picture area’ , and many others … are nonetheless unfamiliar jargon to me so I apologize if I misuse phrases on this publish.
My present strategy appears to be like as follows:
let screenSize: CGRect = UIScreen.predominant.bounds
let screenWidth = screenSize.width
let screenHeight = screenSize.top
let dimension: CGSize = CGSize(width: screenWidth, top: screenHeight)
var g = body.digicam.projectPoint(f, orientation: .portrait, viewportSize: dimension)
for instance f = (-0.035154458, -0.015923098, -0.09089529)
and g = (-421.32503271102905, -316.4626727104187)
One thing that confuses me is why the values in g are unfavourable. How do I normalize in order that the x and y values are >= 0 however <= 1.
Is that this even the proper strategy? If that’s the case can somebody please information me on what the subsequent steps could be. If not!, can somebody please information me on what the correct first step appears to be like like.
I admit that I’m a noob so I’d admire any assets that present clear and thorough explanations.
Additional questions embrace:
I’m utilizing the projectPoint perform. The outline apple supplies is: “Returns the projection of a degree from the 3D world area detected by ARKit into the 2D area of a view rendering the scene.”
- What does ‘2D area of a view rendering the scene’ imply?
- Does this relate to the picture area?
Thanks
:3
[ad_2]
