StandardCyborg / StandardCyborgCocoa

Everything you need for 3D scanning on iOS
https://www.standardcyborg.com
Other
143 stars 49 forks source link

Using LiDAR camera for 3D scanning. Seeing mirrored view. #31

Closed jaswant-iotric closed 6 months ago

jaswant-iotric commented 1 year ago

I've successfully updated the code to use the LiDAR camera for 3D scanning. The only issue is the view is mirrored. Cant seem to fix it. Anyone having any idea?

aaptho commented 1 year ago

Oh wow, that’s great! Would you mind sharing the code?

To fix the mirrored view, I think if you set mirrorModeEnabled = true on the ScanningViewController instance, it should flip it. You may also need flipsInputHorizontally on SCReconstructionManager, depending on how you implemented LiDAR.

jaswant-iotric commented 1 year ago

Screenshot 2023-03-14 at 11 46 35 AM

Line 191 of CameraManager.swift

jaswant-iotric commented 1 year ago

Also I've tried your solution but it's not working. Also on pressing the flip camera button. The UI gets distorted. Been trying with no success for hours. Make sure to set development target to iOS 15.4 as builtInLiDARCamera isn't available before that.

saamerm commented 1 year ago

@jaswant-iotric you might want to switch the value between 0, 1 and -1 on the matrix multiplier and you can get what ever you desire (flip horizontally, vertically, etc)