0

I have a Raspberry Pi 3 with a PiCamera system that captures images automatically. It captures 500-2000 images per run. I need it to be saved in a server in my windows pc/laptop. Im using python to code. Does anyone know how I can do this?

To reiterate, can anyone show me an example or guide me on how to code the raspberry to save the newly captured images to the server.

What I have in mind is to have the capturing of images code WITH the code to save the images in the server of my windows pc/laptop ON the Raspberry Pi board itself (saved in a microSD).

Thank you and I apologize if this is confusing. It's my first time working with Raspberry

So i'll include more context to the situation.

  1. A run would last for 1 hour minimum and 2 hours maximum.
  2. Pixel dimension per image: 1344 x 1344 (w x h). Pixel size per image: 1.74MB
  3. The time for windows to read the images is critical. We're looking at within 2-3 seconds as I have an Automatic Visual Inspection (AVI) system analyzing these images real time.
  4. The Raspberry Pi and Windows may be connected by wifi or wired-Ethernet. Both is viable. But right now I am testing it using wifi. Though I am able to use wired-Ethernet as well.

To give additional information, the AVI system would produce an image with the size of 12.3KB per image after the raw images have been processed. Which would be saved in a separate folder. Meaning to say there are 2 folders of the images, where the 1st folders contains the original images and the 2nd folder containing the processed/analyzed images.

Im facing an error as such;

The error from Raspberry Pi

The ipconfig from Windows;

The NET SHARE in windows command;

Xeno
  • 13
  • 5
  • You've tried to mount the address of your default gateway (192.168.43.1] but you need to use your PC's IP4 address (192.168.43.56) in your Raspberry Pi's `mount` command. – Mark Setchell Aug 28 '20 at 16:34

1 Answers1

0

There are lots of possibilities... but your question is light on details.

  • How long is a "run" in terms of time?
  • How big is each image in pixel height and width and in bytes saved on disk?
  • Is the time from when the images is captured to when it is saved on disk on Windows critical - I mean does Windows need to see the image within a second or 20 seconds or 15 minutes of the image being taken?
  • How are the Raspberry Pi and Windows connected - bluetooth, wifi, wired Ethernet?

In the meantime, some options are:

  • Make a "Share" on Windows that is visible to the Raspberry Pi and mount it using Samba on the Raspberry Pi and write your images there directly and Windows will see the images on the shared disk. See here.

  • Create a FAT32 parition on a USB Memory Stick and plug it into the Raspberry Pi's USB port and write your images there, then plug it into your Windows machine at the end to transfer the images. Both Linux and Windows can read/write FAT32, so that is why I suggest that format.

  • Use netcat or a socket or ssh to send the files to Windows over the network after capture.

  • Use Putty from Windows to collect the files from the Raspberry Pi after capture.

  • Share a Redis instance between the Raspberry Pi and Windows. Let Raspberry Pi load images into Redis and push their names onto a Redis queue and let Windows pop the names off the queue and pick up the images.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Thank you so much for your insight! I'll be sure to try all of these. Out of all the suggestions, which would be the closest to having the images transfer to windows automatically without me physically transferring them in your experience? And thank you for pointing out the information thats missing. i have added additional info in the post. – Xeno Aug 28 '20 at 01:39
  • I'm facing a mount error. I've shown the error in the original post – Xeno Aug 28 '20 at 09:00
  • Please see my comment about the mount error under your question. – Mark Setchell Aug 28 '20 at 16:35
  • In light of the latest updates to your question, I think the easiest (requiring fewest extra libraries and dependencies) and lowest latency solution for you would be with sockets. Have a look here for a rough idea https://stackoverflow.com/a/61099429/2836621 and also here https://stackoverflow.com/a/63536518/2836621 The basic idea is to always send a 4-byte network order integer before every frame so the receiver knows how many bytes to read. – Mark Setchell Aug 28 '20 at 16:42