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
CapturedRoom
coming from the delegate methods contains the real-time results during the capture process. You can definitely call theexport
function to save theCapturedRoom
periodically; - If you would like to save the final results after the scanning, calling the export function on the last delegate call back from
RoomCaptureSession
is not the best or most represented way however. Instead, we recommend to useRoomBuilder
to generate aCapturedRoom
withCapturedRoomData
. In that way,RoomBuilder
will run additional processing to generate the best final results.
Thanks.