Closed Suedocode closed 4 days ago
Thank you for your feedback. Due to the National Day holiday in China, most of our team is on vacation, which has delayed our response. We will address your issues and needs as soon as we return to work tomorrow.
The problem you’re encountering is likely due to a bug in your code. You should modify the line:
const uint8_t* bgra = get_color_pix(c_pix.y, c_pix.x, color_data);
to:
const uint8_t* bgra = get_color_pix(c_pix.x, c_pix.y, color_data);
With ob::Align, we don’t yet support C2D processing for BGRA formatted images. You might want to try using RGB format instead. If that’s not convenient, you can also wait for our next update, which should include support for BGRA and is expected to be released in about a week.
Oh my gosh inverting the pixel coordinates fixed it. My bad!
I'm interested in the simplicity of ob::Align, however I need to be able to load extrinsics from disk and apply them to images from that device. I didn't quite understand the code that I saw, but it seemed like it was trying to load extrinsics from meta data within the image itself, which will not be available when I'm simulating situations without a camera connected.
That said, these new CoordinateTransformHelpers might be good enough because they do seem quite a bit faster than the legacy version.
The extrinsics between frames is actually bound to their StreamProfile. Frame provides an interface to get its StreamProfile, and StreamProfile provides an API to get extrinsics.
StreamProfile currently also provides an interface register extrinsics from the user side, which can meet your needs of loading and applying extrinsics from disk.
However, this is indeed very complicated to use. We will consider providing an interface in ob::Align to directly input user-defined extrinsics.
I am attempting to create a colored depth frame in the depth camera geometry, so mapping COLOR to DEPTH. I've attempted this so far modeled after the coordinate_transform example code, but the results were very off-center. I'm sure I'm just misusing the various transformation parameters and could use some guidance on which parameters go where. I've only cut out the relevant pieces:
I can post the full runnable code if necessary.
I also tried the ob::Align stuff which looks promising, but the api doesn't seem to incorporate intrinsics yet and it yields this message:
Environment: Ubuntu 22.04.5 LTS (x86_64) g++ 11.4.0 OrbbecSDK-dev bd2d4dd41d6214c9d8bfe3365efa865d5fe8df9f Firmware v1.2.9