python 2.7 - Changing the video frame quality(compress) in to JPEG and rendering -


i'm totally new opencv library , i'm implementing simple client server application using opencv , python. here client captures video webcam , sends server. need compress video frame in order reduce bandwidth usage. find can save frame in jpeg loosy compression technique. using provided method have write frame , jpeg image. need without writing image rendering low quality(compressed frame). i'm doing writing jpeg , reading again. 2 io cycles per single frame not efficient @ all. can suggest better solution?

cv2.imwrite('imagename.jpg', frame, [int(cv2.imwrite_jpeg_quality), 90]) newframe=cv2.imread('imagename.jpg') cv2.imshow('preview',newframe); 

(frame= current image frame captured, newframe=loading saved image in programme)


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -