Forum

Author Topic: Troubles while scanning back of my house(For Freshman 3D Modeling Class)  (Read 10180 times)

TheBlueBear

  • Newbie
  • *
  • Posts: 8
    • View Profile
I was trying to scan the back of my house today to get more familiar with the program for my 3D modeling class. I first went out and took 16 photos of the back in a semi circle motion. After that I came inside and put the photos into my computer. I ran everything at high settings and it came out with this model.



I thought it was a very good model so I decided to go back out and take more photos this time going around the side of the house and onto the porch. I ended up with 53 photos in total. I created a new project within agisoft and started it up again. This time it did not go so well. I ended up with this model.



The quality on all of the photos was between .7 and 1.3 and they all had an iso of 100. I took them using a 6 foot tripod and the download for all of the photos and the projects I will put below.

The Photos:
https://www.dropbox.com/s/lfhgt28noxb3x5i/BackHousePhotos.zip?dl=0

The First Model(Successful):
https://www.dropbox.com/s/60pd5jnpfha22ez/Working16Pics.psz?dl=0

The Second Model(Failed):
https://www.dropbox.com/s/d9u9yo2kbazh99f/NotWorking53Pics.psz?dl=0

Marcel

  • Sr. Member
  • ****
  • Posts: 309
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #1 on: December 01, 2014, 12:45:00 PM »
If you are photographing only a single row of images than it's hard for Photoscan to do a correct alignment.

Try photographing multiple 'rows'. This way, the features Photoscan can use to align the images are always visible in multiple photos. So photograph one row with the tripod at the lowest setting, one row at medium setting and one row with the tripod at the highest setting. Try to keep the distance to the house the same.

Of course you will have to setup your camera for maximum quality

- low ISO like ISO 100
- aperture bigger than F8 for a deeper depth of field
- use a remote release cord or timer so you don't wobble the camera when pressing the shutter release.

Search the forum for more information on camera settings.

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #2 on: December 01, 2014, 01:58:00 PM »
I managed to align 47 out of your 53 images, uploaded the psz file here: https://www.dropbox.com/sh/i4r3hxy3k037qtz/AABndR9FgYMPjT9k2hpCx1D4a?dl=0

My main suggestion would be to use a shorter focal length (wider fov) such as 18mm if your lens goes there, as you are limited for space it is hard to get back far enough to see alot of stuff, which is useful for getting the necessary overlap (at the expense of detail/resolution).

The 6 images that would not align were of the bbq area where there is just not enough overlap. Every point in your scene that you want to reconstruct in 3d needs to be clearly visible in at least 3 photos taken from different positions, but not so different that the object is unrecognisable in the different images.

The photos by the french doors you have practically stood in the same spot and turned around without moving much, which is very bad for reconstruction quality. You need to be a bit creative with your angles and positions to make sure you capture everything from different positions in those situations.

As marcel suggested taking more than one row of photos helps. You could achieve this easily enough by doing one row standing up and another squatting down.

Just keep practicing to find out what works. Taking photos from the right places to get them to align is only the first stage. After that you need to look at ways to improve the quality of the images to extract any detail, by using tripods and/or appropriate camera settings etc as suggested by marcel, and further fine tuning where you put the camera.

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #3 on: December 01, 2014, 02:04:23 PM »
And i forgot the most important part - how i aligned the images!

When you have a tricky photoset like this one, chuck all the photos in a single chunk, and run align images.

The chances are you will get a big mess, but hopefully some of the images will look like they are aligned with some relation to reality.

Use the selection tools to select all of the cameras in the scene, except for a few that look well aligned to each other, then right click and select 'reset camera alignment'.

Now whats left should look ok, based on the camera positions and sparse point cloud. If not, reset a few more camera alignments until the sparse point cloud looks appropriate, and the remaining cameras look in the right places.

Now select a few of the cameras whose alignment you reset, which are nearest to the ones that are correctly aligned, and select 'align selected cameras'.

Hopefully it will put them in the right place! If not, reset the alignment and try aligning some other images.

It worked for me.

Our company takes on this kind of work all over the US, but being based in the UK i generally have to get other people to take the images, so what i get back is generally not great and i have to do this kind of thing alot...

TheBlueBear

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #4 on: December 03, 2014, 06:00:10 AM »
Marcel and James,

First, Thank you. Thank you. Also, before I forget Thank you.

I appreciate your advice and want to make certain that I understand it. FYI… I don’t specifically care about modeling my house. I am using it primarily as practice. I would like to model endangered civil rights sites as an historical record in case they collapse (but that would probably be separate from my high school class).

Marcel: “Try photographing multiple 'rows'. This way, the features Photoscan can use to align the images are always visible in multiple photos. So photograph one row with the tripod at the lowest setting, one row at medium setting and one row with the tripod at the highest setting. Try to keep the distance to the house the same.”
Just to be clear, by lowest, medium and highest, you are talking about the height of the tripod and nothing related to image quality, correct? That is, all pictures are from the same row but there should be three sets taken at different heights? If so, could I get close up detail by just zooming it?

My first set of 16 pictures were basically from single row (with the same height). These pictures aligned, but there were two problems (that I hoped to correct by simply taking more pictures). First, I wanted more close up detail for when you zoom in on the model. I saw an Agisoft face model where you can see individual pores in the face. I would look to be able to do this level of detail in a building (and was hoping I could do it with just one camera as buildings don’t move). Second, the bushes were partially blocking the building (and the model of the back of the bushes was very blotchy/didn’t really exist). I thought I needed more angles of the bushes. (I would prefer that they weren’t even there)

The pictures were taken at 100 ISO. I am not really certain what aperture means but will look it up. Maybe I need a new lens for a “bigger than F8”. I was thinking that because Agisoft reported an image quality between .7 and 1.3, it meant everything was OK. Is that not the case?

James: Wow. Just wow. Thanks for aligning the pictures. Wow.

Your point on shorter focal length… Again I am going to need to look this up to understand it. Is a shorter focal length always your suggestion or simply here because of space?

If I want close up detail (like pores in a face), does that mean I have to take many, many pictures in order for there to be overlap? I am concerned that the images may be too similar (for example nearly identical shingles in a house) and Agisoft would quickly get confused on how to align the pictures?

Your advice on how to align the pictures is massive! I am going to try your suggestions to see if I can do it myself. Thanks.

Finally, there was a time gap between pictures being taken (30 minutes?). Does that matter?
Thanks. Thanks. Thanks.

One last point, I am having a bit of trouble downloading the file you posted to Dropbox. It says that it was unable to open the file. Is the problem on my end or do you think there may be something wrong with the file.
 

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #5 on: December 03, 2014, 01:26:37 PM »
I've always found using the shortest focal length available is the best way to ensure loads of overlap and a reliable photo alignment, even using an 10mm ultrawide lens (http://www.agisoft.com/forum/index.php?topic=2458.msg13053#msg13053). We do almost exclusively architectural stuff where we are generally forced closer than we would like to be due to either tight internal spaces, or foliage/property boundaries etc on the exterior.

The people doing face and body scanning seem to go for longer focal lengths, like 35-50mm presumably because the cameras need to be further back to allow the subject to actually get in to the scanning area, whilst still getting high resolution. I 'think' the people doing 'traditional' aerial photogrammetry also use longer focal lengths, presumably to do with the altitude they fly at, but i haven't looked much into that.

All things being equal, then perhaps a more 'normal' focal length like 30-50mm would improve reconstruction quality, but if you can't get far back then, as you suggest, you may end up taking way more photos than you want to have to deal with to get the required amount of overlap.

Unless the building is brand new, extremely well maintained or a bit shiny, then you rarely have to worry about the images looking too similar or being confusing. So long as your images are sharp, then photoscan will invariably do a surprisingly good job of differentiating between things that otherwise look identical.

