Public Lab Research note


NDVI with Canon A2300, APM Hexacopter DJI550, Help

by andresc4 | January 28, 2014 20:46 28 Jan 20:46 | #9986 | #9986

Hello, I'm new on the community, i have been reading the site for a few weeks and i just decided to join the community to share the project that I'm working on, basically i want to start using areal photography to control some fields. I have experience in UAV Drones ( multirrotors, and now im working on a small plane ). I work with APM2.5 + Mavlink. The drone its working just fine, I was able to complete successful missions, now Im stuch with the NDVI calculations

I bough 2 Canon A2300, i remove the Ir filter and added a Rosco2003 Infra Blue, bouth with CHDK and a remote usb trigger. I have some photos that i took from my firtst mision,,, im not over a real field, so there is no much vegetation to analyze

https://www.dropbox.com/sh/zvtyke3wpdtw4pt/9SyAeR6sF8 ( UAV folder )

I follow the steps on this video.... https://www.youtube.com/watch?v=Sfic43qRHqk

but im not quite happy with the results... and i having a hard time to align the images in photoshop! The cameras are new, same settings, same picture from the same angle, and the lens distorcion seems quite different. I thougth I made a mistake and I left one of the camera with more zoom, but i double check and still, cant align the images. Already try using PTgui, but still no success.

I would like to request some help regarding this topics...

A) Is there any opensource software to align the 2 images one over the other one ? B ) Is my NDVI calculation correct ? i don´t see the results ... is there any software that realizes this task easily ?

Questions and next steps

Regarding new steps on the project,,, im would like to use 2 exact RF cameras used for FPV, and use 2 different Vtx and Rtx to receive the video on a laptop, with 2 different usb capure card i think it will be possible to write a shader and to get the calculation in realtime... im a vvvv user (vvvv.org)

Well thats all, i hope to get some help from the forums, if any of you need help on vvvv or APM please let me know, or write me on my persona email ( mynewpixel.com <-- here is my email )


23 Comments

Andresc4,

Your UAV photo pairs are great quality. They are sharp and rectify with each other easily. I used Ned's Fiji plugin to align the pairs and make NDVI images which look biologically meaningful.

IMG_0093a_NDVI_Color_2Cam.jpg
Above: NDVI using the red channel from the normal RGB photo for visible light and the red channel from the infrablue photo as NIR.

IMG_0093a_NDVI_Color_1Cam.jpg
Above: NDVI from the single infrablue image using the blue channel as visible light and the red channel as NIR.

I made some assumptions about your photos:

  • The pink photos are infrablue photos taken with a camera that was not custom white balanced. It would probably help to do that procedure.
  • The pink photos were taken with a camera with a Rosco #2007 filter replacing the IR block filter. I guess you put the new filter on the inside.

Fiji and Ned's Fiji plugin are free and can process single camera infrablue (Infragram) photos as well as dual camera (VIS and NIR) pairs into NDVI and false color IR images. It's too bad you were led to the Photoshop procedure, which is way harder and less precise than Ned's plugin.

If you are going to use two cameras (one for VIS and one for NIR), you will get a more pure NIR channel if you replace the IR block filter with an IR pass filter like the Wratten 87. But then you will not be able to get NDVI from one camera. For a one camera system that provides a pure NIR channel, use a Wratten 25A instead of Rosco #2007 and the blue channel will be very pure NIR (use the red channel for VIS).

The FPV video cameras you plan to use might have CMOS sensors which handle NIR light very differently than CCD sensors. So be prepared to do some testing. For example, I have not heard of anyone using a Wratten 25A filter in a CMOS camera. It's wide open territory.

It looks like you are off to a good start.

Chris

Reply to this comment...


Hey Chris thank you for the quick reply! , the photo looks great! , and you were right, i did not use white balance I have the camera just with CHDK,,, can you point me some links on which are the best CHDK settings for NDVI ? I read that i need to use manual White balance with Dayligth settings, but I´m sure that are many other things to set ( ISO, Focus, Raw... )

I'm using 1 layer of Rosco 2007 on the external side of the camera,,, it should be inside ?

I'm planing to use 2 cameras, one for visible ligth and the other for NIR, on the NIR camera i have the rosco... to be honest if i order another filter i need to wait 2 months until the mail delivers the package to my house, we have a huge crisis in Argentina regarding shippings and packages from other countries.

Regarding the FPV video setup, I ask a friend to help me with the vvvv code to compile the images, he will give me an update soon... the good news is that we have CCD cameras with and without IR filer... i guess we will get 2 cameras without IR filter and add the spare filter that we have from the Canon one,.,,, i will keep this post updated on this topic.

Regarding Fiji... can you show me some tutorials regarding the steps to install the plugin and get the NDVI final results ?

