-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add support for bayer images to camera sensor #336
Add support for bayer images to camera sensor #336
Conversation
Signed-off-by: tejalbarnwal <tejalbarnwal@gmail.com>
Signed-off-by: tejalbarnwal <tejalbarnwal@gmail.com>
Hey @iche033 ,I couldn't perform Updates: |
Signed-off-by: tejalbarnwal <tejalbarnwal@gmail.com>
Signed-off-by: tejalbarnwal <tejalbarnwal@gmail.com>
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.
needs gz-rendering7 release
Codecov Report
@@ Coverage Diff @@
## gz-sensors7 #336 +/- ##
===============================================
- Coverage 70.18% 69.69% -0.50%
===============================================
Files 36 36
Lines 3928 3956 +28
===============================================
Hits 2757 2757
- Misses 1171 1199 +28
|
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.
MacOS sompilation is failing
/Users/jenkins/jenkins-agent/workspace/ignition_sensors-ci-pr_any-homebrew-amd64/ign-sensors/src/CameraSensor.cc:288:56: error: no member named 'PF_BAYER_GBRG8' in namespace 'gz::rendering'
this->dataPtr->camera->SetImageFormat(rendering::PF_BAYER_GBRG8);
~~~~~~~~~~~^
/Users/jenkins/jenkins-agent/workspace/ignition_sensors-ci-pr_any-homebrew-amd64/ign-sensors/src/CameraSensor.cc:291:56: error: no member named 'PF_BAYER_GRBG8' in namespace 'gz::rendering'
this->dataPtr->camera->SetImageFormat(rendering::PF_BAYER_GRBG8);
~~~~~~~~~~~^
/Users/jenkins/jenkins-agent/workspace/ignition_sensors-ci-pr_any-homebrew-amd64/ign-sensors/src/CameraSensor.cc:628:23: error: no member named 'PF_BAYER_GBRG8' in namespace 'gz::rendering'
case rendering::PF_BAYER_GBRG8:
~~~~~~~~~~~^
/Users/jenkins/jenkins-agent/workspace/ignition_sensors-ci-pr_any-homebrew-amd64/ign-sensors/src/CameraSensor.cc:632:23: error: no member named 'PF_BAYER_GRBG8' in namespace 'gz::rendering'
case rendering::PF_BAYER_GRBG8:
~~~~~~~~~~~^
4 errors generated.
make[2]: *** [src/CMakeFiles/gz-sensors7-camera.dir/CameraSensor.cc.o] Error 1
I think the bottle was not ready when the build was triggered. I retriggered the build and should be fixed now |
🎉 New feature
Closes #299
Sub-Tasks
BAYER_RGGB8
withOGRE
OGRE
OGRE2
Summary and Related PRs
The functionality reads the user input and renders an RGB image, which is later converted into a single channel 8bit Bayer image using
ConvertRGBToBayer()
added toUtils.cc
insidegz-rendering
.gz-sensors
: Adds a switch case forRGGB bayer format
insideCameraSensor.cc
and passes theR8G8B8
format to render the image.gz-redering
: AddsConvertRGBToBayer()
toUtils.cc
, modifiesOgreRenderTarget.cc
to call the conversion function, and handles image format conversion functions withif-else
statements.gz-gui
: Adds switch cases to display Bayer images in Gazebo GUI inside. It treats them as single-channel 8-bit images.gz-common
: ModifiesImage::SetFromData
insideImage.cc
to support saving of Bayer images. In order to save it It treats them as single-channel 8-bit images.Test it
In order to test this, one can modify
camera_sensor.sdf
insidegz-sim
here. Would have just to replace the part with the following snippet.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.