Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/curvsurf/findsurface-visionos
FindSurface library for visionOS, distributed as a Swift package.
https://github.com/curvsurf/findsurface-visionos
pointcloud swift visionos
Last synced: about 2 months ago
JSON representation
FindSurface library for visionOS, distributed as a Swift package.
- Host: GitHub
- URL: https://github.com/curvsurf/findsurface-visionos
- Owner: CurvSurf
- License: mit
- Created: 2024-06-21T08:35:08.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T12:43:24.000Z (4 months ago)
- Last Synced: 2024-09-12T23:54:06.937Z (4 months ago)
- Topics: pointcloud, swift, visionos
- Language: Swift
- Size: 309 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FindSurface-visionOS
**Curv*Surf* FindSurface™ library package for visionOS (Swift)**
## Overview
**FindSurface-visionOS** is a Swift package of FindSurface™ library, of which interface is modified to allow you to use its functionalities.
> **NOTE**: `FindSurfaceFramework` (including `FindSurface-visionOS`) provides its functionality for non-commercial purposes within Apple Vision Pro devices. It is internally limited to process input point clouds of **50k points or less**. For commercial uses or use cases that require more than 50k points, please contact to [email protected].
## Samples
The followings are sample project repositories to help you get started to make your application with the package (more samples are to be added in the future):
- [FindSurface-RealityKit-visionOS](https://github.com/CurvSurf/FindSurface-RealityKit-visionOS)
- [FindSurface-RealityKit-visionOS-Response-to-Request](https://github.com/CurvSurf/FindSurface-RealityKit-visionOS-Response-to-Request)
- [FindSurface-RealityKit-visionOS-Real-Time](https://github.com/CurvSurf/FindSurface-RealityKit-visionOS-Real-Time)To see how this package's APIs are called in each sample project, please refer to the following links:
- [FindSurface-RealityKit-visionOS (Source file)](https://github.com/CurvSurf/FindSurface-RealityKit-visionOS/blob/86024c6ea42997d06bc3aa016ee275fad770e46c/FindSurfaceST-visionOS/Views/ImmersiveView.swift#L160-L239)
- [FindSurface-RealityKit-visionOS-Response-to-Request (Source file)](https://github.com/CurvSurf/FindSurface-RealityKit-visionOS-Response-to-Request/blob/c8d318c7bb9dc9b99caf18168553e3b5b6c558b7/FindSurfaceRR-visionOS/Views/ImmersiveView.swift#L45-L218).
- [FindSurface-RealityKit-visionOS-Real-Time (Source code description)](https://github.com/CurvSurf/FindSurface-RealityKit-visionOS-Real-Time/tree/main?tab=readme-ov-file#invoking-findsurface-packages-apis)## How to install
### Adding this package as a Dependency
You can import this package by adding the following line to the dependencies in your `Package.swift` file:
````
dependencies: [
...
.package(utl: "https://github.com/CurvSurf/FindSurface-visionOS", from: "1.0.0")
],
targets: [
.target(name: "", dependencies: [
...
"FindSurface-visionOS"
]),
...
]
````Then, add `import FindSurface_visionOS` (note that it is not hyphenated, but underscored in the middle of the words.)
### Using the XCFramework without the wrapper
This package is a wrapper containing the visionOS version (including the simulator) of the FindSurface XCFramework. You can also refer to the source code of this package to use the framework directly. In that case, import `FindSurfaceFramework` instead.
## Optimal Parameter Set for Apple Vision Pro
> **NOTE**: Due to the limited accuracy of `MeshAnchor`, which is generated by Apple Vision Pro, the size of the objects that can be detected or measured using `FindSurface` is also practically limited in a range from 1 meter to 20 meters.
Each parameter of FindSurface provides essential information that helps FindSurface detect and measure object surfaces from the given points. For detailed explanations of each parameter, please refer to [FindSurface](https://github.com/CurvSurf/FindSurface#how-does-it-work).
Once measurement points are collected, `measurement accuracy` and `mean distance` should be determined as specific values corresponding to the collected points. This is because these parameters reflect the characteristics of the points.
FindSurface works based on these values and requires additional parameters such as the `seed radius`, which is proportional to the approximate diameter of objects to be detected/measured, and `lateral extension`/`radial expansion` for region growing, depending on the lengths/widths of the objects if necessary.
From our continuous testing of FindSurface in various environments on Apple Vision Pro, we have determined the following optimal set of parameters:
- Accuracy: 1.5 cm
- Mean Distance: 10 cm
- Seed Radius: 1/4 ~ 1/2 of object's diameter/width in centimeter
- Lat. Ext.: 10
- Rad. Exp.: 5As an Apple Vision Pro user, you only need to set the seed radius proportional to the size of the object using the above parameter presets as default. For planes having small areas or short cylinders/cones, it is recommended to set the lateral extension to below `5`. To detect or measure an object smaller than 1 meter (although we don't recommend it), set the radial expansion to `4` or less.
## About License
You may use the source code of this package freely under MIT license, as the license file stated, except for `FindSurfaceFramework`, which is the core of the package.
About the framework, refer to the following statement:
````
Copyright (c) 2024 CurvSurf, Inc. All rights reserved.The framework `FindSurface-visionOS.xcframework` and `FindSurfaceFramework.framework`'s
ownership is solely on CurvSurf, Inc. and anyone can use it for non-commercial purposes.
Contact to [email protected] for commercial use of the library.
````