Question: How can I can make a raspberry pi camera just with the filters process the crops and immediately produce the results to a computer or to other device, without having to use the website?

csteran is asking a question about ndvi
Follow this topic

by csteran | March 13, 2018 15:18 | #15935


I'm working with a raspberry pi. I am planning to use a raspberry pi camera that is already connected with the raspberry pi to use it to detect the health of the crops. Is there a phyton code, or how can I make that the raspberry pi camera can detect the crops and their wealth without having to use the website. I mean is there any way in which I can make the camera just with the filters process the crops and immediately produce the results to a computer or to other device?



15 Comments

Great question, @csteran -- just for a few clarifications, do you need to do it a) without internet access, or do you want to b) have it produce NDVI whenever an image is taken, with no browser-based tweaking?

For reference, how are you currently triggering it to take a picture? Would we be able to run a script after the image is taken? If so, i think we have a way forward on this!

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


This is one way to set up a Raspberry Pi to take photos remotely from a computer, using WiFi. It may not be exactly what you're looking for but there are some other options too!

https://publiclab.org/notes/partsandcrafts/12-03-2017/setting-up-the-raspberry-pi-camera-for-wireless-streaming

It may be possible to use computer vision software (opencv) to directly manipulate the images on the PI computer. Check out https://publiclab.org/wiki/python-webcam-codes


Reply to this comment...


I'm thinking of if we could add a command from Image Sequencer (https://github.com/publiclab/image-sequencer) to the "take photo" command -- do you write code? If not we can still probably figure this out, just curious!

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


I need to do it without internet access, and we were thinking to use a photo command just like you said. Yes, I started learning phyton in order to do the codes.

Reply to this comment...


The default app raspicam can be used to take a picture from the commandline, and then you could use Image Sequencer to do the NDVI --

https://github.com/publiclab/image-sequencer#cli-usage

something like:

$ image-sequencer -i image.jpg -s ndvi-red

So all together:

$ raspistill -o image.jpg && image-sequencer -i image.jpg -s ndvi-red

Or to take images regularly, you can use a $DATE variable to name the file: https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspistill.md

@tech4gt - what do you think of this use for Image Sequencer?

Is this a question? Click here to post it to the Questions page.

@warren this sound amazing, we can install the image-sequencer on raspi easily via npm and it would work nicely for this use case


@warren this gives me another idea, maybe we can add a replaceImage functionality in node as well (maybe as an extension to basic mode) which will replace the current image with the processed image It can be useful in this case where we don’t need the original image anymore


Indeed! I think here it could be good to keep the original data in this case, maybe @csteran has a preference? But we should perhaps add steps and example usage for raspberry pi users to make it as easy as possible.

Is this a question? Click here to post it to the Questions page.


@warren should i add this in documentation maybe add a section for raspi users complete with installation and setting up instructions ?

Is this a question? Click here to post it to the Questions page.


How will the processed image replace the current image?. Like how will this work better than the current image?. , and yes I think I will need a little bit of help with the raspberry pi code and installation instructions too.

Is this a question? Click here to post it to the Questions page.


@csteran actually image-sequencer has the capability to run a sequence of processing steps on an image and provide output of each step separately or just the final image based on user's choice, also I will make a research note for running Image-Sequencer on raspi and link it both here and in the documentation, Thanks :)


Thank you so much!


Reply to this comment...


Just noting that our Infragram Pi Cam kits now ship with onboard software and WiFi:

https://store.publiclab.org/collections/diy-infrared-photography/


Reply to this comment...


Log in to comment