Comments (6)
I want to know intrinsic parameters of Gemini E in Ubuntu 22.04. I tried 2 ways to know them.
First, I tried to use API like below code.
int main(int, char**){ ob::Pipeline pipe; auto device = pipe.getDevice(); auto cameraParamList = device->getCalibrationCameraParamList(); for(int i = 0; i < cameraParamList->count(); i++) { OBCameraParam obParam = cameraParamList->getCameraParam(i); std::cout << "fx:" << obParam.depthIntrinsic.fx << " fy: " << obParam.depthIntrinsic.fy << " cx:" << obParam.depthIntrinsic.cx << " cy: " << obParam.depthIntrinsic.cy << " width: " << obParam.depthIntrinsic.width << " height:" << obParam.depthIntrinsic.height << std::endl;} }
I got no the no message and I noticed the "cameraParamList->count()" is 0.
Second, I started "OBCommonUsages" in SDK and make it print parameters. And it says, all parameters are 0 like below.
Input command: p depthIntrinsic fx:0, fy0, cx:0, cy:0 ,width:0, height:0 rgbIntrinsic fx:0, fy0, cx:0, cy:0, width:0, height:0 depthDistortion k1:0, k2:0, k3:0, k4:0, k5:0, k6:0, p1:0, p2:0 rgbDistortion k1:0, k2:0, k3:0, k4:0, k5:0, k6:0, p1:0, p2:0 transform-rot: [0, 0, 0, 0, 0, 0, 0, 0, 0] transform-trans: [ 0, 0, 0]
How can I know the intrinsic parameters of my Gemini E?
I tested it on Ubuntu 22.04, and it's working fine.
from orbbecsdk.
1 Obtain Camera Parameters through the Device
The intrinsic parameters obtained through the Device are the raw intrinsic parameters obtained directly from the device, without depth-to-color (D2C) . It is recommended for non-professionals to obtain parameters from the pipeline.
Use case: When only Depth is enabled and D2C alignment is not required, the intrinsic parameters can be obtained from the Device. The intrinsic parameters obtained from the Device are provided as a list, and the appropriate set of intrinsic parameters should be selected based on the resolution, matching the streaming resolution.
ob::Pipeline pipe;
auto device = pipe.get device ();
auto cameraParamList = device->getCalibrationCameraParamList();
// Print the intrinsic parameters.
for(int i = 0; i < cameraParamList->count(); i++) {
OBCameraParam obParam = cameraParamList->getCameraParam (I);
std::cout << "fx:" << obParam.depthIntrinsic.fx << " fy: " << obParam.depthIntrinsic.fy << " cx:" << obParam.depthIntrinsic.cx
<< " cy: " << obParam.depthIntrinsic.cy
<< " width: " << obParam.depthIntrinsic.width << " height:" << obParam.depthIntrinsic.height << std::endl;
}
2 Obtain Camera Parameters through Pipeline (We recommend using this method)
To obtain the camera's intrinsic parameters through the Pipeline, enable the Depth stream and retrieve the intrinsic parameters for Depth. Refer to the DepthViewer sample for obtaining the Depth stream. Additionally, obtain the intrinsic parameters after depth-to-color (D2C) alignment by referring to the SyncAlignViewer sample, which demonstrates obtaining both the Depth and Color streams.
Note: To obtain camera parameters by Pipiline, you must obtain them after the stream is turned on.
ob::Pipeline pipe;
pipe.start(config);
auto camera_param = pipe.getCameraParam();
from orbbecsdk.
I want to know intrinsic parameters of Gemini E in Ubuntu 22.04. I tried 2 ways to know them.
First, I tried to use API like below code.
int main(int, char**){ ob::Pipeline pipe; auto device = pipe.getDevice(); auto cameraParamList = device->getCalibrationCameraParamList(); for(int i = 0; i < cameraParamList->count(); i++) { OBCameraParam obParam = cameraParamList->getCameraParam(i); std::cout << "fx:" << obParam.depthIntrinsic.fx << " fy: " << obParam.depthIntrinsic.fy << " cx:" << obParam.depthIntrinsic.cx << " cy: " << obParam.depthIntrinsic.cy << " width: " << obParam.depthIntrinsic.width << " height:" << obParam.depthIntrinsic.height << std::endl;} }
I got no the no message and I noticed the "cameraParamList->count()" is 0.
Second, I started "OBCommonUsages" in SDK and make it print parameters. And it says, all parameters are 0 like below.
Input command: p depthIntrinsic fx:0, fy0, cx:0, cy:0 ,width:0, height:0 rgbIntrinsic fx:0, fy0, cx:0, cy:0, width:0, height:0 depthDistortion k1:0, k2:0, k3:0, k4:0, k5:0, k6:0, p1:0, p2:0 rgbDistortion k1:0, k2:0, k3:0, k4:0, k5:0, k6:0, p1:0, p2:0 transform-rot: [0, 0, 0, 0, 0, 0, 0, 0, 0] transform-trans: [ 0, 0, 0]
How can I know the intrinsic parameters of my Gemini E?
Is it that your device parameters are lost or not calibrated? Please test by obtaining parameters through the pipeline.
from orbbecsdk.
@zhonghong322 Wow, I tried again by using "OBCommonUsages" bin file, and I succeeded to get parameters by getting parameter command after streaming command.
When OBCommonUsages is executed, the rgb streaming window comes up so I miscatched the streaming is started automatically.
Thank you for your help!
Have a nice day.
from orbbecsdk.
@zhonghong322 I noticed the parameters are not normal and the values are changing when I try to get them.
Can you give me an advice to get the parameters from device?
I tried like below but still the result is not normal.
#include
#include "libobsensor/ObSensor.hpp"
int main(int, char**){
ob::Pipeline pipe;
auto device = pipe.getDevice();
std::shared_ptrob::Config config = std::make_sharedob::Config();
std::shared_ptrob::VideoStreamProfile colorProfile = nullptr;
try {
auto profiles = pipe.getStreamProfileList(OB_SENSOR_COLOR);
try {
colorProfile = profiles->getVideoStreamProfile(640, 480, OB_FORMAT_RGB, 30);
}
catch(ob::Error &e) {
colorProfile = std::const_pointer_cast<ob::StreamProfile>(profiles->getProfile(OB_PROFILE_DEFAULT))->as<ob::VideoStreamProfile>();
}
config->enableStream(colorProfile);
}
catch(ob::Error &e) {
std::cerr << "Current device is not support color sensor!" << std::endl;
exit(EXIT_FAILURE);
}
pipe.start(config);
auto camera_param = pipe.getCameraParam();
std::cout << "fx:" << camera_param.rgbIntrinsic.fx << " fy: " << camera_param.rgbIntrinsic.fy << " cx:" << camera_param.rgbIntrinsic.cx
<< " cy: " << camera_param.rgbIntrinsic.cy
<< " width: " << camera_param.rgbIntrinsic.width << " height:" << camera_param.rgbIntrinsic.height << std::endl;
auto cameraParamList = device->getCalibrationCameraParamList();
std::cout << "cameraParamList->count()\n" << cameraParamList->count() << std::endl;
for(int i = 0; i < cameraParamList->count(); i++) {
OBCameraParam obParam = cameraParamList->getCameraParam(i);
std::cout << "fx:" << obParam.rgbIntrinsic.fx << " fy: " << obParam.rgbIntrinsic.fy << " cx:" << obParam.rgbIntrinsic.cx
<< " cy: " << obParam.rgbIntrinsic.cy
<< " width: " << obParam.rgbIntrinsic.width << " height:" << obParam.rgbIntrinsic.height << std::endl;
}
}
from orbbecsdk.
I got the parameters using viewer.
from orbbecsdk.
Related Issues (20)
- RGB image exposure time and gain HOT 3
- Frame index abnormal warnings on Femto Mega with ethernet HOT 5
- API Docs result in 404 error HOT 2
- Orbbec Viewer Crash if another Camera is in Network HOT 1
- Femto Bolt: Crash after "got nvram data failed.retrying..." HOT 3
- Femto Bolt: Crash after "Process frame failed!" HOT 2
- Femto Bolt: Failed to load depth engine plugin HOT 1
- OrbbecViewer_v1.9.5 fails to startup when (10) Femto Bolt sensors are connected to the host PC HOT 2
- Static release OrbbecSDK/lib HOT 2
- retCode: 204 using Raspberry pi 4 / Raspberry pi 5 with Orbbec Bold HOT 2
- Does Femto Bolt support Ubuntu 22.04 ? HOT 2
- Is 2bc5:0404 still well supported by recent release 1.9.5? HOT 1
- depth to color space mapping problem HOT 1
- Playback control (pause, resume, frame by frame) HOT 1
- Unity Wrapper Support? HOT 7
- Gemini 2XL [35472][ObRTPSink.cpp:320] Drop output-frame to receive new frame due to reclaimed-frame queue is empty HOT 2
- Windows 10/11 problems using OrbbecUnitySDK after building HOT 5
- Firmware update failure on macOS, device is unresponsive HOT 3
- Help, Question aboult timestamp
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbbecsdk.