ASM/REM 404 - Lab9: Multispectral Image Processing, Part2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] this is part two of the multi-spectral imagery lab working with the micasense red edge imagery in metashape and at the end of last lab we had made it all the way through doing the uh calibration the reference sorry the reflectance calibration on the imagery and all the way to making our ortho mosaic and i had you sort of create the orthomosaic using the average function with the color blending for this lab we're going to do a couple of things so based off of some discussions that we've had about sort of exposure uh issues with the or exposure sensitivities with the red edge camera and some of the color balancing problems and when you're stitching the ortho together i did a little bit of research and there actually are some tools within metashape that can help us address those challenges and so we want to look at some of those and then in the second part of the lab we'll look at creating a band ratio indices so like in dvi's other vegetation indices and then we'll talk a little bit about how to export these the orthos and the the band ratio indexes out of meta shape so you can use them other places all right so the first thing that we want to do so this is our ortho mosaic we created last time using the average uh color blending and you know we've still got some areas that are maybe blown out a little bit with color but otherwise it it looks pretty looks alright i'm going to go ahead and duplicate this and we're going to remake this ortho mosaic using the mosaic color blending okay so we will uh rename this one to orthomosaic average we call it average blend sounds like a really weird coffee okay so i'm going to go ahead and re-create this ortho mosaic and now i'm going to use the the of default mosaic blending mode and i'll let that rip and it's going to take a minute to do this so i'll pause and come back to it here in just a second all right so here's our ortho mosaic with the uh using the mosaic blending and if i if i sort of toggle back and forth here between the two you can you can see some of these sort of coloration differences here okay so i'm going to actually duplicate this again and uh we're going to sort of keep these these other two the average blend and the um call this orthomosaic mosaic blend and uh no correction okay that's a mouthful but that'll sort of describe what it is and then in this one here um this will be our mosaic blend okay the one that will actually do the corrections too so uh if we look at the seam lines here you can sort of see kind of like where some of the problems uh originate so let's let's sort of pick this uh area here just as a as an example so this is likely coming from one over exposed image that that meta shape is sort of like picking over uh other photos in that in that region okay and there's actually a tool in meta shape that we can use to like tweak or to modify these seam lines and to tell it which of the images we would like it to use in this in this area okay it's called the assign images tool and uh for to sort of get to that tool or to take advantage of that tool we need to create a polygon on this image okay so i'm just going to draw a shape here right where we're not building rocket ships so this doesn't have to be like super precise okay so there's our polygon the the border of the polygon is red so that means it's selected and if i right click on it then i can come down here and choose assign images okay and that's gonna pop this box up and this is a listing of all of the photos these are the ortho corrected photos um all the photos that that sort of like fall within or intersect this polygon boundary and if i click on one you can see rank one so this is the sort of preferred photo for this area okay it's not covering the whole area but it's pretty overexposed all right and so that is actually translating into the the that sort of overblown or blown out sort of appearance that i'm getting in the orthomosaic but if i look at image two it it actually looks pretty good it's maybe a little dark but it's certainly a lot better than than the others image three actually doesn't look too bad either right okay but if i select image two and i hit okay okay now we've just told that we wanted to use that specific image for this polygon that that i uh that i digitized okay and so it's already looking better but we've got sort of a hard boundary here from our shape and this change is not permanent yet this is a temporary change and so to lock this change in we need to have meta shape update the ortho mosaic there's a couple ways we can do that there's the update button here on the toolbar or i can right click on the or the mosaic in the workspace pane and choose update orthomosaic and this will lock in the changes to the orthomosaic and and force it to use that one image that we wanted it to use so i will go ahead and hit ok here it's going to take a minute or two to to run that and update that ortho mosaic and we'll come back at that point okay so the update has finished and it's looking pretty nice here if i actually toggle back to some of these other versions of the ortho mosaic here's the original prior to correction so we've addressed this sort of blown out sort of portion uh here and even if we flip over to the average you can see the average just sort of really washes out this whole region right so i'm feeling pretty good about you know kind of what we have in this area here and so i'm going to go ahead and and digitize another polygon in in this area here and you know it's possible that you could digitize some larger polygons and just kind of take uh care of this in sort of one fell swoop or we could just sort of a priori try to screen out some of these overexposed images um certainly seems like the red edge imagery is really sensitive to uh multi-view multi-angle view effects um but uh let's look at this sort of other polygon here okay so this is a bigger polygons there's a lot more images that overlap this and some of them sort of make up the full area and then some of them don't right and and some of these images that uh that you know sort of don't occupy the full area maybe ones that we want to use or keep and so in this case we can uh check this option at the bottom to allow multiple selections and then if i if i select one i can i can use the check boxes to tell if we want to tell meta shape if we want to use it or not and then i also can use the arrow keys on my uh my keyboard to just kind of go through these uh images here and pick the ones that i want to uh that's a really nice one i like that one um that i want to use in this in this case okay so um so i'll just pick a handful here it's probably sufficient just to actually in this case pick number 12 that covers the full area right because that's a that's a nice looking image all right but i've picked a handful of these so i'll go ahead and click ok here and you can see i've got a blue sort of like cross hatching on the polygon um because there's multiple images here there's like it can't just like sub the the sort of other image in and you know kind of show you what that would look like so this is just kind of a cue that there's a change that's pending and i'll need to uh to update that what i'm going to do though at at this point is uh i'm gonna go ahead and digitize a couple of other polygons and and you know sort of address some of these other uh color sort of blending color balancing issues and uh and then i'll go ahead and do the update all at once and i'm going to do that offline and then i'll come back uh when i'm when i'm all done and we can kind of explore the image a little bit from there all right i'm done here and i mean there's probably more i could have done but i think you guys get the idea and what we've got here is a lot nicer looking or the mosaic at the end than when we started um the the sort of color is just a lot more consistent the illumination is a lot more consistent across the whole thing and if i compare this corrected version with my uncorrected version right you can see we've addressed a lot of these sort of bright spots on the image and even comparing it with the with the averaged uh one we're doing a lot better job especially here at the at the margins okay the reason that we needed to use the mosaic uh blend mode for this rather than the average blend has to do with what meta shape is doing with the with the assigned images and so with mosaic it's just going to pick the best image or the single image that sort of fits within these uh with these seam line polygons with the average mode it's going to average the value of all of those images together and so um the effect of just picking one image or just a handful of images for a uh for for sort of addressing these color issues just isn't as pronounced with with average mode because there's still all these other images that it's trying to average together in that in that area so the results seem to work a lot better using the mosaic mode than the average mode if you're going to be be updating the orthomosaic uh and and specifically assigning images okay so that is the uh that's our color correction part so let's um talk a little bit now about uh band ratios and how we do those in meta shape and we can come up here to tools and set raster transform or there's this sort of paint palette icon on the main toolbar you can just look for that and it's going to pop up this raster calculator box here and notice that the bands from the multi-spectral orthomosaic are listed from b1 to b5 that's how you're going to refer to them as actually by their numbers and there's a sort of space here that we can we can sort of like create our band using uh just the formula for it um so let's go ahead and we'll we'll enter in the equation for ndvi and i'm going to just start typing and i've already entered i've already done an ndvi here uh in the past so it remembers that and just sort of auto fills that in but notice i just used the band numbers so b5 minus b4 divided by b5 plus b4 okay actually that should be b this is a normalized difference red edge index we want a normalized difference vegetation index so near infrared uh divided by red or near infrared and red is part of the ndvi okay and so once i'm happy with that i see the green check mark here that means metashape is happy with my math okay and then i need to make sure that this button here is checked this enable transform and if i apply this then here's my my ndvi sort of layer right okay and ebi values can range from negative one to one um it's you know most typical that you're going to get values uh above zero and and you know probably not quite as high as one important point here is that uh meta shape has not actually changed anything relative to this ortho mosaic it's just showing us a different view of the orthomosaic that's defined by this formula okay so i can uncheck this box and apply that and i get my original orthomosaic back okay so these are just transformations it's just a different way of displaying the orthomosaic data all right i can add a different one here too i could add that normalized difference red edge index that i actually had the formula for before okay let's look at that one now to uh to apply this look i hit apply and nothing nothing changed right that's because it's actually still using this first output band this first ndvi layer to change that i have to go to the palette tab and then tell it to use that second band now this is really confusing right the original input bands were numbered one through five and then my output bands are also listed as like b1 b2 right which is just not very helpful but that's what we've got okay so i changed that to b2 and now if i apply that then you can see sort of the change reflected uh in the in the image okay the other thing you can do in this palette tab is uh is change uh to a different color scheme um and so i kind of like this ndvi color scheme that they have and when you change if you change bands um you know sort of back and forth um it's it doesn't automatically update the range and the the sort of color distribution within that range and so if you if you change back and forth you need to refresh it with the little sort of recycle button and then hit the auto button to uh to spread the colors out across that range okay so there's my normalized difference red edge index i can switch it back to in dvi right if i just hit apply look it looks really weird right i've got no sort of discrimination here in the sort of upper end of the ndvi spectrum that's because the the scale is wrong so if i refresh the scale and then i use auto to spread the colors back out okay then it's readjusted that so it's a nice kind of a visual representation and it's using all of the sort of color space that's available to it all right so on this page you make sure you set the bands correctly to which one you want to look at and refresh and then use the auto to spread the colors out okay all right so those are the raster transforms again click on the palette check the enable transform box or uncheck it if you want to sort of turn your band ratio on or to get your original image back okay so for the lab assignment i want you to go ahead and create an ndvi and i want you to create a a second sort of band ratio or band index of your own use something different than this normalized difference red edge index there will be some links in the lab document for a whole bunch of information on different vegetation indices or you can try making up your own i guess that's okay too so let's turn this back on and the other thing to sort of note or to to look at then is what has been the effect of these color corrections that we've done on our vegetation index values so here's our corrected one and if we look at the sort of area that has not been or the version that was not corrected and the sort of average one right there's some sort of minor differences here let's uh let's come down here this is a spot where i know that there's some some differences down here in the sort of lower left corner so here's our corrected version here and our mosaic blend not corrected check this out there is a sort of this artifact here that you get from one of the original seam lines where it was sort of piecing in an overexposed image against sort of the uh the the other images that were not so overexposed okay so the corrected version is is you know quite a bit different in uh in that area so one of the last steps for the lab assignment is you know zoom in find an area where you're you've done the color correction and then give me a screenshot of the corrected and the uncorrected uh version for that area and then we'll uh we'll use some of the lab questions in the write-up to kind of look at what the differences are between those okay so almost done here one last thing that we want to look at is how we get the data out of of meta shape so we can use it in a gis or remote sensing package and it's pretty straightforward you pick your or the mosaic you want you right click on it you go to export there's a bunch of different options here typically you know i'm just exporting as a as a jpeg or a tiff you know make sure your coordinate system is set right or set to what you want something that's appropriate metashape does a really great job with projecting into different coordinate systems so it's it's pretty efficient to let it do the hard work rather than trying to reproject a raster data set in another package set your uh your pixel size to whatever you want this option right here raster transform this is important okay this is where you tell it if you want the original ortho mosaic when you would choose none and so that in this case would export the the five band multispectral orthomosaic or if you want your your sort of vegetation index values um then you choose your index value and that in this case for our ndvi would give us the actual like you know negative one to one values for that okay if you choose index color it's going to output rgb values for the uh for the display here which is yeah it's a representation of nddi but if you're going to analyze nddi someplace else this is not the information that you want so make sure you choose index value if you want the the actual like ndvi values and choose none if you want the original ortho mosaic and then the other uh settings here are either related to other formats or they're ones that we've talked about in other labs already and so when you're when you're ready you just hit export you'll give it a file name and a place to save it and and you're off to the races okay so um pretty straightforward and that kind of wraps up our look at multi-spectral image processing in meta shape [Music]
Info
Channel: Jason Karl
Views: 372
Rating: undefined out of 5
Keywords: drone, photogrammetry, micasense, rededge, remote sensing, structure from motion, agisoft, metashape, UAS, UAV, aerial photography, multispectral imagery
Id: mjsBSkpoFnE
Channel Id: undefined
Length: 21min 7sec (1267 seconds)
Published: Wed Nov 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.