jeffbass / imagezmq

A set of Python classes that transport OpenCV images from one computer to another using PyZMQ messaging.
MIT License
1.01k stars 160 forks source link

Cloud Google #12

Closed ffabinhoo closed 5 years ago

ffabinhoo commented 5 years ago

Hi Jeff, I'm loving this library and experiment something using opencv. I'm able to run it locally, however, when I tried to connect an server on Google cloud receiving images from my local camera, the server is not able to receive those stream. I believe that I set up everything properly (firewall rules, etc) but the communication between the peers doesn't work.

Any ideas? Regards, Fabio

jeffbass commented 5 years ago

Hi Fabio, First, let me say I have not actually tried to use imagezmq on Google cloud, so I have no direct experience to offer you. Some things you might want to check:

  1. Are you trying to run one of the imagezmq test programs first? If so, which program pair are you running? Is it the same test program pair that you ran successfully locally?
  2. I presume you running the hub / receive program on the Google Cloud. Is it giving any error messages? Or just silently doing nothing?
  3. Did you try running the first test program (the one that just sends and displays 2 different colored squares) on the Google Cloud instance? Do you have a way to run cv2.imshow() on your cloud instance?
  4. The imagezmq port is 5555 by default. Of course, it needs to be the same on both sender and receiver. You can specify a different port if needed. The way you specify TCP address and port is shown in the imagezmq API docs.

I would suggest trying Google searches for resources on StackExchange, Stackoverflow and other places for information on using ZMQ on Google Cloud. Someone has probably used ZMQ on Google Cloud before...or asked questions if they have not been successful. imagezmq is just a set of simple classes wrapping the ZMQ REQest/REPly protocol. How you specify ZMQ TCP address:port is not changed by imagezmq, so if anyone has gotten ZMQ to communicate with the Google cloud, that should be helpful info.

ffabinhoo commented 5 years ago

Hi Jeff! Thank for your quick replying! I will run the test program first (As you mentioned - 3). If everything works fine, I will check the other tips.

Thanks a lot! Regards, Fabio

ashutoshIITK commented 4 years ago

Hi @ffabinhoo could you solve the problem? I am also in a similar situation. I want to send images to my AWS EC2 server. What things do I need to modify? Any leads would be appreciated.

ffabinhoo commented 4 years ago

Yes, I could. However, I ended up deleting the code. The only think that I did was to open the opencv output using

On Mon, Aug 5, 2019 at 6:21 PM Ashutosh Kumar notifications@github.com wrote:

Hi @ffabinhoo https://github.com/ffabinhoo could you solve the problem? I am also in a similar situation. I want to send images to my AWS EC2 server. What things do I need to modify? Any leads would be appreciated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffbass/imagezmq/issues/12?email_source=notifications&email_token=AAETZHT3L4L6WKFHK5VKHQDQC7PIBA5CNFSM4IFCHTD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3RCAYY#issuecomment-518135907, or mute the thread https://github.com/notifications/unsubscribe-auth/AAETZHVTOFPMN4QTMLPVJI3QC7PIBANCNFSM4IFCHTDQ .

ashutoshIITK commented 4 years ago

@ffabinhoo Thank you for your response. So you only deleted the client-side code and instead streamed the frames from RPi to Google Cloud? Did you still use the TCP server for sending streams?