Tag Archives: Photography

Revenge of the PhD Camera

Hipstamatic water meter

Hipstamatic water meter

Cameras come in two flavors. There are expensive serious cameras used by serious photographers to take serious photographs and then there are PhD, (Push here Dummy), cameras. Serious cameras meet the highest technical standards, lenses are diffraction limited, chromatic aberration approaches zero, pixel counts match Nyquist limits, ISO’s exceed retinal sensitivity, auto-focus is instantaneous, color spaces are wide, calibrated and range into the infra-red and ultra-violet. PhD cameras don’t go there! PhD cameras provide a button for dummies to push. Over the years I’ve ying’ed and yang’ed from serious to PhD cameras. It’s not that I cannot make up my mind. Camera choice is another eternal struggle sort of like that squabble between good and evil or light and regular beers.

When I’m on a serious photography kick I put time, expertise and money into my pictures. For me serious photography is exhausting. I  seek out worthy subjects, wait for the right light, agonize over composition, experiment with lenses, tweak f-stops, adjust shutter speeds and take as many exposures as light and time allow. Then the post shutter ordeal begins. Digital imaging processing makes anything possible. You can take your exposures and like some mad photo-shopping Rumpelstiltskin spin straw into gold.  But, as in the fairy tale, there is a high price, perfect images will suck years out of you. Photographers often talk about workflow and they aren’t kidding. When I start tweaking my workflow I know I’m reaching the end of my serious rope. Photography is one of my hobbies and I never ruin hobbies by turning them into jobs!

The World's largest Photo Libraries 2011  1000memories.com

Eventually I snap out of it and resume PhD’ing. Unlike serious photography PhD’ing is effortless and fun. It’s always been fun, remember Brownies and Instamatics, but this is the golden age of PhD photography! In the last decade PhD cameras have evolved and mutated from cheap plastic boxes filled with grainy high-speed ISO film to sophisticated little internet photo-shopping engines that ride around in our pockets as cell phones. I don’t even know why they are called cell phones. My iPhone takes hundreds of images for every phone call it processes. It’s really more of an iCamera+iBrowser that can, on rare occasions, be used as a phone. Based on surveys of web image sites I am not the only iCamera user. PhD photography is growing faster than the national debt.

Mixing up cell phone color channels

Mixing up cell phone color channels

Explosive growth attracts armies of sinners and saints. Every two-bit whore chasing a buck is now writing image processing software for cell phones. In the last two years we’ve seen apps that stitch panoramas on the fly, apply cheesy photo-shop effects and automatically create HDR images by blending two or more exposures.  As Sturgeon’s law predicts most of these apps are crap but that’s not a problem for PhD photography. The goal is to offer a fun button for dummies. My favorite PhD app is a great little toy called Hipstamatic. Hipstamatic simulates crappy old PhD film cameras loaded with expired film. You can choose a lens, a film and a flash or you can just shake your iPhone and let it randomly select these parameters. Shake and shoot; it’s the revenge of the PhD camera.

Assigning SmugMug Print Size Keys

I believe that a picture’s aspect ratio,  its width divided by its height, should be tuned to its contents.  Consequently,  I am not a slave to standard aspect ratios and print sizes like the ones shown in the following table.

Aspect Ratio (Short/Long) Print Sizes (Inches)
0.5 4×8, 5×10, 8×16, 10×20
0.7 3.5×5, 7×10
0.666666667 4×6, 8×12, 10×15, 12×18
0.714285714 5×7
0.772727273 8.5×11

Over the years I have clipped and cropped my pictures producing a large number of nonstandard ratios. This is not a problem until I decide to order prints.

Pictures sites like SmugMug offer many standard sizes but they cannot accommodate every crank with an aspect to grind.  To print a strangely shaped picture on SmugMug you have to open up the website’s print selection tool and fit one side or your picture to a standard print size.  This leaves part of the print blank and is often called the letterbox method.  Letterboxing is not ideal but it gets the job done.

For standard print sizes there is a much better way.  The following J verb takes the pixel dimensions of my images and computes standard, 300 DPI, print size keys like: 4×6, 5×7 and 8×10. After assigning print size keys you can select and print all standard sizes with a few mouse clicks.

