Post

Replies

Boosts

Views

Activity

Reply to The app links to non-public libraries when validating on xcode 15.0 beta
Same problem, I'm re-building an old ARKit project, and get the same error The app links to non-public libraries in Payload/XYZ.app/XYZ: /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture, /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore (ID: d6c054fd-1c55-40b0-8338-9f333e0d625b) building on Xcode 15 beta, for iOS 14. I don't know what image_picker_ios is, however I'm not using any packages/pods etc, and a search even for picker doesn't even turn up in my source.
Jun ’23
Reply to Removing image backgrounds in iOS 16 and MacOS 13
In iOS 17 you get great results with VNGenerateForegroundInstanceMaskRequest() - make your image a CVPixelBuffer, then feed it into something like this: var maskRequest = VNGenerateForegroundInstanceMaskRequest() let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, options: [:]) do { try handler.perform([maskRequest]) if let observation = maskRequest.results?.first { let allInstances = observation.allInstances do { let maskedImage = try observation.generateMaskedImage(ofInstances: allInstances, from: handler, croppedToInstancesExtent: false) let maskImage = imageFromCVPixelBuffer(maskedImage) sceneView.scene.background.contents = maskImage } catch { print("Error: \(error.localizedDescription)") } } } catch { print("Failed to perform Vision request: \(error)") }
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’23
Reply to Removing image backgrounds in iOS 16 and MacOS 13
The only way I can think of getting the result without leaving your app is to present your image from a WKWebView which allows using the "select subject" in the context menu, not perfect, but a possible workaround while we waiting for a more direct solution - I'm going to look into [https://developer.apple.com/documentation/webkit/viewing_desktop_or_mobile_web_content_using_a_web_view) to present my image. Is there a better way?? Not sure, can't find anything out there yet.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’22
Reply to SCNView shows pale textures
This will turn the pale color output from a MTLTexture back to normal saturation. Example from Xcode default Metal project at line 178 in Renderer.swift, I've added an SCNView to my Storyboard for testing the output in the scnView.  if let texture = renderPassDescriptor.colorAttachments[0].texture { scnView.scene?.background.contents = texture.makeTextureView(pixelFormat: .bgra8Unorm_srgb) }
Topic: Graphics & Games SubTopic: SceneKit Tags:
Sep ’22
Reply to ARKit 6 high resolution frame capture issues
Have a look to see if your camera supports 4K with print(ARWorldTrackingConfiguration.supportedVideoFormats) On an iPhone 13 Pro Max it’s only 4K camera is listed as <ARVideoFormat: 0x2834f2e90 imageResolution=(3840, 2160) pixelFormat=(420f) framesPerSecond=(30) captureDeviceType=AVCaptureDeviceTypeBuiltInWideAngleCamera captureDevicePosition=(1)>] So in your config change to that format.  configuration.videoFormat = ARWorldTrackingConfiguration.supportedVideoFormats[12] That’s on an iPhone 13 Pro Max 128gig - which did has the limited ProRes recording duration, so perhaps it works on the bigger storage models, or just future products.
Topic: Spatial Computing SubTopic: ARKit Tags:
Jul ’22
Reply to Photogrammetry failed with crash(Assert: in line 417)
It's because your array of PhotogrammetrySamples is not ordered correctly - make sure they are sorted by their PhotogrammetrySample.id.
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Photogrammetry failed with crash(Assert: in line 417)
Not the easiest error to interpret...
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to The app links to non-public libraries when validating on xcode 15.0 beta
Same problem, I'm re-building an old ARKit project, and get the same error The app links to non-public libraries in Payload/XYZ.app/XYZ: /System/Library/PrivateFrameworks/AVFCapture.framework/AVFCapture, /System/Library/PrivateFrameworks/AVFCore.framework/AVFCore (ID: d6c054fd-1c55-40b0-8338-9f333e0d625b) building on Xcode 15 beta, for iOS 14. I don't know what image_picker_ios is, however I'm not using any packages/pods etc, and a search even for picker doesn't even turn up in my source.
Replies
Boosts
Views
Activity
Jun ’23
Reply to Removing image backgrounds in iOS 16 and MacOS 13
In iOS 17 you get great results with VNGenerateForegroundInstanceMaskRequest() - make your image a CVPixelBuffer, then feed it into something like this: var maskRequest = VNGenerateForegroundInstanceMaskRequest() let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, options: [:]) do { try handler.perform([maskRequest]) if let observation = maskRequest.results?.first { let allInstances = observation.allInstances do { let maskedImage = try observation.generateMaskedImage(ofInstances: allInstances, from: handler, croppedToInstancesExtent: false) let maskImage = imageFromCVPixelBuffer(maskedImage) sceneView.scene.background.contents = maskImage } catch { print("Error: \(error.localizedDescription)") } } } catch { print("Failed to perform Vision request: \(error)") }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Removing image backgrounds in iOS 16 and MacOS 13
The only way I can think of getting the result without leaving your app is to present your image from a WKWebView which allows using the "select subject" in the context menu, not perfect, but a possible workaround while we waiting for a more direct solution - I'm going to look into [https://developer.apple.com/documentation/webkit/viewing_desktop_or_mobile_web_content_using_a_web_view) to present my image. Is there a better way?? Not sure, can't find anything out there yet.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to Removing image backgrounds in iOS 16 and MacOS 13
I'm keen to work this out too. I don't think I'd like to use the x-callback way. I've looked into trying VNGenerateObjectnessBasedSaliencyImageRequest, but it's only a 64x64 sized mask that gets returned and even still does not produce the same results.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to SCNView shows pale textures
This will turn the pale color output from a MTLTexture back to normal saturation. Example from Xcode default Metal project at line 178 in Renderer.swift, I've added an SCNView to my Storyboard for testing the output in the scnView.  if let texture = renderPassDescriptor.colorAttachments[0].texture { scnView.scene?.background.contents = texture.makeTextureView(pixelFormat: .bgra8Unorm_srgb) }
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to ARKit 6 high resolution frame capture issues
Have a look to see if your camera supports 4K with print(ARWorldTrackingConfiguration.supportedVideoFormats) On an iPhone 13 Pro Max it’s only 4K camera is listed as <ARVideoFormat: 0x2834f2e90 imageResolution=(3840, 2160) pixelFormat=(420f) framesPerSecond=(30) captureDeviceType=AVCaptureDeviceTypeBuiltInWideAngleCamera captureDevicePosition=(1)>] So in your config change to that format.  configuration.videoFormat = ARWorldTrackingConfiguration.supportedVideoFormats[12] That’s on an iPhone 13 Pro Max 128gig - which did has the limited ProRes recording duration, so perhaps it works on the bigger storage models, or just future products.
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Jul ’22