Andres

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Andres,

  • CHDK settings: It appears that you have the synchronous camera triggering working, so of the other CHDK settings for aerial photography the most important is probably shutter priority mode to keep the shutter speed high (~1/800 second). This is mentioned here and described here, but I think newer versions of CHDK work differently.
  • Having the Rosco filter on the outside is fine, but it is not protected and not shaded from the sun (that's okay for vertical shots).
  • The Rosco filter will give you a decent NIR image in the red channel. A piece of exposed, developed color print film (or unexposed developed color slide film) is a very good NIR filter -- it blocks most visible light and passes lots of IR. But it is not as optically clear and passes less NIR than a good Wratten 87 filter. I'm not sure whether Rosco 2007 or exposed film is a better NIR filter.
  • Fiji tutorials: That would be a great thing to have. Installing Fiji seems to be pretty easy, and installing Ned's photomonitoring plugin is described in Ned's guide. Using the plugin is also described in Ned's guide, but it would be really helpful to have a video tutorial for that (especially on making the text file of photo pairs). Fiji and Ned's plugin are incredibly powerful tools for processing VIS/NIR pairs or Infragram photos, so it is worthwhile taking the time to figure them out.

Reply to this comment...


Great, I have a lot to read ! I have Fiji and the plugin running,,, was able to run the plugin with one picture and with a directory with 2 pictures... but I´m doing something wrong...

I´m not getting nothing similar to the images that you show me... i try choosing red.red and red.blue as visible light and NIR... I also try making a directory with the 2 images from the 2 cameras, but on the output i get the same process for each file, so its not doing anything between the 2 pictures, just doing the same process for each of them

can you tell me the steps that you follow to process the image that you show me ? Did you use 1 or booth images ?

Thank you!

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


The main reason your results differ from mine is that you did not have the home-made color lookup table I used. That lookup table is now available here (at the bottom). Here is the dialog box for processing the single (pink) displayed infrablue photo into NDVI and NRG:

FijisingleBox.JPG

Here is the dialog box for processing VIS/NIR image pairs into NDVI and NRG:

FijiDualBox.JPG

Changing some of the parameters in the dialog boxes can have dramatic effects on the results.

When you click OK in the box above, you will be asked for a text file of the image pairs. That file should be in this format:

L:\Infra\TestPhotos\Andresc4\NIR\IMG_0093b.JPG, L:\Infra\TestPhotos\Andresc4\VIS\IMG_0093a.JPG L:\Infra\TestPhotos\Andresc4\NIR\IMG_0152.JPG, L:\Infra\TestPhotos\Andresc4\VIS\IMG_0152a.JPG

One of the options of the plugin allows you to create a text file by inputting directory locations and other things. Sometimes I can figure out how to make that work.

Reply to this comment...


Sorry Chris, where are you getting the dialog box for processing VIS/NIR image pairs into NDVI and NRG menu from ? ( the second screen that you show me ) When i go to Plugins, PhotoMonitoringPluginMaster/src/ y have 4 options List images Register Images Create NDVI from image Create NDVI from Dir...

already save the lut file, now is listed

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


It seems like we have different versions of the plugin. I'm not sure which is more recent, I think Ned might have to sort this out.

Reply to this comment...


on the installation instructions it says... "In addition to the photo monitoring plugin you will also need to download the metadata-extractor-2.6.2.jar and xmpcore.jar files." i follow those steps, but today there are new versions... https://code.google.com/p/metadata-extractor/downloads/list

Where are you going to get that screen ? How long ago did you made the installation ? ( im on windows7 64)

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Hi Adresc4 - I'll try to help you get the plugin working. When you are running Fiji and you click on menu bar Plugins => Photo Monitoring do you see these four plugins listed: Create dual image list Dual image NDVI processing Single image NDVI from directory Single image NDVI from displayed image

If you click on "Dual image NDVI processing" you should see the second dialog window that Chris posted. If that's not working please let me know.

Reply to this comment...


It looks like Andre might have an older version. His menu options are:

The options I get are the ones Ned listed:

I have not re-installed or updated the plugin lately. I'm not sure how Andre would have gotten an older version.

Reply to this comment...


I just updated the plugin and tested it. I suggest that Andre delete his version of the download Photo_Monitoring.jar and download the fresh version from Github. I'm not sure what the problem was or how long it's been a problem but hopefully this will fix it. This is the URL for the download page. If you click on "View Raw" the file should download. Please let me know if this works.

Reply to this comment...


I just did everything again, same problem... clean instalation of fiji and download from github.... and i just realize that there are 2 installation methods,,, coping the .jar file to the directory... or drag and drop the jar to the fiji gui... this second one worked just fine!! Now i got it working! :)

I will start processing some images and upload them so we can see the results! Thank you guys!!!

Edit > Im uploading 5 examples to my dropbox, but its taking a long time,,, ( slow internet... ) https://www.dropbox.com/sh/zvtyke3wpdtw4pt/7Yt9_qYcGW/uav

Chris I use all the same settings that you used and it made a huge change on the aligment,,, i also try adding some extra time when i create the list, on the max difference between offset... in my case its 0 because the cameras were sync,,, but if i leave 0 sometimes the pictures are not align,,, i will keep experimenting with this.

