The View Up Here

Random scribblings about kites, photography, machining, and anything else

Archive for the ‘Software’ Category

Video Production

Posted by Tom Benedict on 22/06/2011

Back in the 80’s there was a great series in Dragon Magazine called Snarf Quest. I liked it so much I wound up getting the compilation. It’s still one of my faves. There’s this great scene where Snarf, who is spending a year trying to accumulate enough wealth and fame to claim the title of king of his village, finally realizes he’s in way over his head. In the last frame his friend is explaining that all they have to do is… and Snarf is thinking, “Ya gettin’ in deep, man!”

That one frame explains my descent into the world of video production. “Descent” is probably the wrong term since it’s actually pretty darned cool. But it’s the only word I could come up with that jives with the whole drowning feeling that keeps coming over me.

Here’s a f’rinstance: I know video (and audio, since they go hand-in-hand) is more involved than still photography. Even so, I marvel at how few still photo formats there are compared to the almost limitless supply of audio and video codecs, container formats, compression algorithms, yadda yadda yadda. The only real format debate in the still photography world is RAW vs. JPG, and that has to do with how the files are initially created. Outputs are typically JPG (web world and print world) or TIFF (hard core print world). Video? Cripes, take your pick. Depending on the situation there are dozens of choices to make.

For software, my choices came down to this: I need to do the work on a Windows PC. I need to work with a number of HD file formats. I need to be able to export HD video files for use on a web server. I need to be able to export DVD quality or better videos. Ideally I need enough tools available to deal with kite aerial videos, which tend to be jittery from camera motion.

After some hemming and hawing, asking of friends, and poking around at the software that was already installed on my computer, I gave PowerDirector 9 a try. I liked it, it fit the need, so I got it. I’m sure there are those who will say I missed package X, Y, or Z, which is clearly superior. Sure! And when you enter my esoteric world of CNC cutting strategies I’ll chortle at your XZ pocketing and tell you how in your case contour-parallel was clearly superior. Whatever… Both make holes in parts, and PowerDirector 9 fits the bill.

I’ve got almost all the footage I need to finish the Push N8 video, and now I have the software as well. Over the next couple of days I hope to make my first rough cut. If the learning curve isn’t too steep on PD9, I plan to be finished and off on my next adventure in the following weeks.

– Tom

Advertisements

Posted in Kite Aerial Photography, N8 Push, Software | 1 Comment »

Panorama Workflow

Posted by Tom Benedict on 23/07/2010

I’ve had some opportunities to play with my camera on the ground as well as in the air, and to test a number of image sets on the software I’ve been using.  Two days ago my wife and I took our kids to Pololu Valley to go hiking.  On the off-chance the weather would be nice, I brought my KAP gear.  The weather was fantastic, with solid winds for kite flying, and beautiful partly-cloudy skies.  Time to play!

I ran about 5GB of images through the camera from various vantage points.  In creating the base images I tried to incorporate everything I had learned from the earlier experiments.  The resulting photographs turned out quite well, so I’m considering the new workflow to be a win.  I’m sharing it here in the hopes that someone else doing kite aerial photography will give it a try and take it even further.  Here are the details:

  • If you can shoot RAW, shoot RAW.  I can’t, but in the near future I’ll be able to.
  • Use Manual Exposure mode on your camera.  Set it on the ground, check it, and double-check the histograms to make sure you’re getting bullseye exposures.
  • Use at least 1/1000 second exposure speed.  I’m using 1/1250.
  • Use the slowest ISO setting you can to control noise.  This is of less concern with a DSLR, but every bit helps.  I made this set at ISO 80.
  • Use the sweet-spot aperture on your lens if possible.  My lens is sharpest around f/4 to f/5.  I couldn’t use this aperture and hold the other numbers, so my lens is wider than ideal.  But the benefits in noise at ISO 80 make this a reasonable choice.  I give up some sharpness for lower noise, and keep the fast exposure speed to avoid blur.

Once the camera is in the air, all my panoramas were made with the camera vertical.  With a KAP rig this either means building the rig around a vertical camera (Brooxes BEAK rig), or using an L-bracket on a conventional rig, or having a dedicated Horizontal/Vertical axis on the rig.  I recently modified my rig to add the HoVer axis, so this is the route I went.