smugprintsizes=:3 : 0

NB.*smugprintsizes v-- compute largest print size for given dpi.
NB.
NB. Computes the  largest  print size  (relative  to  DPI x)  for
NB. SmugMug images. Only images that have aspect ratios  close to
NB. the ratios  on  (SMUGPRINTSIZES) are associated  with a print
NB. size.
NB.
NB. monad:  st=. smugprintsizes btclImages
NB.
NB.   'albums images'=. readsmugtables 0
NB.   smugprintsizes images
NB.
NB. dyad:  st=. iaDpi smugprintsizes btclImages
NB.
NB.   200 smugprintsizes images

SMUGPRINTDPI smugprintsizes y
:
nsym=.s:<''

NB. reduce image table on PID
images=. }. y [ imhead=. 0 { y
pidpos=. imhead i. <'PID'
if. 0=#images=. images #~ ~:pidpos {"1 images do. 0 2$nsym return.end.

NB. compute print sizes table
pst=. printsizestable SMUGPRINTSIZES

NB. image dimensions short x long
idims=. _1&".&> (imhead i. ;:'WIDTH HEIGHT') {"1 images
'invalid image dimensions' assert -. _1 e. idims
idims=. (/:"1 idims) {"1 idims

NB. aspect ratio and print area (square inches)
ratios=. SMUGASPECTROUND round %/"1 idims
areas=.  SMUGAREAROUND round (*/"1 idims) % *: x

NB. mask table selecting images with ratio
masks=. (SMUGASPECTROUND round ;0 {"1 pst) =/ ratios
if. -.1 e. ,masks do. 0 2$nsym return.end.

masks=. <"1 masks
pids=.  s:&.> masks #&.> <pidpos {"1 images

NB. largest print area for selected images at current DPI
masks=. (1 {"1 pst) </&.> masks #&.> <areas
pids=.  (<"1&.> masks #"1 &.> pids) -. L: 0 nsym
sizes=.  <"0&.> 2 {"1 pst
; |:&.> ; pids ,: L: 0 (# L: 0 pids) # L: 0 sizes
)

Command Line C# SmugMug API Metadata Download

I have a skeleton in my photographic closet!  I enjoy hacking pictures as much as I enjoy shooting them.  Before digital photography I got my jollies the old fashioned way with chemicals:  dark room chemicals.  I still get all emotional when I remember the scent of a fixer.   Ahhh — those were the days.

Now,  instead of inhaling fumes in the dark, I hang out on picture sites:   SmugMug is my current favorite.   Over the last year I have uploaded thousands of carefully cataloged  images:  you can view them here.   I may not be much of photographer but when it comes to image metadata my anal analytic side shines.  I can EXIF, IPTC and GEOTAG with the best of them.

Because I tweak metadata online, and I suffer from a retentive character flaw,  it’s only natural that I would seek to download my sacred metadata.  This is what SmugMug’s API is for!  When I started experimenting with the SmugMug API I made the mistake of reading the documentation.  SmugMug documentation is,  at best,  a “work in progress.”  It may help but probably not!  I found trolling the web looking for code examples more productive.

To help the next SmugMug API geek I am posting a fragment of a simple command line C# metadata dump utility I put together.   The core of the program  is shown below and all the C# source is available here.  This program is to trivial to license so help yourself.

namespace SmugMugMDDumper
{
class Program
{
private const string xmlHeader = @"<?xml version=""1.0"" encoding=""UTF-8""?>";

// defaults - insert your own SmugMug apikey, password, email here
// defaults are used if corresponding command line arguments are missing
private const string apiKey = "<YOUR SMUGMUG APIKEY>";
private const string passWord = "<YOUR SMUGMUG PASSWORD";
private const string emailAddress = "<YOUR SMUGMUG EMAIL>";
private const string outFile = @"c:\temp\smugmugdata.xml";

static void Main(string[] args)
{
try
{
DataSet ds = new DataSet();
XmlDocument doc = new XmlDocument();
Arguments comline = new Arguments(args);
SmugmugMetaData smugmd = new SmugmugMetaData();

// parse and set any command line arguments
if (comline["help"] != null)
{
string __helpMsg = @"
Typical command line calls:

SmugMugMDDumper.exe -apikey:""xQDzWwLp2I1GUGli88g999VrQWN4Xz56"" -email:""youremail"" -password:""nimcompoop"" -output:""c:\test\smugdata.xml""
SmugMugMDDumper.exe -output:""d:\mystuff\smuggy.xml""
SmugMugMDDumper.exe -password:""newpassword"" -output:""c:\temp\out.xml""
SmugMugMDDumper.exe -help

";
Console.Write(__helpMsg);
return;
}

string __apiKey;
if (comline["apikey"] != null) __apiKey = comline["apikey"];
else __apiKey = apiKey;

string __emailAddress;
if (comline["email"] != null) __emailAddress = comline["email"];
else __emailAddress = emailAddress;

string __passWord;
if (comline["password"] != null) __passWord = comline["password"];
else __passWord = passWord;

string __outputFile;
if (comline["output"] != null) __outputFile = comline["output"];
else __outputFile = outFile;

// start output file
smugmd.WriteToFile(xmlHeader + "<SmugMugData>", __outputFile);

// open SmugMusg session - uses https
string __sessionID = smugmd.StartSMSession(__apiKey, __emailAddress, __passWord);

// collect all galleries
ds = smugmd.GetGalleries(__sessionID, __apiKey, __outputFile);
DataTable myTable = ds.Tables[0];
DataRow myRow;

// image metadata for each gallery
smugmd.AppendToFile("<GalleryImages>", __outputFile);
int rowcnt = myTable.Rows.Count;
string rowstr = "/" + rowcnt.ToString() + "]: ";
for (int i = 0; i < rowcnt; i++)
{
myRow = myTable.Rows[i];
Console.WriteLine("gallery [" + (i + 1).ToString() + rowstr + (string)myRow["Title"]);
doc = smugmd.GetGalleryImages(__sessionID, __apiKey, (int)myRow["id"], __outputFile);
}
smugmd.AppendToFile("</GalleryImages>", __outputFile);

// complete output file - end SmugMug session
smugmd.AppendToFile("</SmugMugData>", __outputFile);
smugmd.EndSMSession(__sessionID, __apiKey);

Console.WriteLine("[Complete] output file: " + __outputFile);
}
catch (Exception ex)
{
Console.WriteLine("[Fail] SmugMug Metadata Dumper Failure - error message: " + ex.Message);
}
}
}
}

Lens Lust

I suffer from a common and debilitating condition commonly referred to as NEM: Not Enough Money!  NEM imposes all sorts of conditions and hardships on its victims.  In my case NEM limits my lens lust. Without NEM I would have warehouses full of the finest cameras and lenses but as a lowly NEMite I am forced to choose wisely.

For months I have had my eye on the Nikon f1.8  35mm AFS DX prime.

AFS 1.8 35mm

AFS 1.8 35mm

My logical reasons for lusting after this lens are:

  1. I have a DX format Nikon AFS DSLR.
  2. The FOV, (field of view), of standard 50mm lenses mounted on DX cameras is to narrow: 35mm is about right.
  3. f3.5,  the standard kit lens aperture,  is simply not fast enough.
  4. My NEMly budget is limited.
  5. Modestly priced prime lenses often out perform far more expensive zooms.
  6. I have had good results from prime lenses in the past.

I knew I wanted a lens like this even before Nikon started offering it.  For the last three years legions of Nikon users have been waiting for modern,  reasonably priced,  AFS primes.  During our long wait it seemed like every Nikon lens announcement was another chintzy slow starter zoom or a ridiculously overpriced fast zoom.  When the global economy went in the tank this lens appeared.  My first thought; they’re offering something that people will actually buy in a recession.

After the f1.8 35 appeared buying one proved difficult.  Remember those legions of Nikon users: lots of them wanted this lens.  For months you couldn’t find this item in stock anywhere.  The other day I read that it was available at B & H  so I hopped online and ordered instantly.

So how does it work?

It’s apparent from the raw NEF files that it’s sharper and renders straight lines better than the kit 18-55mm lens.  The f1.8 also does something I have dearly missed.  If you crank open the aperture you can produce a nice blurred background: bokeh baby!

C