Skip to content

johnstaveley/BirdCam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BirdCam Project

  1. Images taken from a Raspberry Pi and are uploaded to an Azure IotHub. The code for this is in the BirdCamRaspberryPi project.
  2. The IotHub then copies the images to Azure blob storage.
  3. The incoming images are then processed by the Azure Function Image Analyser via a blob trigger. The code is in the BirdCamFunction project. The image is moved to another container called processedimages and a sub-folder depending on whether it contains a bird, cat or other
  4. The function calls Azure Cognitive Services with the image to identify what is in the picture.

The code is very much a proof of concept and I make no apologies for that!

Dev Setup

BirdCamRaspberryPi needs an appsettings.json with a single entry in json format: { "IoTHubConnectionString": "" } BirdCamFunction needs two files: local.settings.json: { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "FUNCTIONS_WORKER_RUNTIME": "dotnet" } } secret.settings.json: { "DeviceId": "", "IoTHubConnectionString": "", "IoTStorageConnectionString": "", "ComputerVisionEndpoint": "", "ComputerVisionSubscriptionKey": "" } I then use an SFTP client to deploy BirdCamRaspberryPi to the Pi. Instructions are here: https://docs.microsoft.com/en-us/dotnet/iot/deployment Raspberry Pi Software:

Azure Setup

This may be incomplete as I set this up manually. Create the following in Azure, put them all in the same data region if possible. if you set this up using the free tiers then it should not cost you anything to run at low volumes.

  • Resource Group
  • Blob storage. StorageV2 with locally redundant storage is ok. Create containers images and processedimages. Grab connection string and put in secret.settings.json above
  • Application Insights.
  • Iot Hub and go to the following blades:
    • Shared access policy. For device and put in IoTHubConnectionString for BirdCamRaspberryPi and for service put in IoTHubConnectionString for BirdCamFunction
    • File Upload and set storage account and container to images
    • IoT Devices. Add your Raspberry Pi
    • Networking. Don't put in IP restrictions if you want your azure function to be able to contact the IoT Hub
  • Function App. Grab publish profile for deploying BirdCamFunction to
  • Cognitive Services. Free version. Grab keys and endpoint and put in secret.settings.json above

About

Automated Bird watching using a Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages