Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Update the tutorial of using Orbbec Astra cameras#25813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
3 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletiondoc/tutorials/app/intelperc.markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletiondoc/tutorials/app/kinect_openni.markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletionsdoc/tutorials/app/orbbec_astra.markdown → ...utorials/app/orbbec_astra_openni.markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| Using Orbbec Astra 3D cameras {#tutorial_orbbec_astra_openni} | ||
| ====================================================== | ||
| @tableofcontents | ||
| @@ -9,7 +9,7 @@ Using Orbbec Astra 3D cameras {#tutorial_orbbec_astra} | ||
| ### Introduction | ||
| This tutorial is devoted to the Astra Series of Orbbec 3D cameras (https://www.orbbec.com/products/structured-light-camera/astra-series/). | ||
| That cameras have a depth sensor in addition to a common color sensor. The depth sensors can be read using | ||
| the open source OpenNI API with @ref cv::VideoCapture class. The video stream is provided through the regular | ||
| camera interface. | ||
| @@ -18,7 +18,7 @@ camera interface. | ||
| In order to use the Astra camera's depth sensor with OpenCV you should do the following steps: | ||
| -# Download the latest version of Orbbec OpenNI SDK (from here <https://www.orbbec.com/developers/openni-sdk/>). | ||
| Unzip the archive, choose the build according to your operating system and follow installation | ||
| steps provided in the Readme file. | ||
| @@ -69,6 +69,7 @@ In order to use the Astra camera's depth sensor with OpenCV you should do the fo | ||
| chmod a+r $OUT_FILE | ||
| echo "exit" | ||
| @endcode | ||
| If you want to use the older SDK version 2.3.0.63, it can still be accessed from here <https://3dclub.orbbec3d.com/t/universal-download-thread-for-astra-series-cameras/622>. | ||
asmorkalov marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| -# Now you can configure OpenCV with OpenNI support enabled by setting the `WITH_OPENNI2` flag in CMake. | ||
| You may also like to enable the `BUILD_EXAMPLES` flag to get a code sample working with your Astra camera. | ||
| @@ -106,7 +107,7 @@ can be read using the OpenNI interface with @ref cv::VideoCapture class. The vid | ||
| not available through OpenNI API and is only provided via the regular camera interface. | ||
| So, to get both depth and color frames, two @ref cv::VideoCapture objects should be created: | ||
| @snippetlineno samples/cpp/tutorial_code/videoio/openni_orbbec_astra/openni_orbbec_astra.cpp Open streams | ||
| The first object will use the OpenNI2 API to retrieve depth data. The second one uses the | ||
| Video4Linux2 interface to access the color sensor. Note that the example above assumes that | ||
| @@ -119,12 +120,12 @@ For this example, we’ll configure width and height of both streams to VGA reso | ||
| the maximum resolution available for both sensors, and we’d like both stream parameters to be the | ||
| same for easier color-to-depth data registration: | ||
| @snippetlineno samples/cpp/tutorial_code/videoio/openni_orbbec_astra/openni_orbbec_astra.cpp Setup streams | ||
| For setting and retrieving some property of sensor data generators use @ref cv::VideoCapture::set and | ||
| @ref cv::VideoCapture::get methods respectively, e.g. : | ||
| @snippetlineno samples/cpp/tutorial_code/videoio/openni_orbbec_astra/openni_orbbec_astra.cpp Get properties | ||
| The following properties of cameras available through OpenNI interface are supported for the depth | ||
| generator: | ||
| @@ -156,7 +157,7 @@ As there are two video sources that should be read simultaneously, it’s necess | ||
| threads to avoid blocking. Example implementation that gets frames from each sensor in a new thread | ||
| and stores them in a list along with their timestamps: | ||
| @snippetlineno samples/cpp/tutorial_code/videoio/openni_orbbec_astra/openni_orbbec_astra.cpp Read streams | ||
| VideoCapture can retrieve the following data: | ||
| @@ -177,7 +178,7 @@ two video streams may become out of sync even when both streams are set up for t | ||
| A post-synchronization procedure can be applied to the streams to combine depth and color frames into | ||
| pairs. The sample code below demonstrates this procedure: | ||
| @snippetlineno samples/cpp/tutorial_code/videoio/openni_orbbec_astra/openni_orbbec_astra.cpp Pair frames | ||
| In the code snippet above the execution is blocked until there are some frames in both frame lists. | ||
| When there are new frames, their timestamps are being checked -- if they differ more than a half of | ||
| @@ -194,5 +195,5 @@ but the depth data makes it easy. | ||
|  | ||
| The complete implementation can be found in | ||
| [openni_orbbec_astra.cpp](https://github.com/opencv/opencv/tree/4.x/samples/cpp/tutorial_code/videoio/openni_orbbec_astra/openni_orbbec_astra.cpp) | ||
| in `samples/cpp/tutorial_code/videoio` directory. | ||
2 changes: 1 addition & 1 deletiondoc/tutorials/app/table_of_content_app.markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.