Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOSではじめるフォトグラメトリ #iOSDC

shu223
September 03, 2023

iOSではじめるフォトグラメトリ #iOSDC

iOSDC 2023での発表スライドです。

プロポーザル: https://fortee.jp/iosdc-japan-2023/proposal/31781f59-2e99-48f0-ba0e-db04590c24c4

shu223

September 03, 2023
Tweet

More Decks by shu223

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ • అ मҰ • @shu223 (GitHub, Qiita, Zenn, note,

    , YouTube, Podcast, etc...) • ॻ੶ʢ঎ۀग़൛4࡭ɺݸਓग़൛ଟ਺ @BOOTHʣ:
  2. Object Capture APIΛ༻͍ͨϑΥτάϥϝτϦͷ࣮૷ let session = try PhotogrammetrySession(input: inputFolderUrl) try

    session.process(requests: [.modelFile(url: outputFile)]) • ࠷খ࣮૷͸ͨͬͨͷ2ߦʂ • PhotogrammetrySession ͷॳظԽ • process(requests:) ϝιουΛݺͿ
  3. ಈը͔ΒͷϑΥτάϥϝτϦ Object Capture API΋Reality Composer Pro΋ಈըΛೖྗͱ͢Δ ͜ͱ͸Ͱ͖ͳ͍ → ಈըͷϑϨʔϜը૾Λநग़͢ΔΞϓϦΛॻ͍ͨ let

    generator = AVAssetImageGenerator(asset: asset) generator.generateCGImagesAsynchronously(forTimes: times) { requestedTime, cgImage, actualTime, result, error in ...
  4. PhotogrammetrySession ʹϚεΫΛ౉࣮͢૷ 1/2 PhotogrammetrySample Λར༻͢Δ // PhotogrammetrySampleͷॳظԽ let pixelBuffer =

    createPixelBuffer(from: inputImage) var sample = PhotogrammetrySample(id: index, image: pixelBuffer) // ϚεΫը૾ΛobjectMaskϓϩύςΟʹηοτ let maskPixelBuffer = createMaskPixelBuffer(from: maskImage) sample.objectMask = maskPixelBuffer
  5. ͦͷଞݕূͨ͜͠ͱʢQ&AͰ࿩͠·͠ΐ͏ʣ • Object Capture͸ը૾ຕ਺ΛͲ͜·ͰݮΒͤΔ͔ • Object CaptureͰࡱӨ͞ΕΔը૾ʹؚ·ΕΔ৘ใʢؔ࿈ه ࣄʣ • Object

    CaptureϑΥτάϥϝτϦͰ͸Ͳͷ৘ใΛԿʹ࢖͏͔ ʢؔ࿈هࣄʣ • MetashapeΛ࢖ͬͨϑΥτάϥϝτϦ • Metashape vs Object Capture