I am working on a project and I need to capture an image using python with opencv, and transmit the image over a socket to java in the buffered image format. I am experienced with sockets, so I am currently stuck on finding a common image format. Does anyone know a format that I can export the opencv image to in the form of a byte array to transmit over the socket, to read in java as a buffered image? I have found a couple threads on exporting to JPG, although I also have a time constraint, that an uncompressed image would be required.
Asked
Active
Viewed 67 times
0
-
have a look at https://stackoverflow.com/a/32357875/5008845 encoding and decoding is quite simple and can be implemented in both python and java. With this format you can use any kind of matrix (not only the ones that represent images). And it's very fast! – Miki Jun 21 '21 at 10:27