Posts tagged Camera

Fixing Dropbox’s Camera Upload Organization Mess – EXIFmover

First, I have to note that I love Dropbox. I’ve been using the service almost since the beginning to synchronize my work across multiple desktops, notebooks, and mobile devices. There’s really no alternative at this point that rivals Dropbox in my mind.

That said, the state of their camera upload organization is abysmal. This is a recent new emphasis for Dropbox, automatically uploading all the photos taken on a mobile device or onboard an SD card inserted into a notebook. The problem is that all of these photos are dumped into the same /Dropbox/Camera Uploads folder, so you end up with a huge list of photos. That’s not so bad, except that in my case I’m dealing with sample photos taken on multiple devices for testing results in a completely unwieldy directory with so many files that it often causes Finder on OS X or Explorer on Windows to stall for seconds upon opening.

Screen Shot 2012-12-15 at 3.06.23 PMThis isn’t that well organized…

I’ve pleaded my case for a simple feature to be added – per device folder creation. This didn’t make it into the last update, and about a week or so ago I wrote a script to do exactly that. It parses the EXIF data, and sorts photos into a folder with name /[type]+[model]. The end result looks like this:

Screen Shot 2012-12-15 at 2.28.35 PMFinally, some per-device sorting

It’s called EXIFmover and I stuck it up on Github as a Gist since it’s pretty simple. I use Python 2.7 personally, so that’s what this is tailored for. I’ve tested on OS X, Windows, and Ubuntu. Python’s OS interface is fairly platform agnostic. The one prerequesite is EXIF-Py for parsing the EXIF metadata from photos, which can be obtained from that project’s Github page.

Stick both EXIFmover.py and EXIF.py in the Camera Uploads directory, and run. As more files are uploaded, this can be run again and photos will be sorted once more.

Finally, some organization.

A Quick Analysis of EXIF data from iPad (3rd Gen) Camera Samples

Previously I posted about the EXIF data present in Apple’s untouched, straight-from-the-device iPhone 4S camera samples. Today, I saw that they had done the same thing again by posting original samples of images taken from the iPad. There’s still no original video sample (instead just a compressed one) so unfortunately there’s no telling whether A5X gets a better encoder than the one from A5. I wouldn’t hold my breath, however, as it’ll probably wind up being the same 24 Mbps H.264 baseline with 1 reference frame.

Like before, Apple has left the EXIF data intact on its samples, including the geotagging data for a surprising number. I think it’s interesting to just take a look.

Image 1 – IMG_1610.jpg

 Flowers seem to be a recurring thing for Apple photo samples, and in general are a subject that probably resonates with even amateur macro photographers.
ExifTool Version Number : 8.68
File Name : IMG_1610.JPG
Directory : /Volumes/Macintosh HDD/nerdtalker/Downloads
File Size : 1518 kB
File Modification Date/Time : 2012:03:08 12:44:45-07:00
File Permissions : rw-r--r--
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Big-endian (Motorola, MM)
Make : Apple
Camera Model Name : iPad
Orientation : Rotate 180
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : 5.1
Modify Date : 2012:02:16 11:19:30
Y Cb Cr Positioning : Centered
Exposure Time : 1/2160
F Number : 2.4
Exposure Program : Program AE
ISO : 80
Exif Version : 0221
Date/Time Original : 2012:02:16 11:19:30
Create Date : 2012:02:16 11:19:30
Components Configuration : Y, Cb, Cr, -
Shutter Speed Value : 1/2160
Aperture Value : 2.4
Brightness Value : 10.13573086
Metering Mode : Multi-segment
Flash : No flash function
Focal Length : 4.3 mm
Subject Area : 1295 967 699 696
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 2592
Exif Image Height : 1936
Sensing Method : One-chip color area
Exposure Mode : Auto
White Balance : Auto
Focal Length In 35mm Format : 35 mm
Scene Capture Type : Standard
Sharpness : Normal
GPS Latitude Ref : North
GPS Longitude Ref : West
GPS Altitude Ref : Below Sea Level
GPS Time Stamp : 19:19:30.6
GPS Img Direction Ref : True North
GPS Img Direction : 267.2341772
Compression : JPEG (old-style)
Thumbnail Offset : 904
Thumbnail Length : 10049
Image Width : 2592
Image Height : 1936
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Aperture : 2.4
GPS Altitude : 0 m Above Sea Level
GPS Latitude : 38 deg 21' 21.60" N
GPS Longitude : 123 deg 4' 1.20" W
GPS Position : 38 deg 21' 21.60" N, 123 deg 4' 1.20" W
Image Size : 2592x1936
Scale Factor To 35 mm Equivalent: 8.2
Shutter Speed : 1/2160
Thumbnail Image : (Binary data 10049 bytes, use -b option to extract)
Circle Of Confusion : 0.004 mm
Field Of View : 54.4 deg
Focal Length : 4.3 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance : 2.08 m
Light Value : 13.9

Like last time I’ve reproduced the entire EXIF output using the ever-awesome exiftool, or you can do the same thing (which uses it as a backend) on exifdata.com. It’s the same data just presented in a nicer fashion online (and with a link to google maps).

So a couple things immediately stand out which I’ve bolded. First, the model of the device reflects Apple’s new naming scheme, and reports simply “iPad.” There’s no 3 or “Late 2012″ or any other moniker, which should further confirm (if it’s even possible to more strongly confirm) that the name of the thing is literally just “iPad.” The software this iPad was running is iOS 5.1, which makes sense. Image size is 2592×1936 which works out to exactly 5.01 MP as well – the original iPhone 4 also produced images 2592×1936 in size, in fact, I wouldn’t be surprised to see the same OmniVision CMOS being shared between the 4 and iPad (3rd Gen).

Moving on we also see that the focal length and field of view reported in EXIF data are exactly the same as those from the iPhone 4S. This does seem to back the claim that the iPad 3rd Gen is indeed using the same optical system/module as the iPhone 4S, at least superficially. Further, this means that the two must be using the same size sensor to achieve the same field of view with the same 4.3mm focal length.

Update: This ended up being the case, as the iPad (3) uses the same CMOS as the iPhone 4 (as predicted), which is OmniVision’s OV5650. That sensor has 1/3.2″ size and 1.75µm pixels. Recall that the iPhone 4S uses Sony’s IMX145 sensor which is 1/3.2″ as well, but with 1.4µm pixels. Using the same optical format is what makes it possible for Apple to reuse the same 5P optical design between the iPhone 4S and iPad (3).

The image is recorded at ISO 80 (which is the lowest I’ve seen the 4S go as well) and at 100% crop looks pretty good, though I wouldn’t go so far as to say it’s mindblowing. There’s some definite noise visible in the sky and some noise-reduction which seems to battle it. Thankfully Apple still isn’t using a sharpening kernel, so there aren’t any halos around the flower’s petals. The lower part of the flower petal also has some oversaturation (100% white). The good part is that it seems to inherit the good optical qualities from the 4S system (same module, different CMOS I guess) and there’s minimal distortion or vignetting, two things that drive me absolutely crazy with most smartphone/tablet camera modules.

Location this photo was taken is Bodega Bay, CA. The photo was also taken on February 16th if the data is to be believed.

Image 2 - IMG_0470.png

Image 2 is pretty surreal. First off, it isn’t a jpg (which is why I’ve added the extensions to these headings) but is rather a png. I’m not sure whether this was just an honest mistake, but something is really weird here and the image obviously didn’t come in this extension or format directly from an iPad.

Pulling out the EXIF data raises more questions than it answers:

ExifTool Version Number : 8.68
File Name : IMG_0470.png
Directory : /Volumes/Macintosh HDD/nerdtalker/Downloads
File Size : 5.1 MB
File Modification Date/Time : 2012:03:08 12:44:50-07:00
File Permissions : rw-r--r--
File Type : PNG
MIME Type : image/png
Image Width : 2592
Image Height : 1936
Bit Depth : 8
Color Type : RGB
Compression : Deflate/Inflate
Filter : Adaptive
Interlace : Noninterlaced
Pixels Per Unit X : 2835
Pixels Per Unit Y : 2835
Pixel Units : Meters
Profile CMM Type : Lino
Profile Version : 2.1.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 1998:02:09 06:49:00
Profile File Signature : acsp
Primary Platform : Microsoft Corporation
CMM Flags : Not Embedded, Independent
Device Manufacturer : IEC
Device Model : sRGB
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : HP
Profile ID : 0
Profile Copyright : Copyright (c) 1998 Hewlett-Packard Company
Profile Description : sRGB IEC61966-2.1
Media White Point : 0.95045 1 1.08905
Media Black Point : 0 0 0
Red Matrix Column : 0.43607 0.22249 0.01392
Green Matrix Column : 0.38515 0.71687 0.09708
Blue Matrix Column : 0.14307 0.06061 0.7141
Device Mfg Desc : IEC http://www.iec.ch
Device Model Desc : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant : 19.6445 20.3718 16.8089
Viewing Cond Surround : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type : D50
Luminance : 76.03647 80 87.12462
Measurement Observer : CIE 1931
Measurement Backing : 0 0 0
Measurement Geometry : Unknown (0)
Measurement Flare : 0.999%
Measurement Illuminant : D65
Technology : Cathode Ray Tube Display
Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
White Point X : 0.31269
White Point Y : 0.32899
Red X : 0.63999
Red Y : 0.33001
Green X : 0.3
Green Y : 0.6
Blue X : 0.15
Blue Y : 0.05999
Image Size : 2592x1936

The Microsoft and HP lines above are just talking about the ICC profile and header attached to the image. It’s an sRGB 1998 ICC profile, and there are CMM type fields (Lino) and others. I would suspect that this image was put through some software with a color management system which saved this information in the headers, and the person saving it chose PNG to not introduce more JPEG artifacts by re-encoding an already lossy-encoded image.

I’m not going to pretend to know exactly what went on here, but it’s fairly obvious the image didn’t come out of camera.app this way…

Image 3 - IMG_1190.jpg

Image 1190 is of a beached boat with “Point Reyes” marked on it. Thankfully this is a JPEG and not a PNG with everything stripped out.

Software : 5.1
Modify Date : 2012:02:14 16:14:55
Y Cb Cr Positioning : Centered
Exposure Time : 1/1439
F Number : 2.4
Exposure Program : Program AE
ISO : 80
Exif Version : 0221
Date/Time Original : 2012:02:14 16:14:55
Create Date : 2012:02:14 16:14:55
Components Configuration : Y, Cb, Cr, -
Shutter Speed Value : 1/1439
Aperture Value : 2.4
Brightness Value : 9.728654971
Metering Mode : Multi-segment
Flash : No flash function
Focal Length : 4.3 mm
Subject Area : 1295 967 699 696
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 2592
Exif Image Height : 1936
Sensing Method : One-chip color area
...
GPS Altitude : 0 m Above Sea Level
GPS Latitude : 38 deg 5' 51.60" N
GPS Longitude : 122 deg 51' 3.00" W
GPS Position : 38 deg 5' 51.60" N, 122 deg 51' 3.00" W
Image Size : 2592x1936
Scale Factor To 35 mm Equivalent: 8.2
Shutter Speed : 1/1439
Thumbnail Image : (Binary data 9285 bytes, use -b option to extract)
Circle Of Confusion : 0.004 mm
Field Of View : 54.4 deg
Focal Length : 4.3 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance : 2.08 m
Light Value : 13.3

I didn’t paste the whole output since it’s a lot more of the same as before. Still an iPad running iOS 5.1, same focal length, field of view, all that good stuff. ISO is still 80 as well.

The location is Martinelli Park near Point Reyes (hence the marking), taken on February 14th, 2012. This is two days before the first image in the set, and very close to it (Bodega Bay and Point Reyes are essentially neighbors, at least based on Google Maps)…

Subjectively this image looks pretty decent, though there is definite blurring and loss of high spatial frequencies in the brown grass at left, though this is a challenging subject and great place to look for any camera to start making things a homogenous mess.

Image 4 - IMG_0561.jpg

This is a photo of some dog, and is the only portrait orientation photo in the set. Seriously I have no idea what kind of dog this is, I guess that cements my status as not an animal person.
Software : 5.1
Modify Date : 2012:02:09 12:03:06
Y Cb Cr Positioning : Centered
Exposure Time : 1/1890
F Number : 2.4
Exposure Program : Program AE
ISO : 80
Exif Version : 0221
Date/Time Original : 2012:02:09 12:03:06
Create Date : 2012:02:09 12:03:06
Components Configuration : Y, Cb, Cr, -
Shutter Speed Value : 1/1890
Aperture Value : 2.4
Brightness Value : 10.12332838
GPS Altitude : 0 m Above Sea Level
GPS Latitude : 34 deg 1' 14.40" N
GPS Longitude : 118 deg 47' 10.80" W
GPS Position : 34 deg 1' 14.40" N, 118 deg 47' 10.80" W
Image Size : 2592x1936
Scale Factor To 35 mm Equivalent: 8.2
Shutter Speed : 1/1890
Thumbnail Image : (Binary data 8699 bytes, use -b option to extract)
Circle Of Confusion : 0.004 mm
Field Of View : 54.4 deg
Focal Length : 4.3 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance : 2.08 m
Light Value : 13.7

Again there’s no point in republishing all the EXIF data as much of it is the same as before and seems to be valid. ISO is 80 once again.

This photo interestingly enough was captured before all the others, on February 9th, 2012, five days before the third image above. Location this time is Paradise Cove right on the PCH. It’s interesting to me that all the images seem to be of or taken near beaches for some reason.

Final Thoughts

Of the images we can extract EXIF from, all are taken at ISO 80. This is probably no coincidence, as Apple probably wants to stay away from low light performance where basically everything struggles right now even with BSI CMOSes and fast F/2.2 or F/2.4 optics. I guess the beach is a logical choice of scenery to that end since there’s a lot of light (sand is reflective, after all). The photos are from different dates as well, which seems like a risky thing to do when trying to minimize the chances of some crazed tech-paparazzi catching an Apple engineer/exec with an unreleased iDevice snapping photos. With the iPhone 4S we saw a huge variety of different locations spanning California to Yosemite to Germany, whereas the iPad essentially gets a drive up the coast and a week of photos. Read into that what you may.

Obviously the last point is that the iPad 3rd gen’s camera is much improved from the almost universally-derided iPad 2 camera (which borrowed the iPod touch module). It’s interesting to see a move to using the same optical system as the 4S and likely the same CMOS as the 4, though it does make sense to maximize component cross-compatibility and drive up volume.

A Quick Analysis of EXIF data from Apple’s iPhone 4S Camera Samples

Motivation

In the course of doing smartphone reviews for AnandTech, I’ve taken a lot of photos for the expressed purpose of comparing camera quality. I don’t have an exact number, but it’s an absurd number of images, and of those, maybe 20% or so actually get published. We reviewed the iPhone 4S and discussed its camera at length in our review, but one of the things that piqued my attention was Apple’s claim that they had were sharing untouched, direct-from-the-iPhone samples online (at the bottom). In case you want all of the images, I’ve uploaded a zip here locally.

