caiostringari / picoastal

Open source coastal monitoring
GNU General Public License v3.0
16 stars 12 forks source link

Unable to create average image using cycle_rpi.sh #2

Open CI-Warrior opened 2 years ago

CI-Warrior commented 2 years ago

Hey Caio its Chris from UNSW here. Fantastic work pulling this code together :). I've successfully set up a Raspberry Pi4 8GB with a Pi HQ camera capturing frames, videos and emailing to myself using cycle_rpi.sh via the cron. While I can manually create an average product using the sample code, I can't seem to be able to auto generate these products using cycle_rpi.sh. I've tried the below config_rpi.json settings but cant seem to find where in capture.py where it makes the average image. Thanks for your help!! Chris

"data": {
    #"output": "/home/pi/captures/",
    "output": "/media/pi/62 GB Volume/pi-coastal-captures/",
    "hours": [6 ,7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 , 19, 20],
    "format": "jpeg"
},
"capture": {
    "duration": 600,
    "framerate": 5,
    "resolution": [1920, 1080]
},
"stream": {
    "framerate": 30,
    "resolution": [640, 480]
},
"exposure": {
    "mode": "beach",
    "set_iso": false,
    "iso": 300
},
"h264": {
    "quality": 25,
    "sei": true,
    "sps_timing": true

},
"post_processing": {
    "extract_frames": true,
    "only_last_frame": false,
    "notify": true,
    "average": true,
    "deviation": false
}

}

caiostringari commented 2 years ago

Hi Chris!

I never managed to include the logic in the .py scripts, it seems - sorry! I started a new job and had to put this project aside for now.

The easiest way to do it would be to include calls to average.py and variance.py in your .sh scripts.

Good to hear that you managed to reproduce at least some of this work! =)

Cheers,

Caio

CI-Warrior commented 2 years ago

Hey Caio, Thanks for your reply and no dramas at all! I just wanted to check if I was missing something before implementing new code. I'll have a crack then push the code back. Last few questions, what 4G modem dongle and solar-power bank is in your pic? I've tried a few modems and can't seem to find one that works easily on Linux. Thanks!! Chris

caiostringari commented 2 years ago

Hey Chris,

For the solar panels I used two Ankler ones connect to Ankler power banks during my PhD (this panel, I think https://www.amazon.ca/Anker-Solar-Charger-Iphone-Galaxy/dp/B012YUJJM8/ref=asc_df_B012YUJJM8/?tag=googleshopc0c-20&linkCode=df0&hvadid=292939588547&hvpos=&hvnetw=g&hvrand=2694005539785154259&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9001551&hvtargid=pla-521995684004&psc=1). For the figure 8 project we had custom made solar panels + batteries.

We used Telstra 3G modems for the figure 8 pools project (https://www.telstra.com.au/internet/mobile-broadband/netgear/nighthawk-m2). It was bit spotty but worked fine most of the times. For my daily trips, I would just connect to a hot spot from my phone.

Hope this helps.

Cheers,

Caio