Add support for single channel 16 bit grayscale image format#229
Add support for single channel 16 bit grayscale image format#229deepanshubansal01 merged 4 commits intomainfrom
Conversation
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
|
@iche033 I was wondering for 16 bit image format unit test should I just replicate like the one did for 8 bit, seems like it will be a lot of code duplication and if their is a way we can avoid the code duplication. cc @adityapande-1995 |
Codecov Report
@@ Coverage Diff @@
## main #229 +/- ##
=======================================
Coverage 80.00% 80.00%
=======================================
Files 1 1
Lines 15 15
=======================================
Hits 12 12
Misses 3 3 Continue to review full report at Codecov.
|
Can we say that if it works for 8 bit then it will work for 16 bit as well and we don't need to write additional unit tests for 16 bit, not sure. |
|
you can modify that test and the test sdf file to load 2 cameras: one 8 bit and one 16 bit, and just subscribe to 2 topics and verify the image format in 2 different callbacks |
Thanks a lot! |
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
test/integration/camera.cc
Outdated
| unsigned int g_imgCounter2 = 0; | ||
|
|
||
| void OnGrayscaleImage(const gz::msgs::Image &_msg) | ||
| void OnGrayscaleImageL8(const ignition::msgs::Image &_msg) |
There was a problem hiding this comment.
Because of the transition to gz namespace, we should keep this as gz::msgs::Image
There was a problem hiding this comment.
I see. Thanks
test/integration/camera.cc
Outdated
| g_imgCounter1++; | ||
| } | ||
|
|
||
| void OnGrayscaleImageL16(const ignition::msgs::Image &_msg) |
| </noise> | ||
| </camera> | ||
| </sensor> | ||
| <sensor name="camera2" type="camera"> |
There was a problem hiding this comment.
camera_16_bit sounds more descriptive. Similarly in the code for sensor pointers, handles and helpers, it would be nice to have descriptive names, like cameraId8Bit or sensorPtrCamera8Bit
There was a problem hiding this comment.
I think the CI is also failing after I resolved merge conflict. I will take a look at that as well.
Signed-off-by: deepanshu <deepanshubansal01@gmail.com>
|
The tests for cameras are segfaulting on jammy. |
Those have been happening before this PR 🙃 |
iche033
left a comment
There was a problem hiding this comment.
looks good to me, thanks for updating the test.
Summary
This PR adds support for 16 bit grayscale image format full description here #73
Checklist
codecheckpassed (See contributing)