element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Pi IoT
  • Challenges & Projects
  • Design Challenges
  • Pi IoT
  • More
  • Cancel
Pi IoT
Blog Design Challenge Project Summary #23: Plant Health Camera **Final Update**
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: CharlesGantt
  • Date Created: 2 Aug 2016 11:27 PM Date Created
  • Views 1636 views
  • Likes 5 likes
  • Comments 5 comments
  • design challenge
  • smarter_spaces
  • gerrit polder
  • project summary
  • pi iot design challenge
  • plant health camera
Related
Recommended

Design Challenge Project Summary #23: Plant Health Camera **Final Update**

CharlesGantt
CharlesGantt
2 Aug 2016

Welcome to installment number twenty three of the Design Challenge Project Summary series here at Element14. For those of you who are new to my content, in this series I will pick a single Design Challenge project from the current challenge, and write a short summary of the project to date. Over the course of each challenge, I try to revisit each project that I cover at least once, and I am sure that some project summaries will get more than one update if they themselves are updated frequently. Unfortunately, projects that stall out, or get abandoned, will not receive any updates. Some project creators like to keep their own project summary going, and this series is not meant to overshadow those post, but to highlight each project from an outsider's perspective.

 

image

 

The subject of this installment is project Plant Health Camera by Gerrit Polder (gpolder). Kicking the project off, Gerrit discussed the merits of using near-infrared bands captured from an infrared sensitive camera to measure several different parameters of soil and plant health in agricultural settings.  Drawing off past experiences with the Raspberry Pi Noir camera, he plans to use the new revision of the Pi Noir to develop a system that will enable such analysis in an easy and affordable package. The system will make use of OpenCV, something we have seen used many times in previous design challenges.

 

image

 

There are issues with using just one camera system to gather data, though, and is the basis behind Gerrit’s decision to include a normal Pi Camera into the project as well. The problem is caused by the sun lighting portions of a patch of plants differently due to shadows, sun angle, etc. By adding this second camera, he can capture a normal image and then extract the red channel values. “The NDVI algorithm subtracts the red reflectance values from the near-infrared and divides it by the sum of near-infrared and red bands, he said.” “This formulation allows us to cope with the fact that two identical patches of vegetation could have different values if one were, for example in bright sunshine, and another under a cloudy sky. The bright pixels would all have larger values, and therefore a larger absolute difference between the bands.This is avoided by dividing by the sum of the reflectances.Theoretically, NDVI values are represented as a ratio ranging in value from -1 to 1 but in practice extreme negative values represent water, values around zero represent bare soil and values over 6 represent dense green vegetation.”

 

image

 

In the project’s second update, Gerrit showed off the official challenger kit that had arrived earlier that day. As you can see from the image above, he received the following items.

 

  • Raspberry Pi 3Raspberry Pi 3
  • Raspberry Pi model B+Raspberry Pi model B+
  • Raspberry Pi Camera V2Raspberry Pi Camera V2
  • Raspberry Pi Noir Camera V2Raspberry Pi Noir Camera V2
  • Raspberry Pi 7" Touchscreen DisplayRaspberry Pi 7" Touchscreen Display
  • 16GB Noobs SD Card16GB Noobs SD Card
  • EnOcean PiEnOcean Pi
  • EnOcean Pi Sensor KitEnOcean Pi Sensor Kit
  • EnOcean Pi Switch Design KitEnOcean Pi Switch Design Kit
  • PiFace RackPiFace Rack

 

image

 

 

Gerrit posted update number three about a month later, and the project build officially began with installing raspbian onto the Raspberry Pi 3 and getting the the Raspberry Pi 7” Touchscreen up and running. I really would have liked to have seen Gerrit post the steps that it took to get the touchscreen up and running, but to his credit, he did post a link to a wonderful tutorial by rhavourd. The update was closed out with a look into the future of the project, and a decision being made on which case he would chose to buy to house the project. The Smarti Pi Touch case was chosen due to its compatibility with the 7” touchscreen, and lego-based camera mounting solutions.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Update number four focused on the Smarti Pi Touch Case and its camera housings. To accommodate the second Raspberry Pi needed for this project, Gerrit purchased the Smarti Pi case, that is compatible with the Pi Touch Case, and also includes lego mounting options. To get this case to mount up to the Pi Touch Case, a mount had to be created, and to do this, Gerrit modified a small piece of acrylic to feature a GoPro style mount that would bolt to the Pi Touch Case’s VESA mounting points. I like this idea a lot, and have been toying with a similar mounting option for my Smarti Pi Touch Case to accommodate two additional Raspberry Pi’s, and impressed with how well it turned out in this instance!

 

image

 

In his fifth update, Gerrit dove head first into OpenCV with the Raspberry Pi 3, and wrote a wonderful tutorial on how to get all of the programs prerequisites installed before installing OpenCV itself. I gave Gerrit a bit of grief earlier in this post for not including a tutorial on how to install the Raspberry Pi 7” Touchscreen, but he completely made up for that with this post. All of the commands you need as well as a tutorial on how to test OpenCV once its up and running. If you are interested in using OpenCV, this would be the post to start with.

 

Update: 9-24-2016

 

image

 

With the Raspberry Pi 3, and first camera up and running, it was time to focus on getting the second camera and slave Raspberry Pi sorted out, and that is what update number six was all about. Continuing on with the SmartiPi case system, Gerrit piggybacked the Raspberry Pi B+ onto the larger SmartiePi Touch case, and connected the second camera using the unique lego-like mounting system that the second case features. “The slave Pi is connected by using the SSHFS file sharing protocol which allows you to mount a Raspberry Pi's filesystem over an SSH session. This works very convenient,” he said. “In order to set this up I first had to install SSHFS on the client system, the Pi 3 in this case.” The post concluded with the bash commands needed to get everything working.

 

