When using the RoomPlan UI (RoomCaptureView), one obtains the final result using
public func captureView(didPresent processedResult: CapturedRoom, error: Error?)
which then gets exported via
finalResults.export(to: url)
What is the best way to do this if only using RoomCaptureSession?
Should I just keep track if each CapturedRoom coming back in the delegate methods and use the final one?
Hi, it depends on what kind of results you would like to export.
- The
CapturedRoomcoming from the delegate methods contains the real-time results during the capture process. You can definitely call theexportfunction to save theCapturedRoomperiodically; - If you would like to save the final results after the scanning, calling the export function on the last delegate call back from
RoomCaptureSessionis not the best or most represented way however. Instead, we recommend to useRoomBuilderto generate aCapturedRoomwithCapturedRoomData. In that way,RoomBuilderwill run additional processing to generate the best final results.
Thanks.