Friday, June 28, 2013

More photosynth pictures

 A photosynth of all the current pictures with the square. It didn't join all of them together because there was too much gap between some of the photos, but with the ones it did join it looks pretty cool.

Who's ready for the jigsaw puzzle challenge?

I am issuing the Jigsaw Puzzle Piece Puzzle

Using only the image files in this zip file above, can you *recreate* the SAU map shown above?

Ideally, we want to stitch these together in Hugin using "normal" control points to connect the pieces, and ideally we should get out a perfectly flat map with no distortion. 

(Though if you want to put the puzzle pieces together yourself in the Gimp, or print them out and piece them together yourself, you could do that too.)

These couple tutorials may help:

Thursday, June 27, 2013

Field Work Day 1.....Complete!

Today we moved our brainstorming to action. We constructed an 8'x8' square to be placed near the surface of the stream. The square served the purpose of ensuring that horizontal and vertical lines were present in our pictures because these lines are necessary in our Hugin photo processing software. Upon arriving at our Duck Creek site, we were surprised to see how much the water level had risen and spread since the first time we visited almost two weeks ago. The high waters eliminated most of the sand bar banks that we had hoped to use for anchoring our square and accuracy test objects. We managed to anchor the square at the top of the banks but objects for the accuracy tests could not be placed at a point that they could be seen in each picture. The accuracy tests were intended to compare known distances of specific objects to the distance between them in pixels in order to determine a inches/pixel ratio after perspective correction. The differences between calculated ratios would be an indication of the accuracy of the perspective correction. We discussed the procedure of this method and came up with some ideas that we will use again and some ways to execute the project differently. Here's to hoping the water level lowers before our next trial run with field work!

A few more field day pictures...

Over the river and on the bridge...
Fieldwork: n. advanced puppetry exercises with extra long strings

Hugin seems to work sometimes, we're struggling with getting all of the pictures to correct and wish we had more known values in our stream to check our results with, but here is an example picture turning into bank.  I did a picture taken close to our square.  Michelle created a cool one from the bridge that shows a lot more bank.  Hugin is still looking promising, but is very frustrating....

Example of Hugin correcting picture


My first attempt at photosynth after only a couple minutes I was able to upload a photo of the test stream. You can view it by going to the link The username and password is the same for the flickr account. By this evidence I think that photosynth might actually be useful, although it has only two features: making panoramas and synth(a synth is basically a panorama except not connected together) so it is limited there.

Field Day Pictures!

Almost into the water, this wasn't easy....

Tying up the square
The square floating on the stream

Wednesday, June 26, 2013

Summary of Article 1

The article I read titled "Photogrammetric monitoring of small streams under a riparian forest canopy" had a lot of interesting information regarding their approach to studying stream outlines in a similar manner that we are. The study showed that high resolution digital elevation models can be created from close range stereo imagery of pictures taken 10m above the stream with a unipod. As we suspected, they did post-processing to eliminate perspective and other distortions of the picture images. The platform utilized minimized perspective distortion which, as we have seen through our struggles with Hugin, is a very appealing option.
Specifically, this study used Leica Photogrammetry Suite 9.2 and ERDAS Stereoanalyst to obtain 3D and/or stereroimagery of the stream.
Two parts of the study that especially caught my attention were the use of additional ground control points for vertical and horizontal lines and the suggestion to take pictures on an overcast day to eliminate reflections of the water.
Overall, I think the best part about this paper is the vast number of sources used that we can further explore to enhance our understanding of the struggles and triumphs of as many different procedures as possible.  

Yankee Screwdrivers were new for everybody!
Our 8 ft by 8 ft square, no it doesn't fit through regular doors... (can go from Hayes 002 to Hayes 003 though)

JAVA Programming

Today I wrote a program using the Netbeans IDE to scan through a JPG image and record the (x,y) location of a specifically colored pixel into a log file.  For now that is all the program is doing, but I believe that this program can be extended to include an array of the colored pixels in order to manipulate the pixels to find the distance between pixels.

Menards Trip

We agreed on a method that we think may be the most efficient in capturing data. We chose to build a square to bring to the stream for pictures. The square within the pictures can then be used to mark horizontal and vertical lines in Hugin which performs a perspective correction. This idea was based largely off the tile sqaure "river" we made in the lab. We found some wood, screws, and metal supports to construct the square. I'm excited to do a trial build and then take our creation to the streams to see if this method will work.

Tuesday, June 25, 2013

Let's try to become hugin experts, shall we?

Since it seems like we might be getting serious about using Hugin for the "real deal", it will probably behoove you all to become more familiar with its uses.  It actually has a surprising amount of documentation and tutorials (for a free open source project).

First, you should probably learn about the typical/normal use of hugin - stitching a couple different photos together in order to create a larger photo or 360 degree panorama.  For the basics, look at the first 2 or 3 tutorials on this page:

But what we're trying to do is closer to a "photo-mosaic" than it is to a "panorama".

These three tutorials seem particularly relevant, though it may not cover everything that we will need to do.





Some thoughts for moving forward.

1) it appears to be important that the control points for stitching the photos together all lie on the same plane -- e.g., close to the the water's surface.  I'm not sure if the control points for the vertical and horizontal line segments also need to be on this plane, or if it's good enough that they're on a plane parallel to it.

2) I think we need to calibrate the cameras, so that we can settle the "v" (camera's horizontal field of view) and "b" (barrel distortion) parameters permanently, and get more consistent/accurate optimization results thereafter.  There seem to be a couple of approaches to calibration, but we probably should try to take several photos of a nice regular grid.  Or maybe some of our floor tile shots would be good enough, if they cover enough of the picture and the lines between tiles are dark enough to see.

Finally, here's some general information about different projections, in case you're curious what terms like "rectilinear" and "equirectilinear" mean...

All this said, I think it's important that some of us more deeply explore the various 3D stereo and 3D point-cloud modeling type software programs, in case they provide a better method than photo-stitching software like Hugin.
Since we've decided to build a square to place in our pictures, I tried correcting red-DSCN0032.jpg using only a square from the floor with Hugin.  I tried with two different squares and got decent results.  I don't think it's as good as the longer lines, but it seemed to mostly work.

Some next steps:
1) Once we get the lens calibration done, it might be a lot better.  I think there is a tutorial for this.
2) We need to work out how we quantify the error from the pictures, maybe the same method we'll use at the stream, or maybe something more suited to all the information we have about our gridded stream.
We had an exciting power outage today, which prompted an impromptu trip to Menard's.  Here's a picture.
Menard's trip

Saturday, June 22, 2013


I was going over a few of the MATLAB tutorials today and I realize that when working with arrays the techniques and strategies are completely different than from Java and that problems which are easy to solve in Java are difficult in MATLAB.  I enjoy that my programming experience helps me with MATLAB but I still have to learn new syntax to prevail.

Friday, June 21, 2013

Finished working on the concentric square image in Matlab, I did it the hard way by going in and then out but nonetheless I finished it with over a hundred lines of code.

Wikipedia Articles

In reading through the four articles I found it interesting that even though we can quantify and represent colors through their RGB values this method sometimes leaves room for questions.  For example these values were ascertained through how humans are able to perceive color and this can lead to wondering whether or not we correctly established what color is what.  Meaning that it is possible that what we perceive as red could actually be another color altogether.  In reading through the perspective articles I am reminded of an art project I had when I was in junior high which allowed for buildings and sidewalks to appear to grow farther away.  This brings better into focus just how difficult it will be to adjust for distortion, and perspective bias when taking photos of the stream.

Research Articles

As I was researching some articles this morning I found that a large majority of studies that were comparable to ours in terms of the overall goal used aerial photography. These studies said that it was a costly yet accurate method. Other studies used the perspective tool in GIMP and photoshop but were unsure how accurate that method was.

After exploring some software I found that it may be more helpful (especially with the many that deal with 3D imaging) to take pictures of the streams first so we have objects in more than one dimension.

I did find one study that seemed like it would be a great resource for us to use in terms of methods and analyzing data. The link is below but I will read more about it and share anything that seems relevant.

New software

I found a new panorama program that might be useful if anybody wants to try it out, I actually haven't yet. It's called Photosynth and it's made by Microsoft.Photosynth Apparently it has two features, it can create a basic panorama or it can create something it calls a synth, which is basically a more complex panorama that you can manipulate.

Thursday, June 20, 2013

New software

I was looking around on the internet for some software that might be relevent to our projectand found a program that specifically does photogrammetry. It's called Photomodeler and it is capable of taking a couple of images of a certain object, in my case a wooden chest, and putting together a 3D model from them. After working with the tutorial for a couple of hours I finally was able to put together the same 3D model as in the video. Given I had to restart the program numerous times in the beginning to get it working and I was only using the photos the demo provided, but nevertheless I succeeded in getting it to produce the correct 3D image.