The idea with this technique is to start the rig on a slow spin, and to trigger the shutter continuously.  This technique was developed by a French KAPer who goes by the name of Vertigo on the KAP forums.  With a sufficiently fast shutter speed, this works perfectly.  My A650IS does one frame every 1.1 seconds.  With a 10-second-per-rev rotation rate, this works out about perfectly.  I’m upgrading to a Canon EOS T2i DSLR in the near future, which has a much faster frame rate.  I’m planning to build an electronic release cable for this camera that will give me the same 1-frame-per-second rate my A650IS has so I can continue to use this technique.

  • Start the rig rotating at a rate that gives you adequate overlap between images, and minimizes motion blur from the rotation, given the camera’s shutter speed.
  • Once the camera is rotating cleanly (no see-sawing on rotation, no jerkiness in the pan axis, no swinging around, etc.) trip the shutter.
  • Make at least two complete orbits of the camera, tripping the shutter non-stop the entire time.  This is for a couple of reasons:  First, it gives you plenty of frames to choose from in case one is blurry.  Next, it gives you a range of random tilt angles that you can use to fill in gaps later on.  Finally, if the rig starts to move, the second orbit will still produce a clean panorama.
  • If you want to make a larger panorama, change the tilt after two orbits and make two more orbits at the new tilt value.
  • While all of this is going on, do everything you can to minimize camera motion.

This should produce a nice set of images from which to work.  You may well end up using them all, so don’t toss any of them!

I use Autopano Pro for stitching.  Some of the tricks I’ve picked up will apply to other packages.  But if you find yourself scratching your head and thinking, “No, I’ve never seen that,” don’t sweat it.  Your software is different.  Skip that part.

One of the first problems I ran into is that Autopano Pro deals really well with point features, but not very well at all with linear features.  For example, it’ll match up individual stones on a beach like a champ, but it will produce lousy horizons if the horizon is just water and sky.  It makes no effort whatsoever to correct for lens distortions if the bulk of the picture is water and sky.

The fix I found was to use PTLens to correct lens distortions before using Autopano Pro.  PTLens is a $25 plug-in for Photoshop.  Even better, it’ll run as a stand-alone program and will batch process hundreds or even thousands of images at once.  If you’ve got a block of images you photographed as fodder for panorama stitching software, it’s no problem at all to batch process them all to remove lens distortions.  Water horizons should now be ramrod-straight lines across the frame.

So back to the process:

  • Run the entire image set through PTLens to remove barrel distortion, vignetting, and chromatic aberrations, but nothing else.
  • Process the images with Autopano Pro, or the panorama software of your choice.
  • Do everything you can to get completely horizontal, completely straight horizons for water.  Nothing kills a pano faster than a grossly errant horizon.
  • Save as 16-bit TIFF images.  16-bit workflow can be a real PITA, especially on a smaller machine, but it hides a lot of ills when it comes to large-scale processing like Levels and Curves.

At this point I open up the images in Photoshop.  I’m still using Photoshop 7.  I’ll upgrade to CS5 as soon as I can afford it.  But for now it still does everything I need.  Want is a whole ‘nuther story, but as far as my needs go, it’s fine.

  • View 100% and check for stitching errors.  Repair all of these with the rubber stamp or heal tools.
  • If your kite line shows up in the image, remove it using the same tools.
  • If you cropped your panorama wide enough to have gaps in ground or sky, open up all the images that went into the panorama, as well as the second orbit you made from that same location.  Use the rubber stamp tool to pull patches from any and all of the input images to repair problems on the panorama.  (This is one of the best reasons to make a second orbit!)  Since you used a fixed exposure, you should be able to rubber-stamp these into the panorama with no changes necessary.
  • Once the panorama is defect-free, look at your levels.  If you did your job setting the manual exposure on the ground, the exposure should be dead-nuts on, or need very little tweaking.
  • Do all your dodging and burning at this point to get the exposure just the way you want.  This can involve lots and lots of time, depending on how meticulous you are with your exposures.  If you’re the kind of person who got into photography in the days of film, and spent your afternoons in the positive darkroom dodging and burning the same negative over and over and over, you may be on this step for a while…

