Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

videoio: add Orbbec Gemini 330 camera support#27230

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
asmorkalov merged 10 commits intoopencv:4.xfromsirudoi:4.x
Apr 25, 2025
Merged

videoio: add Orbbec Gemini 330 camera support#27230

asmorkalov merged 10 commits intoopencv:4.xfromsirudoi:4.x
Apr 25, 2025

Conversation

@sirudoi
Copy link
Contributor

@sirudoisirudoi commentedApr 14, 2025
edited
Loading

Pull Request Readiness Checklist

See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • The feature is well documented and sample code can be built with the project CMake

Description of Changes

motivated:

  • Orbbec has launched a new RGB-D camera — the Gemini 330. To fully leverage the capabilities of the Gemini 330, Orbbec simultaneously released version 2 of the open-source OrbbecSDK. This PR adapts the support for the Gemini 330 series cameras to better meet and respond to users’ application requirements.

change:

  • Add support for the Orbbec Gemini330 camera.
  • Fixed an issue with Femto Mega on Windows 10/11; for details, seeissue.
  • When enablingHAVE_OBSENSOR_ORBBEC_SDK, the build now fetches version 2 of the OrbbecSDK, and the sample API calls have been updated to the v2 format.

Testing

OSCompilerCameraResult
Windows 11(VS2022) MSVC runtime library version 14.40Gemini 335/336LPass
Windows 11(VS2022) MSVC runtime library version 14.19Gemini 335/336LPass
Ubuntu22.04GCC 11.4Gemini 335/336LPass
Ubuntu18.04GCC 7.5Gemini 335/336LPass

Acknowledgements

Thank you to the OpenCV team for the continuous support and for creating such a robust open source project. I appreciate the valuable feedback from the community and reviewers, which has helped improve the quality of this contribution!

hzcyf reacted with thumbs up emoji
@asmorkalov
Copy link
Contributor

@fengyuentau Could you handle the pr?

fengyuentau reacted with eyes emoji

@fengyuentau
Copy link
Member

@fengyuentau Could you handle the pr?

@kaingwade will help to test this PR once we get the camera.

asmorkalov reacted with thumbs up emoji

Copy link
Contributor

@kaingwadekaingwade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Tested the latest Gemini 330 series on Windows 10 and Ubuntu 22.04 (6.8.0-57),335/335L/336 work well, but 336L only outputs the RGB stream.

Comment on lines 16 to 37
if(WIN32)
# copy orbbecsdk dll to output floader
if(MSVC_IDE)
file(COPY${OrbbecSDK_DLL_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH}/Release)
file(COPY${OrbbecSDK_DLL_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH}/Debug)
file(COPY${OrbbecSDK_RUNTIME_RESOURCE_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH}/Release)
file(COPY${OrbbecSDK_RUNTIME_RESOURCE_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH}/Debug)

file(COPY${OrbbecSDK_LIBRARY}DESTINATION${LIBRARY_OUTPUT_PATH}/Release)
file(COPY${OrbbecSDK_LIBRARY}DESTINATION${LIBRARY_OUTPUT_PATH}/Debug)
elseif(MSVCAND (CMAKE_GENERATORMATCHES"Visual"))
file(COPY${OrbbecSDK_DLL_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE})
file(COPY${OrbbecSDK_RUNTIME_RESOURCE_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE})
file(COPY${OrbbecSDK_LIBRARY}DESTINATION${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE})
else()
file(COPY${OrbbecSDK_DLL_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH})
file(COPY${OrbbecSDK_RUNTIME_RESOURCE_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH})
file(COPY${OrbbecSDK_LIBRARY}DESTINATION${LIBRARY_OUTPUT_PATH})
endif()
else()
file(COPY${OrbbecSDK_RUNTIME_RESOURCE_FILES}DESTINATION${EXECUTABLE_OUTPUT_PATH})
file(COPY${OrbbecSDK_DLL_FILES}DESTINATION${LIBRARY_OUTPUT_PATH})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Unlike on MacOS, on Windows and Linux functionality of Orbbec SDK is integrated into OpenCV other than calling the SDK directly. These lines are not involved.

@kaingwade
Copy link
Contributor

LGTM.

Comment on lines 221 to 243
cv::MatsrcMat(frame->height, frame->width, CV_16UC1, frame->data);
cv::resize(srcMat, srcMat,cv::Size(), scale, scale, cv::INTER_LINEAR);

