You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mesutpiskin (moved this issue from the wrong place and corrected it - major change to my thinking)
Thanks for this project. Well done! It's just what I needed for a simple server of a camera frame with an overlay of an OpenCV drawing.
I wanted to control the JPG quality so I gleaned a technique from StackOverflow answers concerning encoding Java Swing types. I had posted that yesterday in the wrong issue but I browsed through your code today and I see you encoded the Mat to JPG twice - once using OpenCV and once using Swing. That duplication is unnecessary and the OpenCV is much easier to add compression so here's my suggestion of removing the Swing JPG encoding and adding Quality to OpenCV JPG encoding. The method name Mat2bufferedImage isn't as precise anymore and should be changed.
Change this in run() pushImage(imag, 10); // example of low quality, high compression
@mesutpiskin (moved this issue from the wrong place and corrected it - major change to my thinking)
Thanks for this project. Well done! It's just what I needed for a simple server of a camera frame with an overlay of an OpenCV drawing.
I wanted to control the JPG quality so I gleaned a technique from StackOverflow answers concerning encoding Java Swing types. I had posted that yesterday in the wrong issue but I browsed through your code today and I see you encoded the Mat to JPG twice - once using OpenCV and once using Swing. That duplication is unnecessary and the OpenCV is much easier to add compression so here's my suggestion of removing the Swing JPG encoding and adding Quality to OpenCV JPG encoding. The method name
Mat2bufferedImage
isn't as precise anymore and should be changed.Change this in run()
pushImage(imag, 10); // example of low quality, high compression
The text was updated successfully, but these errors were encountered: