Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过套接字发送用 JavaCV 和网络摄像头获取的 IplImages,但是,由于它们不可序列化,我很迷茫。关于如何做的任何想法?
谢谢
将您的图像保存到临时文件并通过您的套接字传输该文件。
如果您不想创建临时文件,您可以从ByteBuffer像素数据中获取IplImage.getByteBuffer()并编写您自己的writeObject&readObject方法。
ByteBuffer
IplImage.getByteBuffer()
writeObject
readObject