I have another question,,, i have 2 go pro hero 2, one with a broken lens, i will be getting the spare part maybe next month,,, this procedure can be done with cmos cameras? i found this,,, seems to be working... http://publiclab.org/notes/gonzoearth/07-02-2013/multispectral-gopro-at-cloverleaf-farm

and last question,,, is my dual camera set up the best thing to do ? because i see lots of project with 1 camera setup an similar results ...

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Stewart got great NDVI results from his two GoPros, which have CMOS sensors. If you are using a two camera system like that, CMOS is not a problem because one camera records normally (visible light only) and the other is converted to record only NIR. It is only when you make a one camera system (infrablue or superred) from a CMOS camera that the differences between CMOS and CCD become conspicuous. Much more work is needed to learn how to make good NDVI from a single CMOS camera system. The problem appears to be getting a good visible light channel that is not contaminated with NIR. The NIR channel (red in infrablue and blue in superred) seems to be good. But when you remove the factory IR block filter from a CMOS camera, all three channels (RGB) seem to get lots of NIR light. So if you want to make a two camera system with a GoPro (or any CMOS camera), remove the IR block filter from one camera and replace it with an IR pass filter (which blocks all visible light) like the Wratten 87 or developed color film. If you instead replace the IR block filter with Rosco 2007, the red channel will be an okay NIR band, but the blue and green channels will probably be contaminated with NIR and not so useful. So if the visible bands in the converted camera are not useful, its better to install a good IR pass filter so you get a pure NIR image.

A dual camera system like that with one pure visible camera and one pure NIR camera will give NDVI results that are much easier to interpret and much easier to compare with legacy NDVI. Single camera systems are not as good, but they weigh half as much, need no electronics for synchronization, and require no photo alignment. So they have obvious advantages for aerial use and for casual users.

Reply to this comment...


Andres, a quick question? Where are you from? Santiago

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


no te preocupes, preste un poco de atención y estamos en la misma...jaja! te paso mi mail asi nos contactamos y nos damos una mano, yo estoy con un proyecto similar. santizion@gmail.com
saludos

Reply to this comment...


Markdown Hi guys, I´ve been reading this posts and they are very helpfull for me as well, but I am having some problems also with the PhotoMonitoring. When I go to the "Dual Image NDVI Processing" I don´t have the option of "NDVIBLue2Red.lut" option on the output color table. already thanks for any help....

Reply to this comment...


Andres, de que parte de argentina sos? Podriamos contactarnos asi nos damos una mano te parece?, Saludos

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Santiago, You can download that look up table at this page; http://publiclab.org/wiki/photo-monitoring-plugin. Copy it into the luts subdirectory in the Fiji directory. Chris

Reply to this comment...


Thanks Chris, now I have it!. Santiago

Reply to this comment...


Hey guys i have been offline for a while, with a lot of work and other projects, but now I want to continue with this!

Im having a lot of issues with the focus of the cameras, on the ground seems to works just fine,,, but on the copter the focus is still a big issue. The manual focus option of the CHDK dont seems to work at all... I have a friend who is selling a Sony Nex 3 with a broken LCD... good news is that using the HDMI cable I can access to the menu to set the camera,,, and he is giving me a verrry good price!... Acording to what i read, it seems to have the same sensor as the Sony Nex 5,,, and this camera is the one used on the GateWingx100...

My question is,,, do I need to get a new rosco filter to try ndvi with 1 camera only? I followed this tutorial http://event38.wikispaces.com/NDVI+Processing+in+Fiji using one of the Ir pictures that I took on the previews examples and I did't get anything similar . I would like to be sure to have the right filters and workflow and then i will see if I can afford that camera.

On the other hand, still with a very bad focus I was able to achieve nice 3d model of a field, here is the results https://sketchfab.com/models/4c6bc290c07b4b638d9fab3fb14b17ab

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Which cameras are you having focus problems with? The A2300 does not have manual focus, so the best you can do is probably infinity focus mode which is automatic focus that only searches for focus farther than about three meters away. Is the problem focus or blur from vibration?

The Nex 3 has a CMOS sensor, so for a one camera NDVI system it will probably work better with a red filter (Wratten 25A) than a blue filter. Are you going to try to remove the IR block filter?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Ohhh thats why... i will give a try to the infinity focus... thats under "subject distance: option ? The nex3 and the nex5 have the same sensor I think, I will need to double check... its a death camera, It's almose impossible to get spare parts here in Argentina (legal issues with customs) so i will give it a try for this project. So i need a Red filter, thats why the NDVI from my A2300 did't work... i have the Rosco 2007 now

https://www.youtube.com/watch?v=XWKPLAtdLaw

Im planing to do just that,,,,i will have the same hardware as the GateWing x100

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Hi Andresc4, i would like be in touch with you.i'm researching about the same like you. I live in Argentina. Please contact me my email agustin.castel@gmail.com or mobil 3813041826. Saludos

Reply to this comment...


Login to comment.