Skip to content
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

image is in rgb8 format, expected bgr8, #24

Open
vxgu86 opened this issue Oct 8, 2019 · 3 comments · May be fixed by #30
Open

image is in rgb8 format, expected bgr8, #24

vxgu86 opened this issue Oct 8, 2019 · 3 comments · May be fixed by #30

Comments

@vxgu86
Copy link

vxgu86 commented Oct 8, 2019

I am getting image_raw from a gscam drived camera, with /camera/image_raw subscribed.
the detectNet error with the following:

[cuda] cudaAllocMapped 131072 bytes, CPU 0x101c30000 GPU 0x101c30000
[cuda] cudaAllocMapped 32768 bytes, CPU 0x101b40000 GPU 0x101b40000
[ INFO] [1570526393.448824707]: model hash => 965427319687731864
[ INFO] [1570526393.448906165]: hash string => /usr/local/bin/networks/ped-100/snapshot_iter_70800.caffemodel/usr/local/bin/networks/ped-100/class_labels.txt
[ INFO] [1570526393.452781894]: node namespace => /detectnet
[ INFO] [1570526393.452866842]: class labels => /detectnet/class_labels_965427319687731864
[ INFO] [1570526393.467713092]: detectnet node initialized, waiting for messages
[ INFO] [1570526393.722328769]: converting 1920x1080 rgb8 image
[ERROR] [1570526393.722481165]: 1920x1080 image is in rgb8 format, expected bgr8
[ INFO] [1570526393.722541269]: failed to convert 1920x1080 rgb8 image
[ INFO] [1570526393.922863144]: converting 1920x1080 rgb8 image
[ERROR] [1570526393.923110279]: 1920x1080 image is in rgb8 format, expected bgr8
[ INFO] [1570526393.923377988]: failed to convert 1920x1080 rgb8 image

how can I change the image_encodings???

@cocodirasta
Copy link

Hi,

Have you found a way to solve your issue ?
I have the same problem.

Thank you

@borongyuan borongyuan linked a pull request Dec 6, 2019 that will close this issue
@gclarke42
Copy link

It looks like an in code fix for this is in progress but incase you need a faster solution. I was able to make a sub/pub node using cv_bridge which converted the rgb to bgr and then republish the new image. Not an ideal solution but was pretty simple. The cv_bridge example was basically what I used for the node. http://wiki.ros.org/cv_bridge

@qwedaq
Copy link

qwedaq commented Apr 6, 2020

It looks like an in code fix for this is in progress but incase you need a faster solution. I was able to make a sub/pub node using cv_bridge which converted the rgb to bgr and then republish the new image. Not an ideal solution but was pretty simple. The cv_bridge example was basically what I used for the node. http://wiki.ros.org/cv_bridge

hi i am facing the same error. can you please tell me where in the code can i fix this issue? I am new to this and i am not able to figure it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants