REM 475 Lab - Coregistering multiple dates in Agisoft Metashape

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] okay so in the labs up until now we've largely been dealing with imagery that was collected from a drone at one point in time and there's a lot you can do with that but but really for some powerful analysis we need to be able to consider uh imagery from multiple dates and as soon as we start doing that then the alignment of the image sets over time becomes really important and and that's a concept called co-registration or some textbooks it's just called registration and so in this lab we want to walk through how to do this image alignment or image registration co-registration in meta shape so to to do that we need also to talk about chunks and so when you start a new shape project here notice how we have our workspace and then below that workspace is it says chunk one and up until now whenever we've loaded stuff into metashape it's just by default gone into this chunk and you can think of a chunk as like a folder or or like a sub workspace and so we can put sets of images in a chunk and we can create a new chunk and put different images in that and we can process them separately so we're going to use these chunks to uh process imagery from two different dates and then we're going to align the two chunks to each other okay so that's that's sort of the goal here for this lab so the first thing we want to do is load some imagery in so i'm going to come to workflow add folder and uh here's our co-registration lab we're going to load the september 2021 images in let me resize that a little so you can see what i'm doing okay these are this was from a dji mavic 2 pro so it's a single camera image so here's all of our all of our photos here okay and what we want to do now is actually rename this chunk so we don't get confused later so i'm going to call it september 2021. you can see i've got 163 cameras in there all right now i'm going to right click on my workspace here and choose add chunk and you can see that just made another one called chunk one okay and it's has zero cameras in it now notice that it's bold the text around it is bold and the september 2021 is not bold so the one that's listed in bold is your active chunk so if you start grabbing tools or or doing operations from the menu or things like that it's it's always going to happen on the active chunk okay and so you can just double click on the chunks to to sort of switch one which one is active all right so make sure chunk one is active and then we'll come to uh workflow add folder and we'll go grab the october 2020 images here okay same area this is a for a wood products company we did some flights there to estimate volume of wood chip piles um that they use for creating food packaging products and it's something we go down every month and do that so we're going to look at two different dates about a year apart uh for this uh this food packaging okay so i got my october images in let's rename that chunk october 2020 helps if i can spell okay so here's my two chunks now at this point we're just going to proceed like we we always do for labs so we're going to align the photos uh we'll do some um sparse point cloud optimizations we don't we're not going to worry about ground control for this lab um so we'll just skip that step we do have good ground control for for both these image sets but in the in the interest of time we're gonna we're gonna skip that and we don't actually need that uh at this point so uh so go ahead align your photos uh do the point cloud optimization uh build a dense point cloud a dem and an ortho mosaic okay for the alignment for this lab we can go ahead and choose medium accuracy that's going to give us just a fine result here and for the uh dense point clouds you can actually choose low accuracy uh for for that one all right so i'm going to go ahead and stop here and i'll come back once all of these things are done make sure you do all these steps for each of the of the chunks okay so activate each chunk and uh and work through the whole process and then we'll resume at that point all right so i've got all of my stuff built i've got uh uh photos aligned dense clouds dems ortho mosaics for both my chunks september 2021 and october 2020. so now we're going to start the process of aligning these uh these chunks to each other or aligning the the 3d models for each of these dates one of the things that's kind of helpful here if you have two chunks and just you wanna see how sort of well aligned they are before you even start there's this button on the right hand side of the toolbar here uh if you mouse over it i think it's called like show aligned chunks or something like that if you click on that it's actually going to overlay the other point cloud so so we're looking at the active chunk is september 2021 and it's actually overlaying the october 2020 point cloud on there as well so you can toggle this on and off and just see uh you know how things line up you know you can tilt this zoom in and out um those kinds of things it's a kind of a handy little tool just to see how well you're you're doing so you can go ahead and play around with that so for the process of actually aligning the chunks we are going to do what's called marker-based alignment and for that we're going to create some like pseudo ground control points and so these are things that we can see and positively positively identify on each of the dates and then we're going to use those to kind of lock these two models into each other metashape is just going to try to sort of slide or sort of rotate or scale the models around so that those ground control points line up as as close as we can so we're going to use the ortho mosaic so here's the ortho i clipped it down to a smaller region just to help the processing speeds a little bit but we're going to zoom in here on a feature so here's this cable spool uh right here and that has not moved you know in the entire time that we've been doing this project i don't think that cable spool has moved an inch so that for for our two dates that'll be a good uh ground control marker to pick and uh i actually cheated and uh and set all these markers up ahead of time um so i tagged one here at the uh at the cable spool and uh from here with this chunk um sort of uh september 2021 being displayed i'm going to switch over to the references tab and you'll see i have five ground control points here here let me zoom out so you can see all of them all right so one two three four and five i tried to get them sort of spread out um we're mostly going to be interested in this eastern portion of it but uh you know same same rules apply here as for for regular ground control the the sort of better more even distribution you can have these things the the better result you're going to get um but from here okay i tagged my first ground control point on the ortho and then i can right click on the marker um here in the references tab and i can do filter photos by marker and then same process that i use i do for all of my uh other uh regular ground control right we're gonna open these photos up sort of one at a time and uh zoom in here and uh positively id uh that um that marker okay so you're gonna do that i i would do it on at least six of the photos for each of your ground control markers okay um you know you can pick whichever ones uh you know make sense to you um i'll sort of leave it up to you you can see my my sort of general spread of these ground control points so you know if you want to try to pick the same ones that i did great if you want to pick different ones and i did that's great too just make sure that you can see them from from different angles and and positively id them the these multi-view angle effects can be a bit tricky uh when you're doing these um photo identifiable ground controls all right so we're going to do that for our september 2021 chunk and then we're going to go to our october 2020 chunk and we're gonna do exactly the same thing okay now this is super important you have to uh pick these same spots for your ground control points right so that cable spool has to be a ground control point and it has to have the same name has to be called point one all right so if you just come in here and add a marker uh in that area meta shape is going to just automatically give the first one the name point one all right so um the alignment process is going to be based off of these ground control points that have the same names so it's really important that we keep the names consistent okay so so go ahead and do that like i said i've already i cheated i did it already so once you have that done okay um your your markers set up and um sort of selected on all of your photos then we're actually ready to uh align the the chunks okay so uh yeah so we can go up here to workflow and then align chunks okay now it's listing both of my chunks up here at the top they're both checked which means those are the the ones that i want to align okay the method here at the bottom we're going to choose marker based all right leave the fixed scale off okay if we knew that the the models were both scaled correctly or scaled to each other then we could we could check that we we don't know that for sure so we're going to leave that turned off okay you'll notice here that that the september 2021 has a t after it and october 2020 has an r after it all right so what that actually means is i've already aligned these these uh models um initially they will both have an r behind them and r stands for referenced and that means that there was uh coordinate information for both of these uh models uh when they were when they were built okay if there was no geographic information at all they would have an s behind it for scaled and then the t means transformed so that means we took one model and we aligned it with another one all right so uh so that's fine we can you know we can go ahead and run this process this marker-based alignment is really fast because all it's doing is taking the the one model and then just sort of sliding it around or rotating it or maybe stretching it a little bit so that it fits with the the marker points that you've defined for the other model all right so when you're ready to go go ahead and hit ok and there you go that's the alignment process it really runs that that fast okay now at this point these uh these models should be pretty well aligned with each other and you can you know come over here to your uh to your dense point cloud and you can turn on this sort of uh you know show aligned uh models of you and uh play around with that and see how good of a job that it that it did okay so in the next step we're going to rebuild the elevation models so once we've aligned these uh these things it has updated the sparse point cloud and the dense point cloud okay it has not done anything to the dems or the ortho mosaics so we need to rebuild both of those products actually we don't need the ortho mosaics anymore so save yourself the time just rebuild your dems otherwise you won't get the the benefit of the alignment process there so we're going to rebuild the dems in fact i'll go ahead and start that process here so we're just going to remove the orthomosaics remove the dems that we built for both chunks and there we go okay now at this point i can rebuild my dems i'll go ahead and do that offline here and then i'll show you the dem differencing and the volume measurement sort of process from there all right so we've got our two chunks aligned from the different dates and now we're ready to do our volume calculation i don't think i mentioned this earlier but i picked these two dates for for a reason of course september 2021 is relatively recent but this october 2020 uh one that we're looking at here is nice because this eastern pad is is bare it's uh there's no wood chips on it so it gives us a good bare ground estimate or bare ground surface from which to to measure so we need to combine the the dem from 2020 of the bear pad with the dem from uh september of 2021 and we're going to do that with a with a dem difference so on our dem for for our september 2021 chunk right click on that and choose transform dem right make sure your coordinate system is set correctly you should have built your dem in a projected coordinate system anyway something with a linear unit like utm and then for our parameters we're going to choose calculate the difference and then we're going to select our dem from october 2020 we leave everything else the same and go ahead and click ok when it asks you to replace the default dem you want to say no otherwise it's going to overwrite the dem that you just created for september 2020. okay so here is our um yeah there we go our our dem difference layer okay and notice that uh metashape has helpfully labeled it dem so we're going to rename that to dem difference so we don't get confused all right and uh you can spend some time around here with the measurement tool and just click uh around here and look at the uh at the z uh difference so this is the elevation difference and what you want are numbers that are really close to zero so that's like negative 1.3 centimeters um and uh yeah so that's you know one tenth of a centimeter right so we're actually oops aligned pretty good here i should point out too with this measurement tool i'm clicking but if i if i click again with it then it's going to draw a line and give me the distance of the line so if i just hit the escape key after each one it resets it so that i can just get the the actual measurements um from from that point so that's what that's what i'm doing here um okay so most of my uh most of my elevations around this patter are are pretty close to zero i'm pretty happy with that um so from here then i wanna calculate the elevation of these uh of these wood chips so i'm gonna grab my polygon tool which is up here on the toolbar um i had to click the little arrow thing to open this up and i'm gonna choose draw polygon and i already had a polygon in here um let's let's draw hold on a second let's let's delete that polygon that's just a square it's not very uh inspired here so let's pick something else okay so now i'm going to just draw a polygon and what i'm trying to do is you know get relatively close to the pad uh i certainly don't want to put up a vertex or a point on any of the wood chips themselves right i want to try to keep this on that zero elevation area um it's okay to uh it's okay to cross uh the the boundary here uh we just don't want to put a vertex there um so now i'm gonna grab my navigation tool which is the pointer again and i'm gonna right click on this polygon i just made and choose measure and uh it's going to calculate this profile and each one of these things here corresponds to a to a point that i digitized for the polygon and and we want these to all be pretty close to you know to zero right so these are all within you know a few centimeters of zero so i'm feeling pretty good about that if i put one of these vertices uh on top of the of the pile or on an area that has seen a lot of change over the two dates then i'd get a big value there and then that that would potentially skew my volume results so if i click on the volume uh tab here then uh i have some options for the for the base plane one is to just you know say okay that that you know this is the you know choose the mean level of all of these points here um which should be fairly close to zero yeah it's four negative four millimeters in our case right that's pretty good i could choose a custom level and actually force it to be zero or i can just choose this best fit plane in which it's going to interpolate a surface underneath it all of these should give you really really similar results so we got three numbers here we've got the volume uh in cubic meters above this base plane we have the volume in cubic meters below the base plane uh and that would be like divots or or you know places in elevation that go sort of lower than than this zero value okay this is largely going to be just the you know within the the expected error of this uh uh of this model um or this measurement and then i've got a total volume which is the the volume above and then subtracting the volume below from it all right so quick way to get the volume estimates uh out of meta shape so uh so that's pretty much it for for this lab um should be pretty straightforward there's a lot of steps involved in uh in doing the alignment but um you know really as long as you can get some good uh photo identifiable markers on here that alignment process should work pretty well for you okay good luck [Music]
Info
Channel: Jason Karl
Views: 88
Rating: undefined out of 5
Keywords: drone, drone map, mapping, photogrammetry, structure from motion, SfM, Agisoft, Agisoft Metashape
Id: IhtcWXVETgM
Channel Id: undefined
Length: 20min 16sec (1216 seconds)
Published: Tue Nov 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.