At this point the bulk of the workflow is complete.  But I would advise you not to stop here.  In Photoshop under the File menu is a command called File Info.  Click it.  It lets you edit the header information associated with your image.  At the very least I would fill out:

  • Title – What is the name of the original file on your computer?  Leave out the extension since that can change without changing the image.
  • Author – Your name.  You’re the author of your image.
  • Caption – Describe the photograph clearly and concisely, and include enough information so that you could read it and know where on the planet you were when you made the photograph.
  • Copyright Status – Change this to “Copyrighted Work”.  The moment you tripped the shutter, your photograph was a copyrighted work.  Not marking this just sets you up for someone to use your photograph without your knowledge.  If you choose to license your photographs under the Creative Commons license, of course, you should set this appropriately.
  • Copyright Notice – Mine reads: Copyright © Tom Benedict
  • Date Created – The date you tripped the shutter on your camera to make the photographs that went into this image.
  • City / State / Province / Country – Fill them in.
  • Source – Give yourself some hints here.  Is it a straight shot?  Digital?  Film?  Stitched?  My digital panoramas are all marked “Digital-Stitched”.

The neat thing is that most of the photo sharing sites on the Internet will automagically read your header information and fill in their own forms for you.  You may still want to provide more information than this, but the base information will be there.

The even neater thing is that in the event someone downloads your photograph and puts it on their own site without your knowledge, your header information is indexed by most search engines.  Even better, when you challenge them and they claim the photograph as an “orphaned work”, you can demonstrate that they did not make an honest effort to find the photographer in order to ask for permission since your info is all right there with the image.

So that’s it in a nutshell.  How well does it work?  See for yourself:

Pololu Valley Wetlands 2

– Tom

Posted in Kite Aerial Photography, Photography, Software | Tagged: , , , , , , , , , , , , , | Leave a Comment »

Beginning to Think about Sharpness

Posted by Tom Benedict on 10/05/2010

The weather prediction did work well, and the charts from the National Weather Service were right on the money when it came to figuring out where there would be cloud cover, rain, etc.  I wound up intentionally picking a spot with “bad” weather, but not so bad that it would result in precipitation.  There’s an old adage that bad weather is good for photography.  It’s true.  Bland skies are boring.  Skies boiling with clouds are interesting.  I opted for interesting.

It worked, and the photo session resulted in a number of good image sets for panoramas.  Few errors, good image spacing, and almost nine hundred images to choose from.  Excited, I blindly began stitching before really taking a close look at the images themselves.  The stitching went great, but a number of the images were unacceptably blurry.

This brought back an old goal I’d set for myself ages ago:  To have a program I could run on a set of images taken in a given location, and be told, in a quantifiable way, which were the sharpest of the bunch.

Doing a Google search on “image sharpness” or “how sharp is my image?” brings up all manner of pages describing the follies of attempting to apply numerical methods such as the mean transfer function to an image in order to judge the sharpness of the lens involved.  It brings up other cautionary articles that urge people not to attempt to quantify sharpness in any sort of repeatable scientific manner since it depends so much on the source image being used.

I’m not trying to measure the quality of my lens.  I’m trying to find out which shots I screwed up, and cull them without having to wade through a zillion shots!

I poked around a little, and found something that appears to work.  With a lot of my image processing work, I tend to turn to ImageMagick, a set of command-line tools for image manipulation that will run under most operating systems.  I use them under Linux at home, and on either Linux or Cygwin at work.  They’re flexible, powerful, often dog slow, but they almost invariably get the job done.

In this case I wound up using two tools: convert and compare.  To measure sharpness, I decided to make a blurry copy of an image, and find out how much damage was done.  If there’s no big change, the image was likely blurry to begin with.  If there’s a huge difference, chances are the image was pretty sharp, and the blurring action did a lot of damage.  So here’s how I did it:

convert -blur 2 source.jpg source-blur.jpg

compare -verbose -metric RMSE source.jpg source-blur.jpg source-diff.jpg

This spits out a number representing the root mean square error between the source and blurred images.  It also results in an image file showing that difference.  For my purposes I didn’t want to keep the blurry or difference images, so I deleted them after they were generated.

I ran some tests on the set of images I did over the weekend, and it appeared to work quite well.  I can’t say what number represents “sharp” or “blurry” because what those articles said is true: it depends too much on what the source image is.  But for a given set of images I can run this test, associate a number with each image file, look through a range of images, and determine what I’m willing to work with.  At that point it’s a simple matter of rejecting whichever images have an RMSE number lower than my threshold, and retaining the images with an RMSE number higher than my threshold.