The timing gap is not necessarily critical. Photoscan will match features between images taken in completely different lighting situations very robustly, but if the difference is too great it may have a negative impact on your final texture or orthophoto output. You can use a white balance grey card to try and maintain consistent exposure and colour if you are shooting over a long period of time, or make corrections in photoshop/lightroom etc afterwards, easier if you shoot raw files instead of just jpg. The biggest problem i find is when shooting in natural light on a breezy and partially cloudy day and half of the photos are in warm (reddish) direct sun, and half are in cold (blueish) shade. Plus even if you get the colours to match, half of the photos have shadows and half don't and you just want to go home.

The problem you are having opening the psz file may be because i created it in the beta pre-release version 1.1, which you can download here: http://www.agisoft.com/forum/index.php?topic=2883.0

Or you can try this file, saved down to 1.0.0 format: https://www.dropbox.com/s/a4kypbvim98fzbn/house1.0.psz?dl=0

If you want to read up on camera terminology and techniques etc, i.e. white balance, focal length, aperture etc then this is the best resource i have found so far, in terms of starting right at the beginning and going pretty advanced: http://www.cambridgeincolour.com/tutorials.htm

TheBlueBear

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #6 on: December 04, 2014, 04:05:51 AM »
James: Thanks. I followed your instructions on how to align photos and it worked much, much better. I slightly changed your approach. I aligned the first 16 photos/1st "row" first and then added more photos for alignment. It seems that aligning after each “row” works at least for me. I suspect (but don’t know) that I can just keep adding rows to get more pictures aligned properly.
Also, I was able to open the new file that you posted but I wasn’t able to create a model from it. I did create a model using my original pictures and your alignment advice. It is much better but still a world away from some models that I have seen of faces.
Do you have any sense of why I am not getting their impressive results?
Is it because I don't have enough pictures as a house is a hundred+ times bigger than a face? If "pore level" detail for a face requires 100 pictures, do I need several hundred (or more) for a house? (I know this may be overkill but I want to practice for more important buildings.) Is it the quality of the pictures? Am I fooling myself when I think that just because Agisoft gives a picture a quality score near 1 that means everything is OK? Do you get really high Agisoft quality scores… or at a certain point does it not matter/doesn’t indicate if you will get “pore level” detail?
Is the reason that I am not getting really impressive results more due to the dense cloud… and not deleting incorrect points? Is it from not masking the pictures? Is it all above? If so, any suggestion on what I should focus on improving first for the most improvement?
Right now, I think that the first step to a better model is more pictures aligned in steps by row. I could do that tomorrow. Then I should think about if there is a better way to use the Agisoft software (delete points in cloud, etc..). After that, I should focus on trying to get better pictures as I may need a new lens for that. Are better pictures the more important thing and I should focus there first? Again thanks.
Final question (s): When you make a 3d model of a building, do you model the entire exterior of the building at once or do you do it in parts (front, back, roof, etc) and then combine? Do you model the interior separately from the interior and then combine the models? Do you model rooms separately? If you are combining models, what do you use to combine them?
Again, thanks.

Kiesel

  • Sr. Member
  • ****
  • Posts: 332
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #7 on: December 06, 2014, 01:09:09 PM »
TheBluebear

To your question:
Quote
It is much better but still a world away from some models that I have seen of faces.
Do you have any sense of why I am not getting their impressive results?

At first it is a question of resolution of the used photos and with resolution I don't mean the Megapixel of your camera but the GSD (ground sample distance see http://en.wikipedia.org/wiki/Ground_sample_distance) you get on your object/subject. In body scanning there are aiming 6 or more cameras to the little area of a human face so they get a GSD of 0.1 mm or better for each pixel. And even then the results are not so impressive as what you have seen. Search for results of raw scans as they came out from PhotoScan to see the quality you can get with it. And second the results you have in mind are a product of a special workflow in third party programm packages like Zbrush to improve the results from PhotoScan.

But you don't need the same resolution for the scanning of facades, one to five millimeters GSD are enough if you want to see details of 2 mm to 1 cm (you need (a little less than) two pixels to see a difference in contrast, like an edge, in your image).
On the other hand facades are very different, PhotoScan "likes" texture rich old fashioned stone facades but "dislike" texture less, even or shiny modern steel-glass facades (even laserscanners have difficulties which such facades) at all. For the modern facades you can go for example with rectified images, classical photogrammetry packages where you have to pick every point of interest in every image or/and a total station.

Karsten
« Last Edit: December 06, 2014, 03:49:12 PM by Kiesel »

TheBlueBear

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #8 on: December 11, 2014, 05:52:32 AM »
Kiesel. Thank you. That makes a lot of sense but I am still a little confused.
You mentioned 6 cameras on a face being related to a GSD of 0.1 mm.
Frankly, I don't really understand how Agisoft selects which image (or pixel) to use when the same area is covered by multiple photographs. Am I correct to think that each pixel on a face (or building) comes from one picture? If so, is GSD largely determined by the resolution of the photograph that was chosen?  (For a given pixel, it doesn't matter if that space of the face was found in 6, 10 or 20 photos. Agisoft picks the "best" pixel from one picture?)
I was thinking that Agisoft uses all of the pictures to build the 3d model but it doesn't "blend" pixels from the pictures to decide what goes into the chosen texture.
Again, thanks.

Kiesel

  • Sr. Member
  • ****
  • Posts: 332
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #9 on: December 12, 2014, 01:19:41 AM »
TheBlueBear

The example of face scanning was only used because you used it at reference for scanning quality.

Quote
You mentioned 6 cameras on a face being related to a GSD of 0.1 mm.

No, it is the photographed (scanned) area. For example a Canon EOS 1200D/REBEL T5 has a sensor resolution of 5184x3456 Pixel, so if you photograph an area of 500 x 340 mm, a little bit more than a human face, you get a GSD of around 0,1mm, 10 pixel on the sensor for every mm in object size. So you can choose the GSD by focal length (wide angle, normal, tele, makro lens) and distance from camera to subject/object.

The use of 6 or more cameras has nothing to do with the resolution you will get. But the more cameras are used to scan the same area the better is the modeling, because you have more ray intersections from the six cameras than from only two and PhotoScan can build a better mathematical model of the scene. A good photo shooting technique, shooting more than one row, one from below, one from normal position and one from above, good overlap, good intersection and adding some left and/or right rolled photos can help PhotoScan a lot. See also the manual of Agisoft Lens for that.


Quote
Frankly, I don't really understand how Agisoft selects which image (or pixel) to use when the same area is covered by multiple photographs.

