-
Notifications
You must be signed in to change notification settings - Fork 27
RSDK-6530: Add depth map encode decode methods to C++ SDK #213
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
44e961b
Add method to camera.hpp and camera.cpp
hexbabe d02db03
Run clang-format
hexbabe 6068ba7
Make values that can be consts consts
hexbabe 8edae9a
Add first draft impl of encode/decode + tests. Mostly throwing this u…
hexbabe 390eaf2
Merge branch 'main' into RSDK-6530
hexbabe 1b0126f
Make name and syntax changes
hexbabe ecd98f4
Make encode_depth_map static oops
hexbabe b6fe35f
Add better debugging and little endian check (why the test is failing?)
hexbabe a67442a
Convert little endian to big endian in encoding
hexbabe d08e8fb
Merge branch 'main' into RSDK-6530
hexbabe 10c16de
Add depth map magic number
hexbabe f6e5b22
se htonll and memcpy approach as per Realsense module
hexbabe a79b770
Add arpa import
hexbabe e23a04c
Use boost for endian conversion; other various code improvements e.g.…
hexbabe 3387886
Merge branch 'main' into RSDK-6530
hexbabe 988cec8
Address all review points except xtensor
hexbabe 09398fe
Merge branch 'main' into RSDK-6530
hexbabe 244dfef
Change read bytes helper to take offset as pointer; Change header and…
hexbabe df75842
Change xtensor to own depth values memory; Change read and append big…
hexbabe 7bf6b60
Remove unnecessary imports
hexbabe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked up a method to copy the memory in. Let me know if there's a better way to do it @acmorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I was actually just looking at that. So, what you have here is fine, though it does cost you a copy. If you wanted to avoid the copy though, I think that's totally doable.
The trick would be to not create a
std::vector, but just to directly create thext::xarrayyou want to return, of the appropriate size and shape, before the loop, and then populate it in the loop.Now, that'd require a little hassle to compute the correct
iiandjjw.r.t.heightandwidthandi, which is sort of a hassle. However,xtensorlets you reshape and view. So I think you could do it something like this:It may not be exactly
flatten, you might needreshape_view? I'd need to spend a little time with thextensordocs to be sure. But something from https://xtensor.readthedocs.io/en/latest/view.html.I'd say spend no more than 15 minutes on it. If you can make it work, great. If not, put in a TODO and leave it as a copy.