The only down-side to this is that it’s time-intensive to run: upwards of 20 seconds per image.  It doesn’t seem like much, but once you get up to 800, 900, or 1000 images from a single shoot (typical for a panorama-intensive session) this starts to drag.  Nonetheless, with ImageMagick it’s possible to script the whole mess, set it running, and walk away until it’s done.  Sometimes computers really can make life easier.

So far tests is as far as I’ve gone with this.  But once it finishes running the software on the set from this weekend, I’ll be in a position to try using the information to build sharper panoramas with less work.

– Tom

Posted in Kite Aerial Photography, Photography, Software | Leave a Comment »

Panoramic Photography

Posted by Tom Benedict on 22/04/2010

The quest for the commercially viable photograph continues.  In the previous article I looked at the photography hardware, namely the lens, camera, KAP rig, and kites I would need to make photographs that I could use for stock purposes.  Given the hardware I have on-hand, the only available method is to do panoramic photography.  This is fine by me since I already do aerial panoramas, and thoroughly enjoy the freedom the aerial vantage point offers the panoramic photographer.  But it involves an additional step that traditional single-shot photography does not: stitching software.

For the past several years I’ve happily used Microsoft Image Composite Editor for all of my stitching needs.  It’s a capable package, though a little sparse on geometric controls.  It’s also right in my price range since it’s free software.  Up until now that’s all I’ve  needed to know.  But in looking at moving from hobbyist to semi-professional, I’ve had to re-examine every aspect of what I’m doing to make sure I’m on the up-and-up.  Camera?  Check.  Kites?  Check.  KAP rig?  Check.  FAA?  Since I’m doing this from a kite and follow all the pertinent FAA regs, that’s a check too.  But what about software?

I do the bulk of my day-to-day image processing in Photoshop 7.  It’s not the latest and greatest, but it’s got two things going for it:  It’s still a rock-solid piece of software, and I have a commercial license for it.  So I can get everything done that I need to do, and there are no restrictions on what I can do with the resulting images.  But the same isn’t true of ICE.  The license agreement you sign off on when installing Microsoft ICE quite clearly stipulates that it is for non-commercial research purposes only.  Period.  So every single panorama I’ve ever made with it is not available for commercial use.

This set me on yet another quest: the quest to find commercially licensed panorama stitching software that would do everything I want.  Sounds simple, right?

Wrong.

The hunt started with a web search.  There are a lot of packages out there for stitching panoramas.  A lot.  And for every package, there are at least a handful of people who strongly like or strongly dislike it.  Some articles dismissed entire families of packages with a single sweep of their textual arm.  One condemned any package that ran on a Windows computer because no graphic arts professional would be caught dead using anything but a Mac.  I found that particularly funny, and ignored the rest of the article.  There were a handful that kept coming up, though.  So I tried most, if not all of them.

This is where things started to fall apart.  One I tried worked great, and was designed for making prints rather than immersive VR representations for web use.  But it could only handle a single stripe of images.  I do multi-stripe panoramas, so I had to drop it even though it was a promising package.  Another that came highly recommended from a number of sources simply wouldn’t run on my computer.  I use an AMD 64-bit computer running Vista64.  Seems simple enough, but that caused a good number of packages no end of problems.  This was a source of frustration since my computer and the OS running on it are now several years old.  You’d think the issues would be known by now.  Go figure.

In the end I went back to one I tried some years ago: Autopano Pro.  When I installed the demo, it would assemble panoramas, but wouldn’t let me edit them.  I almost gave up in disgust until a fellow photographer whose opinions I trust completely told me to really give it a try.  So I hit the support forums, found a similar issue, and tried the fix.  It worked.  Once the problem was fixed I was able to create, modify, tweak, bonk, dwing, and save my panoramas.  The quality was as good as, if not better than ICE.  So I bought a license.

Since then I’ve had more of an opportunity to put Autopano Pro through its paces.  It is considerably more flexible and more capable than ICE.  I also signed a commercial license agreement, so there are no restrictions on what I do with the resulting images.  I’m back in business, so to speak.

Rather than take the stance of so many of the articles I read when I started this search, I won’t demean any of the other software out there.  I won’t even mention them by name.  And I won’t make any statements about what the “best” software is.  I honestly don’t know.  But I did find one that will run on the hardware I have, will stitch multi-stripe panoramas, handles ghosting remarkably well, and offers a commercial license for someone like me who is trying to move toward being a semi-professional.  If you find yourself in the same boat, give it a try.