What’s interesting is that by default, iOS captures geolocation data on each image capture unless you decline the location services request on initial launch. I was curious to find out just how untouched these images were and whether all the EXIF data was left intact, including the GPS location data. Clearly these photos were taken at places that are either some engineer’s favorite hideouts, or possibly much more. Also, there’s that ever looming question of when they were taken, and whether there’s any chance anyone could’ve seen Apple employees taking photos with an unreleased iDevice at some scenic location.

You can analyze EXIF data in any number of image manipulation packages, and increasingly desktop OSes are exposing this data directly (Finder, Explorer, e.t.c.) but for quick analysis I turned to exifdata.com which does a nice job visualizing everything. Alternatively one can just dump the EXIF data using libraries like the very popular exiftool.

Image 1 – IMG1031

Here’s the dump from one of Apple’s demo images, “IMG_1031.JPG” which is the squirrel photo shown during the announcement event. There’s all the standard data included in the full headers, and you can see specifications such as focal length, exposure time, ISO, model, and the software (iOS 5) used. There are some other fields as well.

SubjectArea I believe corresponds to either where the face detection routine selected an AE/AF target with highest confidence value (most likely to be a face), or where the image was focused using tap to focus. The iPhone 4S also includes some new fields at the very bottom such as 35mm equivalent focal length, field of view, hyperfocal distance (at half this distance, all objects and further meet image plane blur criterion and appear in focus – this half trips people up), and even circle of confusion diameter (blur size/circle of confusion). These values at the very end appear to be specific to the iPhone 4S (and possibly its H4 ISP) and aren’t part of the JEITA EXIF 2.2 specification.

ExifTool Version Number         : 8.68
File Name                       : IMG_1031.JPG
Directory                       : .
File Size                       : 3.1 MB
File Modification Date/Time     : 2011:10:05 01:43:44-07:00
File Permissions                : rw-r--r--
File Type                       : JPEG
MIME Type                       : image/jpeg
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Rotate 180
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : 5.0
Modify Date                     : 2011:08:24 13:13:33
Y Cb Cr Positioning             : Centered
Exposure Time                   : 1/286
F Number                        : 2.4
Exposure Program                : Program AE
ISO                             : 64
Exif Version                    : 0221
Date/Time Original              : 2011:08:24 13:13:33
Create Date                     : 2011:08:24 13:13:33
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/286
Aperture Value                  : 2.4
Brightness Value                : 6.992671928
Metering Mode                   : Multi-segment
Flash                           : Auto, Did not fire
Focal Length                    : 4.3 mm
Subject Area                    : 1631 1223 881 881
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 3264
Exif Image Height               : 2448
Sensing Method                  : One-chip color area
Exposure Mode                   : Auto
White Balance                   : Auto
Focal Length In 35mm Format     : 35 mm
Scene Capture Type              : Standard
Sharpness                       : Normal
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 21:08:30
GPS Img Direction Ref           : True North
GPS Img Direction               : 346.4727273
Compression                     : JPEG (old-style)
Thumbnail Offset                : 908
Thumbnail Length                : 12311
Image Width                     : 3264
Image Height                    : 2448
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Aperture                        : 2.4
GPS Altitude                    : 1222 m Above Sea Level
GPS Latitude                    : 37 deg 44' 10.80" N
GPS Longitude                   : 119 deg 35' 58.80" W
GPS Position                    : 37 deg 44' 10.80" N, 119 deg 35' 58.80" W
Image Size                      : 3264x2448
Scale Factor To 35 mm Equivalent: 8.2
Shutter Speed                   : 1/286
Thumbnail Image                 : (Binary data 12311 bytes, use -b option to extract)
Circle Of Confusion             : 0.004 mm
Field Of View                   : 54.4 deg
Focal Length                    : 4.3 mm (35 mm equivalent: 35.0 mm)
Hyperfocal Distance             : 2.08 m
Light Value                     : 11.3

 

If you look at this data a few things pop out. There really is GPS location data inside, and just like before the iDevice also encodes what direction the phone was pointing (compass data) when the image was captured.

This first photo was captured in Yosemite National Park on August 24th 2011, a full one month and 10 days before its announcement on October 4. Interesting.

Image 2 – IMG1664

This second image is of some waves breaking on a rocky beach and shows very nice detail. Just like the first image, it too includes GPS data and the creation date.

Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Rotate 180
Date/Time Original              : 2011:08:29 18:50:23
Create Date                     : 2011:08:29 18:50:23
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Below Sea Level
GPS Time Stamp                  : 02:27:00
GPS Img Direction Ref           : True North
GPS Img Direction               : 357.1590909
GPS Altitude                    : 0 m Above Sea Level
GPS Latitude                    : 38 deg 26' 28.20" N
GPS Longitude                   : 123 deg 7' 36.00" W
GPS Position                    : 38 deg 26' 28.20" N, 123 deg 7' 36.00" W

I’ve truncated the exported data for this image since the same format as the previous one. Note zero feet above sea level, indeed this checks out.

This photo was taken at goat rock beach on August 29th, five days after the first image, and one month 5 days before the announcement. What’s intense about this image is that if you study the google satellite view enough, then take into account the pointing direction, you can actually see the rock in the photograph.

Image 3 – IMG0032

This image is a landscape photo with a waterfall in the distance.

Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Horizontal (normal)
Date/Time Original              : 2011:08:25 09:27:36
Create Date                     : 2011:08:25 09:27:36
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 17:26:10
GPS Img Direction Ref           : True North
GPS Img Direction               : 254.5312024
GPS Altitude                    : 1192 m Above Sea Level
GPS Latitude                    : 37 deg 44' 38.40" N
GPS Longitude                   : 119 deg 35' 30.60" W
GPS Position                    : 37 deg 44' 38.40" N, 119 deg 35' 30.60" W

This one also includes the GPS location and pointing data.

Upon inspection, we can see this photo was taken also at Yosemite National Park and on August 25th 2011. It seems very likely this was taken by the same person who took the squirrel photo, given the fact that it’s a day later and in the same region in the park – perhaps a camping trip or something?

Image 4 – IMG1295

This image is of a person holding a flower up to the camera showing shallow depth of field and some serious bokeh. The subject is the same as shown in the 1080p video sample Apple provides, and appears to lack GPS data of any kind, but was taken on August 29th.

Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Horizontal (normal)
Date/Time Original              : 2011:08:29 15:54:02
Create Date                     : 2011:08:29 15:54:02

Image 5 – IMG0945

This image looks almost like a test scene, and includes some potted herbs, drawers, fruits, lemons, and a bunch of different knick knacks. The EXIF data for this one includes GPS data.

Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Horizontal (normal)
Date/Time Original              : 2011:08:30 14:01:03
Create Date                     : 2011:08:30 14:01:03
GPS Latitude Ref                : North
GPS Longitude Ref               : East
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 13:25:21
GPS Img Direction Ref           : True North
GPS Img Direction               : 21.31747484
GPS Altitude                    : 342.1 m Above Sea Level
GPS Latitude                    : 50 deg 55' 6.60" N
GPS Longitude                   : 14 deg 3' 24.00" E
GPS Position                    : 50 deg 55' 6.60" N, 14 deg 3' 24.00" E

So far the images we’ve seen have been from just inside the US – this image is from the Königstein Fortress in Germany of all places, and was taken on August 30th.

This one is particularly interesting since it’s a great demonstration photo but also is the only sample image not taken in the US.

Image 6 – IMG1401

This image also has no GPS data, which means it possibly was taken by the same iPhone 4S as number 4 (and this user disabled location services for the camera app), or just someone else who was likewise cautious to not include position. This image is a macro of some flowers.

Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Horizontal (normal)
Date/Time Original              : 2011:08:29 17:30:26
Create Date                     : 2011:08:29 17:30:26

This image was taken on August 29th, however.

Image 7 – IMG1720

Likewise, this one also lacks GPS data, but shows a beach at dusk (thus, west coast) and appears to have been taken likewise on August 29th in the evening.

Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Horizontal (normal)
Date/Time Original              : 2011:08:29 19:28:56
Create Date                     : 2011:08:29 19:28:56

Image 8 – IMG0940

The last image shows the same hot air balloon as shown in the 1080p video sample, and includes GPS data. We can see where this video (and likely image 4) was taken.

Make                            : Apple
Camera Model Name               : iPhone 4S
Orientation                     : Rotate 180
Date/Time Original              : 2011:08:30 10:33:45
Create Date                     : 2011:08:30 10:33:45
GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 18:48:01
GPS Img Direction Ref           : True North
GPS Img Direction               : 270.9027778
GPS Altitude                    : 31 m Above Sea Level
GPS Latitude                    : 38 deg 30' 13.20" N
GPS Longitude                   : 122 deg 46' 21.00" W
GPS Position                    : 38 deg 30' 13.20" N, 122 deg 46' 21.00" W

Oddly enough image 4 and image 8 were taken on different days, so this possibly is a different location. That said, the location appears to be the Kendall-Jackson winery right off the 101.

Like the beach photo, this is just up the coast from San Francisco. The photo was taken August 30th as well.

Conclusions

Apple took sample images for its iPhone 4S presentation between the dates of August 24th and August 30th, a little over one month before the public unveiling. It’s interesting to note that had you been fortuitous enough to be in Yosemite National Park on the 24th or 25th, you might have by chance seen an iPhone 4S snapping photos of scenery and squirrels. Other locations near San Francisco seem logical given Apple’s location in Cupertino, CA, leaving the photo from Germany an odd outlier.

It seems that for all the scrutiny placed on bars surrounding 1 infinite loop, being in picturesque locales one month before an iPhone unveiling is quite possibly another logical strategy for spotting an unreleased iPhone.

I have to come full circle and say that I’m impressed Apple really didn’t scrub data from its sample images. This is something even I do to provide some location anonymity in the course of uploading sample images, though as of late I’ve become sloppy with scrubbing all the GPS data from EXIF for each sample image.

 

 

My ZoneMinder Configuration

Why Home Security?

