Code Monkey home page Code Monkey logo

visionsoilanalyzer's Introduction

Soil

Project for my Bachelor Minor -> Embedded Vision Design and my graduation project -> Mechanical ENgineering @ University of Applied Sciences HAN Arnhem en Nijmegen.

The Doxygen documentation can be found here: http://peer23peer.github.io/VisionSoilAnalyzer/Webpage/index.html Further documentation indepth background information can be found at the wikie Youtube movie of the first testrun of the SoilCape can be found here: https://www.youtube.com/watch?v=Ew5GgzQKrGk

The Soil Analyzer is a portable lab that can analyse soil samples and tells the user about it's optical properties. It looks at the texture and describe it as a Particle Size Distribution. This information is presented as a Cumulative Distribution Function (CDF). It also describes the structure of the soil sample and gives information on the sphericity and roundness / angularity. It does so by analysing the contour of particles, describing them as Fourier Descriptors and using a Neural Network to describe it's properties. Finally it gives the color properties in a histogram in the CIE Lab colorspace, which show correlations with the fertility of the soil. and a histogram of the Redness Index, which gives has a correlation on the iron content.

The analyse is performed on a Beaglebone Black rev C. with the following image Linux arm 3.8.13-bone68 #1 SMP Sat Nov 22 06:51:58 UTC 2014 armv7l armv7l armv7l GNU/Linux

The soil is analyzed using it optical properties. This is done with a 5MP USB webcam with a maximum magnification of 300x. It has a custom cape with which the user can control the device.

Although it uses openCV most Vision algorithms are custom written (part of my Minor demand). openCV is used for camera aquisition and picture storage mostly. This project make use of custom vision, object detection and classification algorithmes.

test

visionsoilanalyzer's People

Contributors

jellespijker avatar jochemverboom avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lulzzz

visionsoilanalyzer's Issues

LabelBlobs above 255 wrong results

FAIL! : Vision_Test::TestCase_LabelBlobs() Compared values are not the same
Actual (totalNoOfBlobs) : 3940
Expected (uint16_t(NO_OF_BLOBS)): 379

Serialization of the Soil Sample throws a bug

VSA_UT: /usr/include/boost/archive/basic_binary_iprimitive.hpp:98: void boost::archive::basic_binary_iprimitive<Archive, Elem, Tr>::load(bool&) [with Archive = boost::archive::binary_iarchive; Elem = char; Tr = std::char_traits]: Assertion `0 == i || 1 == i' failed.

LabelBlobs still not working

screenshot from 2015-07-17 13 12 31

Presumably something goes wrong with the depth search

  // Down the rabbit hole
  for (uint32_t i = 0; i < connectedLabels.size(); i++) {
      for (uint32_t j = 0; j < connectedLabels[i].size(); j++) {
          uint16_t CurrentVal = connectedLabels[i][j];
          uint16_t PrevVal = i;
          while (CurrentVal != PrevVal) {
              PrevVal = CurrentVal;
              CurrentVal = connectedLabels[PrevVal][0];
            }
          connectedLabels[i][j] = CurrentVal;
        }
    }

make the vector<Particles> in Sample a pointer vector

http://www.frogatto.com/?p=26

Using a vector of shared_ptr removes the possibility of leaking memory because you forgot to walk the vector and call delete on each element. Let's walk through a slightly modified version of the example line-by-line.

typedef boost::shared_ptr gate_ptr;
Create an alias for the shared pointer type. This avoids the ugliness in the C++ language that results from typing std::vectorboost::shared_ptr and forgetting the space between the closing greater-than signs.

std::vector<gate_ptr> vec;

Creates an empty vector of boost::shared_ptr objects.

gate_ptr ptr(new ANDgate);

Allocate a new ANDgate instance and store it into a shared_ptr. The reason for doing this separately is to prevent a problem that can occur if an operation throws. This isn't possible in this example. The Boost shared_ptr "Best Practices" explain why it is a best practice to allocate into a free-standing object instead of a temporary.

vec.push_back(ptr);

This creates a new shared pointer in the vector and copies ptr into it. The reference counting in the guts of shared_ptr ensures that the allocated object inside of ptr is safely transferred into the vector.

What is not explained is that the destructor for shared_ptr ensures that the allocated memory is deleted. This is where the memory leak is avoided. The destructor for std::vector ensures that the destructor for T is called for every element stored in the vector. However, the destructor for a pointer (e.g., gate*) does not delete the memory that you had allocated. That is what you are trying to avoid by using shared_ptr or ptr_vector.

translucent Particle seperation from background

Neural network where the input is the chromatic a and b of the current pixel and neighbors (maybe described as statistics) the network is learned by letting the user mark the particles... And letting that be the outcome.

Rework the GUI and the Soil class

The current Sample class saves all the images, including the original image and all the processing steps.
This doesn't really when the sample consist of one picture taken but it starts to count when the sample will consist of multiple shot with front light and projected light.

The user isn't interested in the complete picture but only the particles. The reworked GUI will take this into account.

Also a lot of learning faults have to be rectified in the new GUI

imag1407
imag1408

Welch Test

Move Welch test from test to Soilmath::Stats

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.