-
Notifications
You must be signed in to change notification settings - Fork 161
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 config to enable MJPG encoded stream #81
base: master
Are you sure you want to change the base?
Conversation
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.
Thank you for your contribution.
If I understand correctly, when enable_mjpg
is set to true
and a camera device supports mjpg, image encoded as mjpg is published directly without decoding to bgr8 (as usual image), right?
If yes, I'm wondering we should use sensor_msgs/CompressedImage
message instead of sensor_msgs/Image
.
Another question is some image manipulation like cv::flip
is supported on mjpg image?
As far as I understand, this only forces the USB camera to use MJPEG encoding to transport the image from the camera to the PC, which adds additional CPU load to the PC for decoding and of course decreases the stream quality. Depending on the camera this may improve the frame rate of the capture stream. The captured image encoding in OpenCV is not affected by this change. |
961ecfc
to
3182b6f
Compare
3182b6f
to
27cdad7
Compare
@furushchev @awesomebytes Rebased on master. On a new camera I have here, enabling MJPG stream is necessary to unlock all resolutions. |
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.
Looks good to me, what do you think @furushchev
That said, @machinekoder would you mind adding to the documentation in the README this new option? |
@awesomebytes done |
5806c68
to
a0967cd
Compare
This patch allows forcing MJPG steam support of the camera.