Tom

Posted in Kite Aerial Photography, Photography, Software | Leave a Comment »

More Fun With False Color

Posted by Tom Benedict on 06/07/2009

Most of the time I’m doing kite aerial photography, it is to create a picture I like; that I would want to hang on my wall.  But on occasion I’ve done KAP strictly as a method of remote sensing.  The pictures are data rather than an attempt at art.  I’ve flown at Kiholo Bay several times now, usually in the former category of creating pleasing images.  This most recent trip was strictly in the latter sense: to take data.  But any time I’m out in the field doing KAP, I try to have fun and to stretch what I can do with what I’ve got.  This outing was no exception.

The requirements for the flight strictly called for oblique angles.  I settled on 45 degrees for most of them, though occasionally I used a steeper or a shallower angle as best suited the subject.  But I took some ortho images anyway.  It’s always fun to compare against what Google Earth shows for a particular region, and ortho can be useful when I’m going through the pictures later to judge distance and height.  The field of view of my camera is such that the horizontal width of the frame corresponds to the height of the camera to within 5%.  By taking the occasional orthogonal image, I can typically go back through the images with a map or Google Earth to figure out how high the camera was.  Besides, it’s always fun to compare the KAP image to the Google Earth image, if for no other reason than to point out that comparing satellite imagery and low altitude aerial imagery is seriously comparing apples and oranges.

Kiholo Bay - Google Earth Imagery

Ever since doing some work for an archaeologist from Oahu, I’ve been trying various false color techniques to try to get information out of my images.  Most of the time this has been done with orthogonal pictures, though as you can see from my previous post, the same tricks can be used on practically any picture.  But it works well with the orthos:

Kiholo Bay Ortho Composite

There are a number of features in this picture that are worth trying to isolate.  There are kiawe trees, a patch of fountain grass, pahoehoe lava from a Mauna Loa lava flow, aa lava from a Hualalai lava flow, water, coral rock, and even a swimmer in the water.

Kiholo Bay Ortho Composite - False Color

The first approach I tried was to use ImageJ with the DStretch plug-in.  It’s a really good false color filter that can be used to boost any manner of color combinations in an image.  In this case I used the YDS setting with a 315 degree rotation in hue, and managed to isolate most of the features listed above:  Kiawe trees are rendered as a combination of yellowish green in the upper branches, and red for the dead undergrowth.  The fountain grass is rendered as a bright red.  Pahoehoe lava is rendered as a blackish purple, and the aa is rendered as a reddish purple, as are the cracks in the pahoehoe lava.  Coral shows up as  a very light blueish purple, almost white, and the water is rendered as antifreeze green.  Lurid though the colors may be, it makes picking out individal elements in the image quite easy.

Another approach that has worked well in the past is to separate the R, G, and B channels in the image, and treat them as components in a mathematical expression.  This is a tried and true technique that’s been used in astronomy for ages.  B-V (or in the RGB world, B-G) images can be used to judge the temperature of a star, for example.  I wasn’t taking pictures of stars, but there’s still validity in the idea.  Let’s say I want to find the redder aa lava, but don’t want to get a false positive from the coral rock in the frame.  Subtracting the blue channel from the red channel picks up primarily red objects, in this case aa lava and cracks in the darker pahoehoe lava, though this catches the green vegetation as well:

Kiholo Bay Ortho Composite - Red minus Blue

Similarly, green vegetation can be isolated by subtracting red or blue from the green component, and in this case it doesn’t do such a good job of picking up the rocks:

Kiholo Bay Ortho Composite - Green minus Blue

Slightly more complicated expressions can be used to isolate other colors in the image, or to further separate colors.  And likewise, this trick can be used on false color images that have been produced through some other tool, such as DStretch.

Despite having resources like Google Earth available to us, kite aerial photography still offers a great deal of utility as a remote sensing platform.  But I still like making pretty pictures best of all.  The next time I grab my bag and head out the door, it’ll be to go somewhere nice and take pictures I like: the kind I want to hang on my wall.

— Tom

Posted in Hawaii, Kite Aerial Photography, Photography, Software | Tagged: , , , , , , | Leave a Comment »