image

 

In update number seven, Gerrit quickly showed us how he managed to sync up both of the camera systems so that each camera snaps a photo at exactly the same time. “I wrote some python code which will run on the slave system. It will wait for a trigger pulse on GPIO 23 and then take an image and save it on the share as described in the previous post. The master system will output the trigger on GPIO 18,” he said. The post was brief due to Gerrit having very little time this week to dedicate to the project, but he did manage to include the bash commands, and the edits needed to the rc.local file that are required to sync everything up.

 

image

 

Update number eight made up for the previous post’s length in a big way. Since the camera’s are both on the same mount, they are somewhat aligned correctly from the start, but for data analysis purposes, they need to be more precisely aligned. This is much easier to do in the software, and trying to modify the lego-style mount that is featured on their case. Using OpenCV, Gerrit was able to successfully test a software alignment method using different algorithms. “Since the cameras are placed next to each other a translation over 1 dimension ( x ) should in principle be sufficient, but since plants are 3D object I expect that the Homography is needed for situations where there is much depth in the images. Luckily using this OpenCV function we can easily test the different options,” he said. With the testing figured out, he asked the community for their input on which algorithm they thought would give the best results, and he linked to a poll at the bottom of the post. 

 

image

 

Update number nine tackled a major obstacle for the project: how to extract the BNDVI and GNDVI images from the cameras. To accomplish this, Gerrit had to write a small program in Pyton that would take the color image data from each camera’s photo, and then convert it to either the BNDVI or GNDVI final image.  “The range of the original NDVI images is -1 to +1. In order to display this properly I converted these values to the range 0-255 and applied a colormap such that NDVI value 0 is green, -1 is blue and +1 is red,” he said. The image above is the GNDVI example that he posted. In this image the green channel has been extracted by the software, leaving an image that can be processed for the data that is required for comparison to the BNDVI to test a plant’s current condition.

 

image

 

Update number ten was quite short, but interesting nonetheless. Up until this post, both the master and slave Raspberry Pi boards were connected to Gerrit’s home network. This provided an easy backbone for both Pi to talk to each other over. Unfortunately this will not work when they are removed from the home and placed in the garden to monitor his plants. To remedy this situation, Gerrit connected both devices to each other via a single Ethernet cable. Getting this setup to work was as simple as adding four lines of code to the to the /etc/dhcpcd.conf file. This allowed the Pi B+ to piggyback onto the network connection between the Pi 3’s WiFi and the home network. It’s actually an ingenious solution to a pesky problem, and I am sure I will steal this idea for future projects.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Gerrit wrapped up the project in update number eleven with a final push to get everything working together. He briefly detailed the NDVICam program he wrote in python that basically ties everything together, and produces an image that is able to inform the user on a plants health based on the light readings it is emitting. “After quite a bit of hard work during the last days, the project reached its end. Of course many improvements can be made, and other features can be added, but that is for later, after the challenge,” he said. “I had the plan to add humidity, pressure and temperature measurements with the SenseHat, but unfortunately SenseHatSenseHat, Wi-Pi and PiFace digitalPiFace digital were missing from my kit.” He wrapped up the post with some images that were taken of a hydrangea that explain exactly what this system does. Head over to the final post to check it out.

 

image

 

That is going to wrap up my project summary coverage of project Plant Health Camera. Check out the full project by visiting its blog page. Tune in next week for another Design Challenge Project Summary here at Element14. Until then, Hack The World, and Make Awesome!  

  • Sign in to reply

Top Comments

  • balearicdynamics
    balearicdynamics over 9 years ago +1
    Hello Charles, [...] this series is not meant to overshadow those post, but to highlight each project from an outsider's perspective. This is what our post-series needs. I am personally following this…
  • CharlesGantt
    CharlesGantt over 9 years ago in reply to balearicdynamics +1
    Thanks again for the kind words Enrico ( balearicdynamics ) I truly enjoy reading all of the challenges every week, and am very grateful for Elelment14 giving me the opportunity to explore each one so…
  • DAB
    DAB over 9 years ago +1
    Nice summary. I have greatly enjoyed this challenge and I am also very interested in see how well the RPi cameras work for this application and how well OpenCV supports the objectives. DAB
  • gpolder
    gpolder over 9 years ago

    Hi CharlesGantt,

    thanks for the nice summary,

     

    Gerrit.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 9 years ago

    Nice summary.

     

    I have greatly enjoyed this challenge and I am also very interested in see how well the RPi cameras work for this application and how well OpenCV supports the objectives.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to CharlesGantt

    I really agree with you. As the challenges are a sort of projects backstage stories not only are full of knowledge but are also very well structured and organised by arguments most of the times. It is not the first time that I think if it is worthy to propose something like a "knowledge abstract" from the challenges to republish it out of the box in the various sections of E14. Maybe something to discuss in depth involving also TMs and spannerspencer

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • CharlesGantt
    CharlesGantt over 9 years ago in reply to balearicdynamics

    Thanks again for the kind words Enrico (balearicdynamics) I truly enjoy reading all of the challenges every week, and am very grateful for Elelment14 giving me the opportunity to explore each one so thoroughly. It is hard to keep up with the updates sometimes, but I have found myself re-reading several projects from start to finish many times because they are just to full of knowledge, and useful information. I hope to work even closer with the challenges in the future.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago

    Hello Charles,

     

    [...] this series is not meant to overshadow those post, but to highlight each project from an outsider's perspective.

    This is what our post-series needs.

    I am personally following this project as I like the idea and the approach using the camera; it is something I am interested to and I should say that you are doing a very nice work. For those projects I have no time to follow completely I wait reading your summaries to have a view of the entire scenario.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube