Giter Site home page Giter Site logo

nadulag / smathhacks2024 Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 16.94 MB

⛰️ An agricultural surveying tool accessible to the masses.

Home Page: https://smathhacks2024.vercel.app

HTML 3.05% JavaScript 1.60% Svelte 24.60% CSS 0.23% Kotlin 0.15% Swift 2.22% Objective-C 0.04% Dart 14.84% CMake 21.65% C++ 26.75% C 1.64% Ruby 3.23%

smathhacks2024's Introduction

Using Household Drones to Determine Agricultural Health

Introduction

Agriculture is incredibly important to society, but growing crops can often prove incredibly difficult, particularly for small farms that don’t have the resources to ensure they are growing their crops on well-suited land. While there are some ways to solve this problem for large farms that can afford it, there is no good universal solution to evaluating soil and ensuring your farm is land that can support crops.

Accessibility

How do we ensure everyone has access to our solution?

Providing mass accessibility to professional tools can be incredibly difficult because the technology involved is often very advanced and expensive. It also usually requires companies to go out to take soil samples of various locations and verify if the contents are suitable for crop growth. This often isn’t accessible for many farmers. We aim to solve this problem by using DJI Drones. By using off-the-shelf drones, we can extract this extremely important information, and allow farmers to monitor the quality of their farmland.

The DJI Mini SE is a $300 Drone that supports our software solution, and it doesn’t have to be registered with the FAA due to it being 249 grams, making it an ideal target for accessibility. These drones can be controlled by the DJI SDK, which allows the user to input coordinates that the drone can follow. We can combine this in conjunction with an easy-to-use interface to select a box around an area you want to be surveyed, and we can automatically generate an optimal path to capture the terrain.

Data Processing

Importing the Drone Data

After capturing data from the drone, we’ll need to have a way to parse that data and produce an actual analysis. We do this in a multi-stage process- first, we need to identify the land mass. This can be done using Gaussian Blur and OpenCV for edge detection. This allows us to extract the important parts of the terrain where farming is a consideration.

Elevation / Runoff

Checking topography is extremely important in determining whether the land is suitable for planting crops in the first place. If there is a major concern for runoff into a particular region of land, that should be avoided to ensure crops don’t get washed away, oversaturated, covered in above sediment, or receive too much nutrients. We first take the logs from the drone, find the elevation of every chunk of data in the dataset, and parse this data to find possible runoff areas, where there are major concerns of soil oversaturated with fertilizer and nutrients from above.

Soil Health

Before planting crops in any region, we want to ensure the soil has the appropriate contents for whatever crop you are trying to grow. Because the needs of each individual crop vary, we need to use optical recognition paired with Artificial Intelligence and Machine Learning to estimate the contents of the soil, as well as the overall health. According to ScienceDirect, “Soil color is influenced by its mineral composition as well as water and organic contents. For example, soils high in calcium tend to be white, those high in iron reddish, and those high in humus dark brown to black. Soil needs only about 5% organic material to appear black when wet.” We can use this principle to determine the contents of the soil without having to physically extract and examine samples from various parts of the region.

alt_text

Figure 1: “Soil color and spectroradiometry”, ScienceDirect.com

According to Figure 1, we can use The Munsell System of Color Notation to quantitatively measure soil color. We can use the optical properties of soil to categorize it in such a way as to calculate its contents.

alt_text

Figure 2. “Spectral reflectance curves for Newtonia silt loam at various moisture contents,” ScienceDirect.com

We can use the principles behind Figure 2 to determine various properties of soil, which can then be used to analyze various properties of soil.

Crop Health

We can use a similar process to monitor the health of crops after they are grown. By using OpenCV / Machine Learning, we can keep track of the health of individual crops automatically. This can help farmers identify that there is a problem with their crops, and in some cases even identify the exact cause of it.

Visualization

Landscape Filtering

A major difficulty in capturing large landscapes and parsing them is filtering out unimportant edges. There are many cases where a body of water may be present on land, which is something we want to avoid parsing to avoid poisoning the actual conclusion.

alt_text

Figure 3. Filtering out a large body of water.

We can use a mix of numpy, OpenCV, and matplotlib to parse this data out. For this, I used “Canny”, a portion of OpenCV that allows you to take optical data as input and filters out the terrain. This is an imperfect example, but it contains enough accurate data that we can use it after minimal post-processing. This was done with a simple function in Python:

import cv2
import numpy as np
from matplotlib import pyplot as plt

image = cv2.imread('coastline.png')
edges = cv2.Canny(image,100,200)
plt.subplot(121),plt.imshow(image,cmap = 'gray')
plt.title('Original Landscape')
plt.xticks([])
plt.yticks([])

plt.subplot(122),plt.imshow(edges,cmap = 'gray')
plt.title('Filtered Landscape')
plt.xticks([])
plt.yticks([])

plt.show()

Sources

https://www.sciencedirect.com/topics/agricultural-and-biological-sciences/soil-color

https://www.opencvhelp.org/tutorials/applications/agriculture-and-farming/

smathhacks2024's People

Contributors

nadulag avatar elyzk avatar jacob-wigent avatar ericapostal avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.