// left/right crop
constint valid_width = srcMat.cols - crop_left - crop_right;
if (valid_width <=0 || srcMat.rows <=0) {
CV_LOG_ERROR(NULL,"Invalid horizontal crop parameters");
return;
}
srcMat =srcMat(cv::Rect(crop_left,0, valid_width, srcMat.rows));

// top padding
if (pad_top >0) {
cv::copyMakeBorder(srcMat, srcMat, pad_top,0,0,0, cv::BORDER_CONSTANT,0);
}

// bottom crop
constint valid_height = srcMat.rows - crop_bottom;
if (valid_height <=0) {
CV_LOG_ERROR(NULL,"Invalid vertical crop parameters");
return;
}
srcMat =srcMat(cv::Rect(0,0, srcMat.cols, valid_height));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why do you need resize and crop for the camera frames? I propose to return them in original size.
Also resized does not support in-place processing. The code always triggers srcMat realloc.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why do you need resize and crop for the camera frames? I propose to return them in original size. Also resized does not support in-place processing. The code always triggers srcMat realloc.

Hi, the resize/crop operations ensured pixel alignment between depth and color streams with mismatched resolutions. Without them, users would receive misaligned data. I now enforce matching resolutions to eliminate these steps. Thank you for your insight!

@asmorkalovasmorkalov added this to the4.12.0 milestoneApr 23, 2025
@asmorkalovasmorkalov merged commit485c7d5 intoopencv:4.xApr 25, 2025
51 of 55 checks passed
fengyuentau pushed a commit to fengyuentau/opencv that referenced this pull requestApr 25, 2025
videoio: add Orbbec Gemini 330 camera supportopencv#27230### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [x] I agree to contribute to the project under Apache 2 License.- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV- [x] The PR is proposed to the proper branch- [x] The feature is well documented and sample code can be built with the project CMake### Description of Changes#### motivated:- Orbbec has launched a new RGB-D camera — the Gemini 330. To fully leverage the capabilities of the Gemini 330, Orbbec simultaneously released version 2 of the open-source OrbbecSDK. This PR adapts the support for the Gemini 330 series cameras to better meet and respond to users’ application requirements.#### change:- Add support for the Orbbec Gemini330 camera.- Fixed an issue with Femto Mega on Windows 10/11; for details, see [issue](opencv#23237 (comment)).- When enabling `HAVE_OBSENSOR_ORBBEC_SDK`, the build now fetches version 2 of the OrbbecSDK, and the sample API calls have been updated to the v2 format.### Testing|     OS     |                Compiler                 |      Camera       | Result ||:----------:|:---------------------------------------:|:-----------------:|:------:|| Windows 11 | (VS2022) MSVC runtime library version 14.40       | Gemini 335/336L   | Pass   || Windows 11 | (VS2022) MSVC runtime library version 14.19       | Gemini 335/336L   | Pass   || Ubuntu22.04| GCC 11.4                               | Gemini 335/336L   | Pass   || Ubuntu18.04| GCC 7.5                                | Gemini 335/336L   | Pass   |### AcknowledgementsThank you to the OpenCV team for the continuous support and for creating such a robust open source project. I appreciate the valuable feedback from the community and reviewers, which has helped improve the quality of this contribution!
@asmorkalovasmorkalov mentioned this pull requestApr 29, 2025
asmorkalov pushed a commit that referenced this pull requestNov 7, 2025
Add macOS support for Orbbec Gemini330 camera#27930### Description of ChangesAdds macOS support for Orbbec Gemini330 in videoio by integrating OrbbecSDK v2. Completes the non-macOS work in [#27230](#27230).#### Motivation[#27230](#27230) skipped macOS. On macOS, UVC alone lacks required device controls; OrbbecSDK v2 provides them.#### Key Change - macOS: fetch/link OrbbecSDK v2.5.5 (replaces v1.9.4). - videoio (macOS): switch OrbbecSDK API usage from v1 to v2.### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [x] I agree to contribute to the project under Apache 2 License.- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV- [x] The PR is proposed to the proper branch- [x] The feature is well documented and sample code can be built with the project CMake
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov approved these changes

@kaingwadekaingwadekaingwade approved these changes

@fengyuentaufengyuentauAwaiting requested review from fengyuentau

Assignees

@kaingwadekaingwade

Projects

None yet

Milestone

4.12.0

Development

Successfully merging this pull request may close these issues.

4 participants

@sirudoi@asmorkalov@fengyuentau@kaingwade

[8]ページ先頭

©2009-2025 Movatter.jp