ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rosbridge PNG decompression in Obj-C/C++

asked 2014-12-18 15:31:05 -0500

tropic gravatar image

I use rosbridge/websocket for an iOS project. I want to use the PNG compression option for image transfers but cannot figure out how to implement this "hack" of decompressing the PNG data in Objective C (C++ should also be ok) .

Is there any alternative compression method in rosbridge e.g. gzip? If not, how would you go about implementing the PNG decompression in Objective C (or perhaps C++)?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-12-19 01:08:27 -0500

Wolf gravatar image

If you have opencv (it's ported to iOS) you can use cv::imdecode ( http://docs.opencv.org/modules/highgu... ). It works same like cv::imread for reading+decoding png/jpg etc. data from files with the difference takes not a file but a binary buffer e. g. std::vector<uchar> as input for decoding...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-12-18 15:31:05 -0500

Seen: 559 times

Last updated: Dec 19 '14