Thursday, 20 February 2020

3D NIR Drone Scanning: Python + VisualSFM VS PIX4D

In this project I showcase my developments in 3D Drone Scanning where I can generate detailed 3D models with NDVI indices by modifying the DJI Mavic 2 Pro Hasselblad Camera in a Near-Infrared (NIR) Conversion.

Using a custom made Dual Bandpass Filter I can obtain clear NIR, green and blue leveraged colour images  which can be processed in Python + Visual SFM for free (using Code I developed in Python) and viewed in Meshlab. The advantage of this technique is affordability.

Alternatively, using commercial software such as PIX4D I can use the reflectance maps to generate a high fedelity and clear NDVI, ENDVI, SAVI map with customisable colormaps which look professional and can be used in the PIX4D BIM suite for accurate volume and area measurements which can be a very useful tool for systemic analysis of a region. In my view PIX4D offers unequaled scope in what one can do with drone mapping.

Index based classification is itself a forerunner to more sophisticated techniques in the field of machine learning. Machine learning is a diverse tool that uses convolution neural networks, trained under either supervised or non-supervised conditions with a selection of classified data for classifying known objects in a general landscape. This can allow, among other things, the user to compare directly individual sections of a chosen landscape, i.e. which areas have been depleted of vegetation with respect to others and what consistently known features are associated with this difference, i.e. the presence or absence of a significant plant undergrowth/understory/underbrush.

With 2D data alone however such classifications are impoverished from significant environmental features, the most important one being missing is overall topology of the landscape. We simply can only see and classify so much from a single 2D point of view, even with tools such as NDVI and others. No matter how many detectors may be onboard an imaging system, be it drone or satellite, without noticing this fact we are limiting our scope of classification.

Topology data of a landscape is itself critical for numerous reasons, being the source information for depth-based classifications, the basis for performing dynamic partial differential flow-based simulations (in fire physics, air flow, etc.) and even for charting the individual biomes in a region with elevation being a key factor affecting the distribution of species in an area, cold-thriving species existing upland and temperate species existing closer to sea level for example.

3D Scanning is the obvious solution and can be accomplished just as easily with NIR cameras as with regular imaging systems onboard a drone. The only difference being the ability to process the large datasets needed into meaningful maps that can have their features classified by the conventional tools of NDVI, ENDVI, SAVI and so on.

Using apps such as DroneHarmony or DJI Mapping Software with the Phantom 4 RTK for example it is possible to plan a plot sweep of a region of defined size.

The convential RGB data is itself very useful and can be classified with meaningful results based on height, shape and colour. This all epends on the 3D reconstructing software being used. PIX4D Mapper is probably the best proprietary software soltion on the market today for this work. The ease of processing and the countless features of this software really makes it the industry standard in construction, mining and of course for environmental monitoring.

The output is a orthomosaic TIFF file which can be classified using NDVI, ENDVI, SAVI as has been done before.

Creating full 3d NDVI Maps using freeware is a bit trickier but can be done in practice aswell. One must be careful not to delete the EXIF Data in Post-processing, or if one does then it is advise that data be transferred over to allow for consitency in maps to compare between RGB and NDVI profiles.

This can be done in Matlab or Python, depending on preference.

This project is attempted with existing freeware for ease of reproduction and replication. Python, Meshlab and VisualSFM and CMVS are all free and opensource. This is of utmost importance for NGOs and Charities working in this area.

Another useful program is QGIS which is opensource and works with Python in its interface and can run scripts from a built in compiler. At the very least it is useful for converting the orthomosaic TIFF Files in JPEG images which retain geoinformation. This is useful for doing postprocessing in Python.

The full unabridged use of QGIS in its full potential in NDVI-style classification is a subject for another project however and I hope to come back to sharing my experiences of using it in the near future. 

No comments:

Post a comment

Note: only a member of this blog may post a comment.