I am a hobbyist MacOS programmer. I am interested in creating an iOS application if I can overlay a ruler scale onto an active camera image or an existing photo and save the combined image to the Photolibrary.
Can I do that in iOS?
I am a hobbyist MacOS programmer. I am interested in creating an iOS application if I can overlay a ruler scale onto an active camera image or an existing photo and save the combined image to the Photolibrary.
Can I do that in iOS?
You could…
Somewhere on the forum I found a discussion on how to save an image (that created Picture object) to the Photos Library…
To access the active camera image, you probably need a third party plugin.
I know MBS has classes that can do that. And there are some examples on how to use those classes.
Thank you Edwin. I realize that one final piece of the app would be access to the lidar depth map. I didn’t find any reference to lidar on the MBS webpages. Any thoughts?
You can also access the active camera image using the AVFoundation routines in Jason King’s iOSKit extensions. It is possible and does work, but generally not recommended, to overlay a MobileCanvas directly on top of the camera view control. The hardest part for the OP’s application would be scaling the scale bar correctly. One can zoom the camera with the usual pinch gestures but I don’t know how you can extract the focal length before taking the picture (it should be recorded in the EXIF data once the picture is taken) and that alone still would not give you all the info you would need to get the scale right. I don’t know of anyone who has accessed the iPhone LiDAR data with Xojo but it probably can be done with the right declares (and would be very useful for a variety of applications).
in the MobileImagePicker
there is a event Selected(pic As Picture)
maybe you can there draw a ruler scale onto this image.
a picture have a .Graphics context.
https://documentation.xojo.com/api/graphics/picture.html#picture-graphics
Christian Schmitz suggested that AVDepthData would provide the lidar data. I think Apple’s Measure app handles the zoom by fixing it at 1x - not ideal, but may be acceptable for the first pass. Thanks.