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

How to make a depth stream video #178

Closed
shakith opened this issue Nov 4, 2015 · 2 comments
Closed

How to make a depth stream video #178

shakith opened this issue Nov 4, 2015 · 2 comments

Comments

@shakith
Copy link

shakith commented Nov 4, 2015

I'm using the command rosrun image_view video_recorder image:=/kinect2/sd/image_depth _encoding:=16UC1 to make depth stream video. However, it crashes with the following error.

Starting to record MJPG video at [512 x 424]@15fps. Press Ctrl+C to stop recording. OpenCV Error: Assertion failed (image->depth == 8) in writeFrame, file /build/buildd/opencv-2.4.8+dfsg1/modules/highgui/src/cap_ffmpeg.cpp, line 238 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.4.8+dfsg1/modules/highgui/src/cap_ffmpeg.cpp:238: error: (-215) image->depth == 8 in function writeFrame

Aborted (core dumped)

It doesnt work either with _encoding:=32FC1, 32SC1. If _encoding:=mono16 is used, it says "unable to convert 16UC1 to mono16"

Is it a problem with converting from ROS encoding to OpenCV encoding? Or is the video-writer only limited to color videos? This would be strange.

Thanks.

@shakith shakith changed the title How to make depth stream video How to make a depth stream video Nov 4, 2015
@kohrt
Copy link

kohrt commented Nov 4, 2015

From the error message I would say that it is only supports 8 Bit channel depth. So RGB or grayscale. I think limiting a video codec to color images is not really strange, it is kind of strange to use them for something else than that. But maybe a different codec might work.
http://wiki.ros.org/image_view#image_view.2BAC8-diamondback.video_recorder

@shakith
Copy link
Author

shakith commented Nov 9, 2015

Okay. Thanks

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

No branches or pull requests

2 participants