In recent months, home security and monitoring has become a matter of increasing concern across the country. Whether the reason is local downturn due to a spike in crime or just peace of mind, the price and difficulty of setting up an enterprise-level security system at home is lower than ever.

That said, the variety of hardware, open and closed source monitoring software, and configuration options makes it a bit daunting to jump right into. I’ve worked and experimented with a number of configurations and finally settled on one that I think works best (at least for my needs).

Camera Hardware

Camera 1 – Linksys WVC54GCA

Wireless-G Internet Home Monitoring Camera

I originally started out with just one Linksys WVC54GCA. It’s a 640×480, wired/wireless 802.11b/g network camera with built in web server for stills and video, and some simple motion detection and alert functionality. The reason for its choice was simple; price. It’s Linksys’ primary network camera offering, and you can find it as of this writing for $89 at newegg. In addition, there’s a newer camera with 802.11n, the WVC80N.

However, it isn’t perfect. To quote the cons of my newegg review:

Cons: Wireless range isn’t excellent; I have a very powerful wireless AP with a 12 dBi omnidirectional antenna and a 6 dBi directional antenna, and I had to reposition it so the camera could send video back at a decent bitrate (around 2 megabits is where it sits).

An important thing to note is that the latest .24 firmware breaks WPA/WPA2 support. Mine shipped with .24 and I had to downgrade back to .22 for it to work. A bit disappointing, but hopefully future firmware will fix this glaring problem. The linksys forums have the link to a custom built .22 (oddly enough with german language selected by default, but don’t worry, all the menus are still english).

Motion detection isn’t perfect, sometimes false positives will get annoying. I have sensitivity set all the way down and still get a few random videos of nothing going on.

More recently, I discovered that the software (despite being open source and a *nix derivative) locks up after anywhere between 6-24 hours when the camera is connected wirelessly. This is fixable (in a haphazard sort of way) by calling an internal page that reboots the camera every 3 hours through a schedule in my Tomato router:

Tomato Scheduler Screenshot

Thus far, this has proven a robust fix and makes the cameras entirely usable. I’ve notified Linksys and even had a chat online with a higher level tech that passed my findings on to a firmware engineer. They’ve recently released an update which purports to fix stability issues:

Version v1.1.00 build 02, Jun 15, 2008
- Support of Setup Wizard is temporarily disabled to address security issue
- Fix security issues
- Fix Camera stability issues

I have yet to fully test it. As an aside, the cameras are actually embedded x86 inside, sporting an AMD Geode SC1100 processor, 32? MB of SDRAM (2x TSOP marked PSC A2V28S40CTP), and Ralink 802.11b/g/a(?) chipset (RT2561T) as pictured.

AMD Geode SC1100

Camera visible, other SoC

RaLink MiniPCI card

Image quality is a little above average but nothing wonderful due to the relatively tiny plastic fixed focus lens system. Low light sensitivity is ok, but nothing stellar; you still need moonlight or ambient street lighting to get usable results at night. If you don’t mind those caveats, you’ve basically got the beginnings of a very robust (and cheap) network camera.

Night versus day performance

There are a number of relevant pages that are undocumented on the camera itself:

Reboot: http://USER:PASS@ADDRESS/adm/reboot.cgi

MJPEG stream: http://USER:PASS@ADDRESS/img/mjpeg.jpg

JPEG still: http://USER:PASS@ADDRESS/img/snapshot.cgi?size=3 (3- 640×480, 2- 320×240, 1-  160×120)

The options offered in the camera’s internal setup pages aren’t very robust, but offer just enough for you to do almost everything you’d want to.

Image Settings

Camera 2 – AXIS 207W and MW

After acquiring another Linksys camera for myself (and another 3 for the parents), trudging my way through the reboot issue, and reasonable but not stellar image quality, I decided I was ready for something more. Axis seems to have very good support, choice, and performance, in addition to heaps more customization and options for the camera itself. The catch? Price.

I decided to start off with Axis’ cheapest offering, the 207-series of network cameras. I managed to snag an Axis 207MW that had been used just once at a trade show that was being sold as used on eBay, and my dad went ahead and just purchased outright a 207W from Newegg. The distinction between the 207W and MW is that the 207MW has a 1.3 megapixel camera supporting resolutions of up to 1280×1024, whereas the 207W is just 640×480. They’re both 802.11b/g so you can move them throughout the house, and have almost identical setup and configuration pages. Of course, like the Linksys WVC54GCA, there’s optional ethernet support as well. Virtually all the other features are the same between the 207W and 207MW.

Axis 207MW (the 207W looks identical)

As of this writing, the 207MW is $328 at Amazon, and the 207W is $286 at Amazon.

Right off the bat, you can tell this camera is much different. It’s got an actual glass lens system, focusing ring, and a compact form factor with a longer cable. In addition, the antenna is external and swivels and snaps out so you can position it however suits getting the best signal. There are a variety of status LEDs on the back that make troubleshooting limited wireless connectivity simpler. The front clear ring is actually a large lightguide for four LEDs that can be either green or amber depending on the status of the camera. These can be disabled as well.

Day versus night performance on the 207MW

