0

How to imshow processed frame in opencv in another client, I mean is my own local system.

this is script1:

import cv2
cap = cv2.VideoCapture('rtsp:...'
while True:
    ret,frame = cap.read()
    frame = cv2.resize(fram,fx = 0.5,fy = 0.5)
    frame = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
    cv2.imshow('win',frame)
    if cv2.waitKey(1) & 0xFF:
        break
cv2.stop()

Actually, instead of imshow processed frame in this script, I could imshow processed frame in another client, for example I have script2 that input frame is script1 frame. How can I do that?

trotta
  • 1,232
  • 1
  • 16
  • 23
Xeus
  • 92
  • 1
  • 6
  • Possible duplicate of [Sending live video frame over network in python opencv](https://stackoverflow.com/questions/30988033/sending-live-video-frame-over-network-in-python-opencv) – Olvin Roght Aug 03 '19 at 10:06
  • thats not exacly my goal i dont want to use network its local proccess i want to send frames from a python file runnung to another python app with good speed – Xeus Aug 03 '19 at 10:54
  • Start local server and send as much as you want, it won't use network. – Olvin Roght Aug 03 '19 at 12:02
  • Either use a socket to send image from client1 to client2. Or stuff images from camera in Redis (with a TTL/expiry time so memory doesn't run out) and let any number of clients grab them from Redis. Consider encoding to JPEG first to save memory and network bandwidth. – Mark Setchell Aug 03 '19 at 14:02

0 Answers0