For this Photoscan use something like SIFT (see http://de.wikipedia.org/wiki/Scale-invariant_feature_transform). At first it generates keypoints for every image and then compare these points from image to image. From the common points it can calculate the camera calibration, the positions of the cameras and the sparse point cloud. All this is done in the Align step. But this is nothing you have to think about just let PhotoScan do the math  ;). But you can help PhotoScan a lot with the photos you shot see above.

Karsten

« Last Edit: December 12, 2014, 09:26:30 AM by Kiesel »

TheBlueBear

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #10 on: December 21, 2014, 02:15:59 AM »
Appropriate Lens based on advice?
I am trying to incorporate the advice I received into a lens purchase but I am a little confused. Specifically, it was suggested that I use:
"- aperture bigger than F8 for a deeper depth of field" (does smaller F mean "bigger"?) and
"using an 10mm ultrawide lens"
I was thinking that the lens linked below may be the right one for me (given its relatively low cost and the above advice)

http://www.amazon.com/dp/B00K899B9Y/ref=psdc_499248_t3_B0002Y5WXE

Am I right? The F appears to be "f/4.5-5.6". Is that "bigger" than F8 and good for Agisoft?
Separately, Karsten suggested "adding some left and/or right rolled photos can help PhotoScan a lot." Does anyone know what a rolled photo is? Also, Karsten suggested reading the "Agisoft Lens" manual. It did not see this manual in the manual download section. Does anyone know how to get it?
Thanks. Thanks. Thanks.

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #11 on: December 21, 2014, 12:00:05 PM »
TheBlueBear

Sorry I went quiet for a while there, work went a bit mad and then christmas started happening (and continues to happen)

What marcel means by bigger than f8 is an f Number greater than f8, which corresponds to a physically smaller aperture, and greater depth of field in the photo, which means you can get more stuff acceptably in focus in any given photo, i.e. less blurry background and foreground.

I've not yet seen any lens that wouldn't go to f22, but you will probably have best results around f11/f13 since reducing the physical aperture size reduces the amount of light reaching the sensor which you will need to compensate for with a longer exposure and possibly tripod, as well as introducing diffraction which can slightly soften the photo even in the areas that should be in focus.

http://www.cambridgeincolour.com/tutorials/depth-of-field.htm

I couldn't comment on that specific lens but i'm sure it's better than my ancient tamron 10-24mm, and i hesitate to mention his name but ken rockwell says it is optically superb http://kenrockwell.com/canon/lenses/10-18mm.htm, but i only remember one lens that he didn't say that about, which i used exclusively for ages and had no problem with!

I think Karsten must mean using images in both portrait and landscape orientation, which i think helps in calculating the lens distortion parameters more accurately, which is good. I used photomodeler briefly for a while and i remember they recommended doing that, although i hadn't seen it mentioned here before.

If you install photoscan 1.1 then you should get agisoft lens installed automatically along with it, then you can run it and look at the help contents! I must admit i haven't used lens for ages, partly because photoscan seems to work well enough for me without getting into that, and partly because most of the photos i work with are taken with cameras i never get to lay my hands on anyway...

James

TheBlueBear

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #12 on: December 21, 2014, 10:37:14 PM »
James
Thank you for clearing up my confusion about "F" numbers.  I am not certain why you hesitate to mention Ken Rockwell but it seems that he is able to do what I want (10mm focal length/ 10ish F score/100 ISO) with the lens. Or, at least that is what I think I want based upon how I read the advice. Thanks for giving the link.
I have not installed Photoscan 1.1 as Agisoft says that it is "considered as unstable". As I don't know the software that well, I wouldn't really know if I was doing something wrong or if there was a problem with the software.
Again, thanks for your help.

Kiesel

  • Sr. Member
  • ****
  • Posts: 332
    • View Profile
Re: Troubles while scanning back of my house(For Freshman 3D Modeling Class)
« Reply #13 on: December 22, 2014, 07:37:00 PM »
Quote
I think Karsten must mean using images in both portrait and landscape orientation, which i think helps in calculating the lens distortion parameters more accurately, which is good.
Yes this was meant, thank you James for clarifying and sorry for confusing you BlueBear.
Normally you don't need Agisoft Lens if you shot as suggested by Marcel, James and me, it was just mentioned as how to shot for good camera calibration. You can download the manual of Agisoft Lens at: http://downloads.agisoft.ru/lens/doc/en/lens.pdf (and the mix of portrait and landscape orientated photos isn't mentioned but is generally a good advise for camera calibration)

Twenty years ago best lenses for photogrammetry are rock solid prime lenses especially designed and manufactured for photogrammetry where you was able to lock the focus in some steps so that the optic was as stable as possible when working with one focus distance. After calibration for each focus step you was able to use it for photogrammetry. Nowadays you can work with normal lenses even zoom lenses but keep in mind what is best for photogrammetry.
I also have bought a Canon EF-S 10-18mm 1:4,5-5,6 IS and testing it currently, nice little lens with good price for situations where there is very little space for shooting. When you using zoom lenses, like this one, make sure you use it at only one focal length for every group of photos, for that tape the zoom that it can't change its focal length for this group of photos. Even better is to leave also focusing the same (manual focusing taped) so you have nearly "constant" relations and there is nothing changing inside your lens for one group. On the other side, if necessary, you can use different focal lengths groups, even different lenses for one object.  PhotoScan will sort the different focal length groups and will calculate for every group the unique camera calibration parameters. I hope this makes sense to you.



Karsten
« Last Edit: December 23, 2014, 01:00:11 PM by Kiesel »