Image quality is also much better on the Axis 207MW than the Linksys. Originally, I had a WVC54GCA mounted where the Axis is now inside the garage. The Axis is both much more stable, and also gets better wireless reception outside in an otherwise difficult to reach trouble spot.

Among other things, the Axis offers many more configuration options within its internal administrative pages, as well as (if you’re interested in running it) many more options for built in motion detection. One of the more important things I’ve come across is the ability to change exposure prioritization so the otherwise very well lit driveway doesn’t come out a homogeneous white from pixels saturating as often. This kind of exposure prioritization can be done on the Axis, but not on the Linksys as shown:

Exposure settings

There are just a wealth of options that really make the Axis shine over the cheaper Linksys if you delve deeper. I could write pages about the differences that the extra nearly $200 makes (if you can afford it). Both cameras offer the ability to upload images and 5-10 second video clips of motion detection events to an FTP share, or attach them to an email. Detailing the differences between the two (and the ultimate shortcomings of both) is another article in and of itself.

At the end of the day, I found motion detection somewhat unreliable on both the Axis and Linksys; either I wound up with far too many motion event video clips or nearly nothing. Even worse, downloading and then watching hundreds if not thousands of false positives a grueling task. If you’re a basic user or just interested in having a camera for temporary purposes while you’re away on a trip, perhaps just the in-camera features are enough. However, if you’re looking for something more robust for a number of permanent cameras with much better motion detection, keep reading. At the end of the day, I use both types of camera just as inputs for ZoneMinder as you’ll see later on.

ZoneMinder Setup

ZoneMinder is a GPL’d, LAMP-based web tool for managing and monitoring virtually every kind of possible video source. Its supported sources span everything from cheap USB Logitech webcams, to network security cameras with built in webservers (like the two I’ve covered), to traditional video sources through a video capture card. Their documentation is a bit overly complicated (you can get to their supported hardware list here), and at the end of the day you’re going to either need to have local linux driver support (and a path to video like you’d expect for a webcam/TV tuner), or a path for JPEG, MJPEG, or another kind of MPEG4 stream.

The aim of ZoneMinder is to do all motion detection, video archiving, and image processing in one centralized place; simplifying use and making it easier to keep track of new events as they happen. Of course, the only downside to this is that all that motion detection and video capture requires a relatively powerful computer. Official documentation claims that even an ancient Pentium II should be able to do motion detection and capture for one camera at 25 FPS.

On the old computer I’ve configured (with a Pentium 4 Northwood 2.8 GHz and 2 GB of RAM), I’ve found that adding an 8 FPS VGA network camera and doing motion detection and capture adds between 10-20% CPU load.

Installation

Luckily ZoneMinder is relatively easy to setup if you’ve ever been near a modern linux distro with aptitude. As I noted earlier, ZoneMinder should ideally be run on a LAMP or similar web server, however, they claim that distro, web server, and SQL database support is actually quite diverse. I performed my installation on a fresh install of Ubuntu 9.10 Karmic by following instructions similar to Linux * Screw’s:

sudo apt-get install zoneminder apache2 php5-mysql libapache2-mod-php5 mysql-server ffmpeg

Once that was finished, the following:

sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
sudo
/etc/init.d/apache2 force-reload

http://_YOUR WEBSERVER ADDRESS_/zm/

At this point, I’d encourage you to enable user authentication in Options -> System -> ZM_OPT_USE_AUTH. Ticking this box and saving will enable another tab, Users. I generally configure one  admin for making changes and a less privileged “User” account for simply viewing the cameras and motion detection events as shown:

Users configuration

The remainder of options are largely fine in their defaults; the only major thing that you should be concerned with are the paths if you care about certain disks being used. I’ve recorded almost 800 events so far in VGA resolution and have used up an additional 1% of the meager 80 GB HDD on the system.

Adding Sources

Now, to add some video sources. This is where you really have to either know the path to either JPEGs or a MJPEG stream on the camera.

Click “Add New Monitor” in the bottom right. Now, if you have an Axis or Panasonic network camera (arguably the two de-facto industry standards) there are some presets that are worth checking out that you can use by clicking “Presets” in the top right. Change the source type to Remote (if it isn’t already from using a preset), and name it appropriately. I also usually set the FPS to either 5 or 8; from what I’ve seen, higher really isn’t feasible.

Now click the “Source” tab. This is where if you used a preset, your life is much easier, as the remote host path is already filled in. If not, it’s still simple, you just have to know how to get the relevant data from your source. In my example, I have the following:

Adding Axis network camera

From the above screenshot:

Remote Host Name: user:pass@_PATH TO YOUR CAMERA_

Remote Host Port: 80 (Or something else, if you’ve changed it)

Remote Host Path: /axis-cgi/jpg/image.cgi?resolution=640×480

Note that this is for the Axis 207 series cameras, although in general all the Axis cameras follow the same syntax (nice, isn’t it?). You can’t use whatever resolution you want, however, all the major and obvious choices work. You’ll notice I’ve just used VGA instead of the full 1.3 MP 1280×1024 resolution image from the 207MW. This is because using full resolution does seem to generate too much network traffic for my 802.11g network (despite my best efforts, the garage remains a dead zone thanks to chicken wire stucco construction), and FPS takes a large hit. No doubt that if the connection were wired, higher would be feasible. However, VGA is more than enough for now.

