I want to develop a workflow to detect a specific disease in potato plants by remote sensing.
I have acquired the images of the potato field by mounting a multispectral camera on a drone that flew at an altitude of 5m above the plants.
The multispectral camera has 5 bands namely: Blue,Green,Red,NIR and RedEdge.
I have converted the DN(raw digital number) values of all bands in reflectance values.
I have first trained SVM to segment soil from plants and then also applied SAVI(soil adjusted vegetation index) to refine soil segmentation from plants.
Now, I want to apply NDVI(normalized difference vegetation index) to determine the heath of plants pixel wise.
Is it the right approach to follow? Will NDVI be resonable to apply on images taken at just 5m height? Or is there any better approach?
Best regards...
Assuming that the vegetation mask you created is doing a good job of distinguishing between non vegetation and vegetation in the scene, I recommend that you create a vector file such as points or lines which correspond to individual potato plants or rows of plants in your scene. Once you have done that, you can buffer the geometry you have created in order to facilitate the calculation of zonal statistics within each polygon. If you tabulate the mean for a given layer in your multispectral raster file, that will give you the mean reflectance for a given band on a per plant or per row basis.
Because the reflectance values for the raw bands from multispectral sensors are sensitive to the lighting conditions (incident light) of the scene, it is more repeatable to use ratios of these bands such as NDVI to predict plant vigor (or stress in the case of diseased individuals).
I have developed a workflow that might help you extract the data you want:
http://blogs.oregonstate.edu/geog566spatialstatistics/2017/06/01/processing-multispectral-imagery-unmanned-aerial-vehicle-phenotyping-seedlings-common-garden-boxes-part-1/
http://blogs.oregonstate.edu/geog566spatialstatistics/2017/06/02/processing-multispectral-imagery-unmanned-aerial-vehicle-phenotyping-seedlings-common-garden-boxes-part-2/
Related
My goal is to be able to have a way to process a product photo through the model, and have it return the same photo with the product against a white background. The product photos will be of varying sizes and product types.
I'd like to feed the model photos of products with backgrounds, and those without. In the future I will also expand on the dataset with partially removed backgrounds.
If you are looking for an easy way of doing this, I'd suggest the K-means clustering algorithm. Assuming that you have a simple plain background and an image (of interest) you can obtain the RGB pixel values and use a K-means clustering algorithm with the number of clusters set to 2.
Let me explain this to you with the help of an example. Suppose you have an image of dimension 28*28 (just another arbitrary dimension). The total number of pixels in the image would be 784. Each pixel is represented as a combination of 3 RGB values ranging from 0-255.
A K-Means clustering algorithm will cluster the pixel values into K clusters thus each cluster represents pixel values which are more similar than the pixel values in another cluster. This technique is especially helpful in drawing contours (borders) around images of interest.
In the K-means clustering algorithm, there would be 784 sample points each represented in a 3 dimensional plane for this example. It will cluster these data points into K (2 in this example) clusters.
Here is a very simple implementation of the K-means clustering algorithm.
If you are looking for advanced machine learning implementation, then I'd suggest you look for Deep Convolution Neural Networks for Background Removal in Images. This machine learning technique has been successfully used for the task for background image removal
Read more about it from here, here and here.
I am working on a project to segment air images and classify each segment. The images are very large and have huge homogeneous areas, so I decided to use a Split and Merge Algorithm for the segmentation.
(On the left the original image and on the right the segmented one, where each segment is represented in its RGB mean value Thanks to this answer)
For the classification I want to use a SVM Classifier (I used it a lot in two projects before) with a feature vector.
For the beginning I just want to use five classes: Water, Vegetation, Built up area, Dune and Anomaly
Now I am thinking about what I can put in this feature vector:
The mean RGB Value of the Segment
A texture feature (but can I represent the texture of the segment with just one value?)
The place in the source image (maybe with a value which represents left, right or middle?)
The size of the segment (Water segments should be much larger than built areas)
The mean RGB values of the fourth neighborhood of the segment
So has anyone done something like this and can give me some advises what useful stuff I can put in the feature vector? And can someone give me an advise how I can represent the texture in the segment correctly?
Thank you for your help.
Instead of the Split and Merge algorithm, you could also use superpixels. There are several fast and easy-to-use superpixel algorithms available (some are even implemented in recent OpenCV versions). To name just a view:
Compact Watershed (see here: https://www.tu-chemnitz.de/etit/proaut/forschung/rsrc/cws_pSLIC_ICPR.pdf)
preSLIC and SLIC (see here: https://www.tu-chemnitz.de/etit/proaut/forschung/rsrc/cws_pSLIC_ICPR.pdf and here: http://www.kev-smith.com/papers/SLIC_Superpixels.pdf)
SEEDS (see here: https://arxiv.org/abs/1309.3848)
ERGC (see here: https://sites.google.com/site/pierrebuyssens/code/ergc)
Given the superpixel segmentation, there is a vast set of features you can compute in order to classify them:
In Automatic Photo Pop-Up Table 1, Hoiem et al. consider, among others, the following features: mean RGB color, mean HSV color, color histograms, saturation histograms, Textons, differenty oriented Gaussian derivative filters, mean x and y location, area, ...
In Recovering Occlusion Boundaries from a Single Image, Hoiem et al. consider some additional features to the above list in Table 1.
In SuperParsing: Scalable Nonparametric Image
Parsing with Superpixels
, Tighe et al. additionally consider SIFT histograms, the mask reduced on a 8 x 8 image, boundign box shape, and color thumbnails.
In Class Segmentation and Object Localization with Superpixel Neighborhoods
, Fulkerson et al. also consider features from neighboring superpixels.
Based on the superpixels, you can still apply a simple merging-scheme in order to reduce the number of superpixels. Simple merging by color histograms might already be useful for your tasks. Otherwise you can additionally use edge information in between superpixels for merging.
You don't need to restrict yourself to just 1 feature vector. You could try multiple feature vectors (from the list you already have), and feed them to classifiers based on multiple kernel learning (MKL). MKL has shown to improve the performance over a single feature approach, and one of my favourite MKL techniques is VBpMKL.
If you have time, I would suggest you try one or more the following features, which can capture the features of interest:
Haralick texture features
Histogram oriented gradient features
Gabor filters
SIFT
patch-wise RGB means
I have a procedural planet generator in the works and my setup is I have a quadtree set up that splits the six faces of the cube into smaller, manageable quads. As the camera approaches the terrain, these quads split and as it recedes away from them, the terrain quads 'collapse' - just like any other quadtree terrain system. The problem is that, at the moment, to displace the vertices of the terrain I compute the vertex heights using 3D ridged multi fractals and have to directly displace the vertices using the outputs of the algorithm. Instead I want to generate a heightmap with a greater resolution than that of the vertices in the quadtree leaf nodes. That is, there has to be a lot more texels in the heightmaps than there are vertices in the quads of the planet. The vertex density of each quad is 17x17 (289 verts total) while the heightmap textures will have a resolution of 192x192 texels (36,864 texels total). I don't even know what positions I plug into the ridged multi fractals algorithm to generate the colors for texels that won't map to any vertices (as I plug in the vertex positions to generate all of the heights). Much less, I don't quite understand how to read the heightmap so that the heights do map to the vertices properly. The only reason I need the heightmap to have such a high resolution is because I will also use them for normal mapping.
As a starting point, look up the Wikipedia article on Quadrilateralized Spherical Cube (QLSC) which was first proposed by F. K. Chan (analyst) and E. M. O'Neill (programmer) in 1973-1974 period. This abridged article is based on a 1975 Computer Sciences Corporation report prepared for the US Navy, referenced in that Wikipedia article. The QLSC is a mathematical construct for the division of the six spherical squares on a sphere into equal-area cells by an appropriate (nonlinear) transformation from the equal-area cells on the six planar squares of an inscribed cube. The cell resolution is selectable (user-specified) and is based on a hierarchical division of a square consistent with the quadtree structure. The cells are strung together serially in a "reversed Z-pattern" binary bit-string. By masking out the even or odd bits in the serial cell address, the x or y coordinates of the cell on a planar square are obtained.
The QLSC was used by the Navy for meteorological applications in 1977. It was also adopted by NASA for use in the Cosmic Background Explorer (COBE) in 1989. It has been used by astronomers and astrophysicists for all-sky star-mapping and radiation cataloging. Atmospheric and oceanic scientists use it for the database structure because of the efficiency in data archival and retrieval. It is used in geographical information systems (GIS) for hyperspectral data processing, and in geodetic representation of terrain data.
There are only a few copies of the original Navy report in existence. However, a reprint may be obtained (through Amazon) from the National Technical Information Service (NTIS) in Springfield, Virginia. There is a 25 page paper "A Quadrilateralized Spherical Cube Earth Data Base" by Chan in the Proceedings of the NASA/GSFC Fifth Annual Flight Mechanics/Estimation Theory Symposium, Greenbelt, Maryland (1980). A few articles in Stack Overflow may be obtained by searching (through Google) using the keywords Quadrilateralized Spherical Cube.
My aim is to detect whether a car slot is empty or occupied by a car. Finally, the number of cars will be counted in a car park.
The camera is monitoring the car park as it is seen in the sample pictures. Each car park slot is presented with very less pixels. I select four pixel points to define ROI, and I apply the perspective transformation in the image, please see Image 1.
SVM would be a nice approach to classify the samples and train. Unfortunately, I am not sure about the feature vector.
The challenges:
-Shadow of the cars in the adjacent slots
-A car is one slot is visible partially in another slot.
-Shadow of the big buildings
-Weather changes (sunny, cloudy etc. )
-After the rain, slot color is changed (dry or wet)
-Different slots and perspective changes
What kind of features or feature vectors would be the best for the classification?
Thank you in advance,
A color histogram could already be enough if you have enough training data. You can train with shadowed, partly shadowed, non-shadowed empty spots as well as with different cars. It might be difficult to get enough training data, you could also use synthetic data (render cars and shadows on the images).
So it is not only a question about features, but also about training samples.
My problem is as follows:
I have 6 types of images, or 6 classes. For example, cat, dog, bird, etc.
For every type of image, I have many variations of that image. For example, brown cat, black dog, etc.
I'm currently using a Support Vector Machine (SVM) to classify the images using one-versus-rest classification. I'm unfolding each image into a single pixel vector and using that as the feature vector for a given image I'm experiencing decent classification accuracy, but I want to try something different.
I want to use image descriptors, particularly SURF features, as the feature vector for each image. This issue is, I can only have a single feature vector per given image and I'm given a variable number of SURF features from the feature extraction process. For example, 1 picture of a cat may give me 40 SURF features, while 1 picture of a dog will give me 68 SURF features. I could pick the n strongest features, but I have no way of guaranteeing that the chosen SURF features are ones that describe my image (for example, it could focus on the background). There's also no guarantee that ANY SURF features are found.
So, my problem is, how can I get many observations (each being a SURF feature vector), and "fold" these observations into a single feature vector which describes the raw image and can fed to an SVM for training?
Thanks for your help!
Typically the SURF descriptors are quantized using a K-means dictionary and aggregated into one l1-normalized histogram. So your inputs to the SVM algorithm are now fixed in size.