Discover ARKit 6

RSS for tag

Discuss the WWDC22 Session Discover ARKit 6

Posts under wwdc2022-10126 tag

14 Posts

Post

Replies

Boosts

Views

Activity

AVCaptureDeviceSession MediaType/DeviceType confusion
I have some confusion over the definition of MediaType versus DeviceType on the calls. It seems to me that because of similarities between the various cameras and the vague dichotomy between TrueDepth and LiDARData for measuring Depth there may be some need for refinement of the calls. My own preference would be to pass an Attribution Mask based on the bit position of the various characteristics of the device and having the bits prioritized so the BEST selection of the available devices would be chosen. For example With True Depth and LiDAR cameras both have depth data but the LiDAR is preferrable for accuracy reasons but some applications could get by with the photogrammetry mode True Depth camera if the LiDAR camera was unusable for some reason. I could see an option that said "Depth but no LiDAR" being selected. The same thing would be true for telephoto lenses versus combined with Wide or Ultrawide (or Hyper-Wide later). Audio streaming would have the same kind of issues with performance levels for input and output being narrowly defined. The question also arises why Device Type allows an array to be passed but not Media Type. It would seem reasonable for both.
0
0
670
Mar ’23
How to improve the captured image's resolution?
To create signatures for human faces and compare the similarities, I'm using ARKit's captureImage from ARFrame which is derived from the front facing camera with ARFaceTrackingConfiguration. However, compared to using the Vision and AVFoundation frameworks, the quality of the signature analysis is significantly impacted by the captureImage's low resolution. The resolution of the capturedImage in ARKit is just 640x480, according to capturedDepthData even though the video format is set to the highest resolution. let configuration = ARFaceTrackingConfiguration() if let videoFormat = ARFaceTrackingConfiguration.supportedVideoFormats.sorted(by: { ($0.imageResolution.width * $0.imageResolution.height) < ($1.imageResolution.width * $1.imageResolution.height) }).last { configuration.videoFormat = videoFormat } I tried using captureHighResolutionFrame and as well as change the video format: if let videoFormat = ARFaceTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing { configuration.videoFormat = videoFormat } However, according to the documentation: The system delivers a high-resolution frame out-of-band, which means that it doesn't affect the other frames that the session receives at a regular interval The asynchronous nature of taking the high resolution images seems to result alternating between the standard captured image and the high resolution images rather than replacing the regular captured images. This is a concern because, depending on the size variations, displayTransform and CGAffineTransform must be used in different ways to scale the images. Not only that I need to able to use the frames continuously at either 30 fps or 60 fps, as they're produced rather than taking pictures occasionally, which the captureHighResolutionFrame method seems to be designed for considering the shutter sound. In order to use the captured image, I'm currently transforming it in the following way let image: CIImage = CIImage(cvImageBuffer: imageBuffer) let imageSize: CGSize = CGSize(width: CVPixelBufferGetWidth(imageBuffer), height: CVPixelBufferGetHeight(imageBuffer)) let normalizeTransform: CGAffineTransform = CGAffineTransform(scaleX: 1.0 / imageSize.width, y: 1.0 / imageSize.height) let flipTransform: CGAffineTransform = metadata.orientation.isPortrait ? CGAffineTransform(scaleX: -1, y: -1).translatedBy(x: -1, y: -1) : .identity guard let viewPort: CGRect = face.viewPort else { return nil } let viewPortSize: CGSize = viewPort.size guard let displayTransform: CGAffineTransform = face.arFrame?.displayTransform(for: metadata.orientation, viewportSize: CGSize(width: viewPortSize.width, height: viewPortSize.height)) else {   return nil } let scaleX: CGFloat = viewPortSize.width let scaleY: CGFloat = viewPortSize.height let viewPortTransform: CGAffineTransform = CGAffineTransform(scaleX: scaleX, y: scaleY) let scaledImage: CIImage = image   .transformed(by: normalizeTransform     .concatenating(flipTransform)     .concatenating(displayTransform)     .concatenating(viewPortTransform)   )   .cropped(to: viewPort)
2
0
1.9k
Feb ’23
minimum device requirements for ARWorldTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing
device: iPhone 8 Plus Xcode: Version 14.2 (14C18) Attempting to set up an AR session to allow a background high resolution frame capture using the new ARKit feature in IOS 16.2. My test code (following recommendations in WWDC video on this subject) is         if #available(iOS 16.0, *) {             if let videoCapFormat = ARWorldTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing {                 print("Format = (videoCapFormat)")             } else {                 print("Format not found")             } In this case, videoCapFormat is populated with nil. Should I assume that indicates that no video format for my device will support this capture. If so, as a follow on question, which devices do support this type of background high res capture?
2
0
763
Feb ’23
CameraTrackingState is not detecting: ARKit
After upgrading iPhone to the iOS version 16, ARKit having issue with ARKit ARSession CameraTrackingState. TrackingState is going to .notAvailable and .limited(initializing) state and never returning to tracking state .normal. Screen camera keep showing loading. And when I am turning camera on and off , it shows the AR model on the screen. Tested Device: iPhone 12 Pro Max with iOS version 16.0. Whereas for iOS 15.6, TrackingState is going to .notAvailable and .limited(initializing) state and .limited(relocalising ) and then .normal. Relocalization state is also handled whenever it going to the interruption. func sessionShouldAttemptRelocalization(_ session: ARSession) -> Bool {     let configuration = ARWorldTrackingConfiguration()     configuration.planeDetection = [.horizontal,.vertical]     session.run(configuration, options: [.resetTracking, .removeExistingAnchors])     return true   } Please suggest some solution as I am not able to debug this. Is there any upgrade or issue with iOS version 16?
0
0
873
Sep ’22
HELLO FORUM CAN YOU GUYS HELP ME FIXING MY AUGMENTED REALITY APPLICATION USING SWIFT CODE?
Hello, im trying to build an AR Application. Im using swift code like UIKit, ARCL, Corelocation, and SceneKit. im already create the AR run well on the mobile device and my corelocation each pin are succesfully placed on each location. The problem is, when i clicked my object which is "the pin/ the object that i have been putted" it doesnt show any activities on the User Interface of Augmented reality. But the system work well on the debug area - activate console, when i click it shows all the name and the description of each pin that i press. But the problem is, the text/description doesnt show up on the Augmented reality/User Interface. here is my coding : (CODE LOCATION)  var location = CLLocation(coordinate: CLLocationCoordinate2D(latitude: -6.7596, longitude: 107.6098), altitude: 2084)     let image = UIImage(named: "pin")!     var annotationNode = LocationAnnotationNode(location: location, image: image)     annotationNode.annotationNode.name = "tangkuban perahu"     sceneLocationView.addLocationNodeWithConfirmedLocation(locationNode: annotationNode) (CODE TEXT/DESCRIPTION) override func touchesBegan(_ touches: Set, with event: UIEvent?) {         if let touch = touches.first {           let touchLocation = touch.location(in: sceneLocationView)           let hitResults = sceneLocationView.hitTest(touchLocation)           for result in hitResults {             print("HIT:-> Name: (result.node.description)")             print("HIT:-> description (String(describing: result.node.name))")                         }         }       } (ACTIVATE CONSOLE "OUTPUT") tangkuban perahu
0
1
843
Aug ’22
ARKit 6 high resolution frame capture issues
M1 iPad Pro with iPadOS 16 Beta 3 Xcode 14.0 beta 3 In a freshly created Xcode 14 beta 2 app using the Augmented Reality App template with Content Technology set to Metal, ARWorldTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing returns a 60 fps, 1920 x 1440 video format. So, session.captureHighResolutionFrame fails to deliver a high res frame.
3
1
2.9k
Jul ’22
AR chess game example code WWW2022 conference
private let boardAnchor: AnchorEntity = AnchorEntity( *Argument passed to call that takes no arguments plane: .horizontal, *Cannot infer contextual base in reference to member 'horizontal' classification: [.floor, .table], *2Reference to member 'floor' cannot be resolved without a contextual type minimumBounds: SIMD2(0.1, 0.1)     ) how can this be fixed in the demo code of the chess game example capture chess swift presented at WWW2022 session AR experience any help highly apprishiated
1
0
1.3k
Jun ’22
How to show feature points in RealityKit Swift?
In My project, I have a requirement to show feature points (like circle dot based on rawFeaturePoints) in AR so that user can sure about scan accuracy around. I saw android doing same with ARCore api, my client is asking to do same in iOS app also, as per my Research every frame has rawFeaturePoints, but how can show it in RealityKit ARView?
Replies
1
Boosts
0
Views
1.1k
Activity
Apr ’23
How to show image and play audio file in RealityKit?
My requirement is that I have to show image in Material and play audio. User can place any number of image with audio and when he/she will tap on a image then I have to play that image audio file.
Replies
1
Boosts
0
Views
703
Activity
Apr ’23
Manual Focus in ARKit
I need to manually set focus or dynamically adjust the focus without using the autofocus logic, but a custom logic. Is there a way to do that in ARKit, if not can we use the same controls in AVFoundation for ARKit high resolution capture?
Replies
0
Boosts
0
Views
773
Activity
Apr ’23
AVCaptureDeviceSession MediaType/DeviceType confusion
I have some confusion over the definition of MediaType versus DeviceType on the calls. It seems to me that because of similarities between the various cameras and the vague dichotomy between TrueDepth and LiDARData for measuring Depth there may be some need for refinement of the calls. My own preference would be to pass an Attribution Mask based on the bit position of the various characteristics of the device and having the bits prioritized so the BEST selection of the available devices would be chosen. For example With True Depth and LiDAR cameras both have depth data but the LiDAR is preferrable for accuracy reasons but some applications could get by with the photogrammetry mode True Depth camera if the LiDAR camera was unusable for some reason. I could see an option that said "Depth but no LiDAR" being selected. The same thing would be true for telephoto lenses versus combined with Wide or Ultrawide (or Hyper-Wide later). Audio streaming would have the same kind of issues with performance levels for input and output being narrowly defined. The question also arises why Device Type allows an array to be passed but not Media Type. It would seem reasonable for both.
Replies
0
Boosts
0
Views
670
Activity
Mar ’23
How to improve the captured image's resolution?
To create signatures for human faces and compare the similarities, I'm using ARKit's captureImage from ARFrame which is derived from the front facing camera with ARFaceTrackingConfiguration. However, compared to using the Vision and AVFoundation frameworks, the quality of the signature analysis is significantly impacted by the captureImage's low resolution. The resolution of the capturedImage in ARKit is just 640x480, according to capturedDepthData even though the video format is set to the highest resolution. let configuration = ARFaceTrackingConfiguration() if let videoFormat = ARFaceTrackingConfiguration.supportedVideoFormats.sorted(by: { ($0.imageResolution.width * $0.imageResolution.height) < ($1.imageResolution.width * $1.imageResolution.height) }).last { configuration.videoFormat = videoFormat } I tried using captureHighResolutionFrame and as well as change the video format: if let videoFormat = ARFaceTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing { configuration.videoFormat = videoFormat } However, according to the documentation: The system delivers a high-resolution frame out-of-band, which means that it doesn't affect the other frames that the session receives at a regular interval The asynchronous nature of taking the high resolution images seems to result alternating between the standard captured image and the high resolution images rather than replacing the regular captured images. This is a concern because, depending on the size variations, displayTransform and CGAffineTransform must be used in different ways to scale the images. Not only that I need to able to use the frames continuously at either 30 fps or 60 fps, as they're produced rather than taking pictures occasionally, which the captureHighResolutionFrame method seems to be designed for considering the shutter sound. In order to use the captured image, I'm currently transforming it in the following way let image: CIImage = CIImage(cvImageBuffer: imageBuffer) let imageSize: CGSize = CGSize(width: CVPixelBufferGetWidth(imageBuffer), height: CVPixelBufferGetHeight(imageBuffer)) let normalizeTransform: CGAffineTransform = CGAffineTransform(scaleX: 1.0 / imageSize.width, y: 1.0 / imageSize.height) let flipTransform: CGAffineTransform = metadata.orientation.isPortrait ? CGAffineTransform(scaleX: -1, y: -1).translatedBy(x: -1, y: -1) : .identity guard let viewPort: CGRect = face.viewPort else { return nil } let viewPortSize: CGSize = viewPort.size guard let displayTransform: CGAffineTransform = face.arFrame?.displayTransform(for: metadata.orientation, viewportSize: CGSize(width: viewPortSize.width, height: viewPortSize.height)) else {   return nil } let scaleX: CGFloat = viewPortSize.width let scaleY: CGFloat = viewPortSize.height let viewPortTransform: CGAffineTransform = CGAffineTransform(scaleX: scaleX, y: scaleY) let scaledImage: CIImage = image   .transformed(by: normalizeTransform     .concatenating(flipTransform)     .concatenating(displayTransform)     .concatenating(viewPortTransform)   )   .cropped(to: viewPort)
Replies
2
Boosts
0
Views
1.9k
Activity
Feb ’23
minimum device requirements for ARWorldTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing
device: iPhone 8 Plus Xcode: Version 14.2 (14C18) Attempting to set up an AR session to allow a background high resolution frame capture using the new ARKit feature in IOS 16.2. My test code (following recommendations in WWDC video on this subject) is         if #available(iOS 16.0, *) {             if let videoCapFormat = ARWorldTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing {                 print("Format = (videoCapFormat)")             } else {                 print("Format not found")             } In this case, videoCapFormat is populated with nil. Should I assume that indicates that no video format for my device will support this capture. If so, as a follow on question, which devices do support this type of background high res capture?
Replies
2
Boosts
0
Views
763
Activity
Feb ’23
ARKit RoomPlan API Scanning Session Extending or pausing
Has anyone tried, if it's even possible, to pause or extend the scan?
Replies
0
Boosts
0
Views
1.4k
Activity
Oct ’22
CameraTrackingState is not detecting: ARKit
After upgrading iPhone to the iOS version 16, ARKit having issue with ARKit ARSession CameraTrackingState. TrackingState is going to .notAvailable and .limited(initializing) state and never returning to tracking state .normal. Screen camera keep showing loading. And when I am turning camera on and off , it shows the AR model on the screen. Tested Device: iPhone 12 Pro Max with iOS version 16.0. Whereas for iOS 15.6, TrackingState is going to .notAvailable and .limited(initializing) state and .limited(relocalising ) and then .normal. Relocalization state is also handled whenever it going to the interruption. func sessionShouldAttemptRelocalization(_ session: ARSession) -> Bool {     let configuration = ARWorldTrackingConfiguration()     configuration.planeDetection = [.horizontal,.vertical]     session.run(configuration, options: [.resetTracking, .removeExistingAnchors])     return true   } Please suggest some solution as I am not able to debug this. Is there any upgrade or issue with iOS version 16?
Replies
0
Boosts
0
Views
873
Activity
Sep ’22
Pose accuracy of ARKit6
In the process of calling and testing ARKit6, I found that the pose drift has become much larger than the previous version, even with the same code and the same post-processing operation. Is it because some option settings are enabled by default?
Replies
0
Boosts
0
Views
951
Activity
Sep ’22
HELLO FORUM CAN YOU GUYS HELP ME FIXING MY AUGMENTED REALITY APPLICATION USING SWIFT CODE?
Hello, im trying to build an AR Application. Im using swift code like UIKit, ARCL, Corelocation, and SceneKit. im already create the AR run well on the mobile device and my corelocation each pin are succesfully placed on each location. The problem is, when i clicked my object which is "the pin/ the object that i have been putted" it doesnt show any activities on the User Interface of Augmented reality. But the system work well on the debug area - activate console, when i click it shows all the name and the description of each pin that i press. But the problem is, the text/description doesnt show up on the Augmented reality/User Interface. here is my coding : (CODE LOCATION)  var location = CLLocation(coordinate: CLLocationCoordinate2D(latitude: -6.7596, longitude: 107.6098), altitude: 2084)     let image = UIImage(named: "pin")!     var annotationNode = LocationAnnotationNode(location: location, image: image)     annotationNode.annotationNode.name = "tangkuban perahu"     sceneLocationView.addLocationNodeWithConfirmedLocation(locationNode: annotationNode) (CODE TEXT/DESCRIPTION) override func touchesBegan(_ touches: Set, with event: UIEvent?) {         if let touch = touches.first {           let touchLocation = touch.location(in: sceneLocationView)           let hitResults = sceneLocationView.hitTest(touchLocation)           for result in hitResults {             print("HIT:-> Name: (result.node.description)")             print("HIT:-> description (String(describing: result.node.name))")                         }         }       } (ACTIVATE CONSOLE "OUTPUT") tangkuban perahu
Replies
0
Boosts
1
Views
843
Activity
Aug ’22
ARKit 6 high resolution frame capture issues
M1 iPad Pro with iPadOS 16 Beta 3 Xcode 14.0 beta 3 In a freshly created Xcode 14 beta 2 app using the Augmented Reality App template with Content Technology set to Metal, ARWorldTrackingConfiguration.recommendedVideoFormatForHighResolutionFrameCapturing returns a 60 fps, 1920 x 1440 video format. So, session.captureHighResolutionFrame fails to deliver a high res frame.
Replies
3
Boosts
1
Views
2.9k
Activity
Jul ’22
ARKit 6 Motion Capture doesn't work with A12 Chip also
after setting motion capture sample target to IOS 16 and build on iphone xs max it come up with several errors and no detection happen. also i tried the same on iphone 13 pro max the same thing happen.
Replies
0
Boosts
0
Views
592
Activity
Jul ’22
AR chess game example code WWW2022 conference
private let boardAnchor: AnchorEntity = AnchorEntity( *Argument passed to call that takes no arguments plane: .horizontal, *Cannot infer contextual base in reference to member 'horizontal' classification: [.floor, .table], *2Reference to member 'floor' cannot be resolved without a contextual type minimumBounds: SIMD2(0.1, 0.1)     ) how can this be fixed in the demo code of the chess game example capture chess swift presented at WWW2022 session AR experience any help highly apprishiated
Replies
1
Boosts
0
Views
1.3k
Activity
Jun ’22
can I take a photo using the builtInUltraWideCamera while using ARKit ?
I want to capture a high resolution photo but with builtInUltraWideCamera, is that possible to configure using configurableCaptureDeviceForPrimaryCamera? thank you
Replies
0
Boosts
0
Views
1.1k
Activity
Jun ’22