Today I spent the majority of my time looking at a new piece of software called uPhotoMeasure which has been recommended by NASA and cNET.  This software allows measurements to be taken from photographs once a scale in the picture has been ascertained.
The above photograph is a picture of the tape stream outline which we taped on the floor to practice identifying the stream outlines.  You can see a 1X1 square by the top-right corner of the image which has been used as a scale to measure all other parts of the photograph.  This program has applications where straight line, circular, and square measurements are needed, however, when looking to measure a curving stream it might not have a good application. This program came with a seven day free trial because the full version costs $250.

Proof that Hugin can correct perspective (at least in some cases)

I realize Hugin wasn't the best experience (kind of a pain, not always intuitive, and didn't always work for unknown reasons).

But... I wanted people to know that it isn't a complete waste.  It *can* do perspective correction decently well, at least in some cases, although sometimes it took a little fiddling with settings on my part.

Each of the following used about 7-9 carefully placed control points (horizontal and vertical line segments).  I had to optimize several times, and sometimes I had to "reset" the
"camera and lens" settings if the optimizer got too far off on choosing lens parameters. Also, you need to follow the tutorial closely, in terms of setting the output to be rectilinear, etc.

1. Before


2. Before

2. After (def. not perfect -- see top horizontal line)

3. Before

3.  After

I also tried to get Hugin to combine a panorama out of several shots from the silver camera, but this failed.  However, I think Kyle got Hugin to successfully do a panorama of something.
Kyle's image combination

It could be that we'll need to be careful to have plenty of overlap when we take pictures, to get generate a good panoramic/combined image.  It could also be that the settings need to be different when the camera position moved between shots, not just the angle the camera was pointing.


Using Matlab for the first time sounded a lot scarier than it was. I never thought I would be able to write codes to carry out a function let alone create a picture (especially after working in the IT department and just being able to take advantage of the already written codes). I found that computer programming can be very frustrating but it can also be very advantageous to utilize once a person knows what they are doing. I love the fact that it is trial an error and that you can make a mistake without creating huge problems. It can be tested and re-tested until it is right. I found myself actually enjoying computer programming and beginning to brainstorm how this could be useful in our project.

Wednesday, June 19, 2013

Research thoughts

  Today was the first day I ever used MATLAB and the first day I ever programmed for that matter. After awhile I finally got the hang of it and actually started to enjoy programming, not that I aspire to become a programmer such as my Dad, but that I appreciate having some of the fundamentals down and look forward to using it some more.


We had a frustrating morning trying to figure out some photo software, but the afternoon went better with an introduction to MATLAB coding.

Learning to code in MATLAB

Tuesday, June 18, 2013

Research Thoughts

When considering how to identify the outline of a stream I find myself wondering how to lessen image distortion, how to better make a grid so as to extrapolate that to a larger scale to create a map.  It seems that in an attempt to answer one question soo many other subsequent subset questions must be answered first which will allow for the research to end up answering many differing subject areas instead of just the stream outline.


As a first time GIMP user I fully understand the reason people need four years of schooling to learn about photography :)
I am hoping the tape "stream" we made can give us some insight into the distortions of the camera, how various angles/distances effect how the dimensions are percieved, and assist in providing us with an idea of how to create a scale to accurately represent the dimensions of the stream in comparison to the pictures.

6/18/13 Pictures

Mandelbrot's Self-Similarity paper was discussed, SohCahToa was used, excel was explored, rulers were needed...


We put down a fake stream outline using the floor tiles as a grid.
The cameras arrived!

Day 1

After brainstorming some ideas we visited a site at duck creek to get a better idea of what we were working with. The creek was much wider than we had imagined causing us to re-think some of the potential techniques we came up with.

Monday, June 17, 2013

Potentially Helpful Software

AutoStitch (

  • Allows many pictures of the panoramic nature to be stitched together which may look like a possible avenue for this project
  • Unfortunately this program is not free it comes with a demo though.

PicSlice (

  • Allows you to slice, crop and resize an image all from a browser friendly site

6/17/13 in Pictures

Smiles at Duck Creek's bridge
Looking at Duck Creek

Northern Water Snake

Duck Creek...

Monday, June 10, 2013


If you are reading this, you are probably a summer research student, who is being requested to blog here, a friend or family member of said student interested in what we are doing, or you have perhaps mistakenly been directed here by some obscure google query.  In any case, enjoy!

The purpose of this blog is to help us (a summer research group at St. Ambrose University) stay organized and informed of our progress during the summer program.  This summer we will be investigating methods of measuring small stream outlines focusing on photogrammetric methods and comparing these to more direct measuring techniques.

We hope you enjoy our blog! ~Susa

Photogrammetry: Collecting measurements/scientific data from photographs