开发者

Sending a IplImage through a socket with JavaCV

开发者 https://www.devze.com 2023-03-08 21:56 出处:网络
I\'d like to send IplImages acquired with JavaCV and a webcam through a socket, but, since they are not serializable, i\'m quite lost. Any id开发者_运维百科ea on how to do it?

I'd like to send IplImages acquired with JavaCV and a webcam through a socket, but, since they are not serializable, i'm quite lost. Any id开发者_运维百科ea on how to do it?

Thanks


Save your image to temporary file and transfer that file through your socket.

If you don't want to create temporary files, you can get ByteBuffer with pixel data from IplImage.getByteBuffer() and write your own writeObject & readObject methods.

0

精彩评论

暂无评论...
验证码 换一张
取 消