Adding the Linksys sources are just as easy given the paths I outlined previously. I haven’t added any internal sources, personally, however I imagine that configuration is the same if not easier; it requires knowing the path and setting a few additional constraints so you don’t overload your server.

Configuration

Now that you’ve added sources, you can configure their function.

Video source functions

You would think these options would be intuitive, however, they caused a bit of confusion for myself personally due to their shortened names. They are as follows, from the ZM documentation:

  • None – The monitor is currently disabled and no streams can be viewed or events generated.
  • Monitor – The monitor will only stream feeds but no image analysis is done and so no alarms or events will be generated,
  • Modect – or MOtion DEteCTtion. All captured images will be analysed and events generated where motion is detected.
  • Record – In this case continuous events of a fixed length are generated regardless of motion which is analogous to a convention time-lapse video recorder. No motion detection takes place in this mode.
  • Mocord – This is a hybrid of Modect and Record and results in both fixed length events being recorded and also any motion being highlighted within those events.
  • Nodect – or No DEteCTtion. This is a special mode designed to be used with external triggers. In Nodect no motion detection takes place but events are recorded if external triggers require it

In practice, my cameras are generally set to Modect, unless I have an indoor camera with particularly high traffic, in which case Monitor makes more sense since all the motion detection events would be me moving around and about (take it from experience, you see yourself doing some pretty strange things). This is also a nice way of judging how much load each camera adds, as the setting is pretty immediate if you’re watching htop.

With time, you should now have a zoneminder console similar to mine:

ZM Main Console

I’ve noted in particular how offline hosts appear red, while online hosts appear green or orange depending on their function.

Perhaps the only last area of configuration are the zones themselves (finally, the zone in ZoneMinder!) These define the regions of interest, in each video source, that will be used for event detection. Clicking on “1″ under Zones will allow you to modify the default zone for the video source. This is where you’re really given a lot of control far beyond anything in-camera will ever offer from even Axis.  You can add points and create polygons, as well as tweak sensitivity on an interface that looks like this:

Here, I've rejected a region that gives false positives; cars going by on the road.

Returning to the main “Console” view, the rest of the interface itself is relatively self explanatory.

Daily Use/Monitoring

If you’re interested in viewing all of the video sources currently enabled, clicking “Montage” should give a view similar to the following:

Montage view, including author

You’re also given the FPS below each camera, this is also handy. Lower resolution (eg I show a 320×240 source blacked out) cameras are somewhat intelligently tiled as well, using the available space pretty well.

Clicking on any of the events back on the console page should bring up something similar to the following, showing details about all the motion detection events from the given source (or all sources):

Hope nobody studies this in too much detail...

Clicking on any of the event IDs or names pulls up a window where you can review the event, from a few seconds before, to just after. You can also click anywhere below on the scrub bar to jump ahead or back, as expected. It isn’t perfect, but does a surprisingly good job:

A car enters my driveway at night...

Perhaps the coolest is “Timeline” view, a high-level plot of motion detection activity across all cameras overlaid on a timeline. This gives you an at-a-glance overview of whether the same events were being detected across all cameras at the same time, or to quickly pick out what time of day generates the most activity. In this view, mousing over times and activity as demarked by red on the plot refreshes the thumbnail appropriately, as well as with the detection region highlighted in red.

My timeline for all zones

It isn’t always the most useful way to review events, but perhaps one of the more unique. I’ve found it useful for reviewing a few days or weeks at a glance when I’m gone. There’s also certainly a nice pattern that emerges over time, at least for me.

Mobile

ZoneMinder supposedly has a nice mobile view available, however, I’ve had relatively little experience with it and had difficulty enabling it on my iPhone 3GS. Viewing the normal ZM site works fine, however, motion detection playback doesn’t work all the time.

In the meantime, I continue to use IP Vision for monitoring all my MJPEG sources:

IP Vision on the iPhone. Streaming MJPEG!

If you’re interested in me detailing this, just let me know. Setup is again straightforward and merely involves knowing the correct paths and forwarding a few ports in your router. Also, it’s a great way to quickly consume tons of 3G bandwidth!

Conclusions

Setting up a robust, nearly commercial-level reliability home video surveillance system is now easier than ever thanks to the huge variety of video hardware and open source software available. I’ve moved from one single camera with in-camera motion detection sending alert emails with 5 second video clips to a gmail account (which quickly filled to the limit), to a secure and expandable motion detection suite monitoring at times 7 cameras that is accessible virtually anywhere I can get online.

If you’re only interested in home monitoring during a vacation or time away, setting up a system like this might not be the best solution, so long as you’re willing to sift through either an FTP dump full of videos and stills or a gmail account choc-full of videos. However, if you’re serious about having a manageable system with a number of fixed (or PTZ!) cameras that you need constantly monitored, ZoneMinder makes sense and gets the job done. In the future, for serious users, it can even be hosted commercially or simply store the event cache on a network share elsewhere to prevent physical tampering or theft.