Navigation

June 22, 2009

K-7 as a movie camera -- PART I: The technical foundation

One of the more exciting features of the K-7 is its ability to record video in HD.

I will not repeat the specifications here. But it has an excellent 720p@30Hz recording mode and a 1536x1024p@30Hz mode which is almost full HD and can be used to create FullHD footage. In practice, it writes MJPEG at about 50 MBit/s and therefore can often outperform video recorded in AVCHD.

Many would think that Nikon D90 was the first dSLR sporting HD video. But this is only true 50%. The earlier Pentax K20D already included the ability to record video at 1024p@21Hz, although limited to clips of 5.6s each. So, the video funtion in the K-7 is regarded as already being version 2 by many Pentaxians.

My article about video will come in three parts:

  1. The technical foundation (this part)

  2. Controlling video recording in practice

  3. Samples videos



PART I: The technical foundation


I am the kind of person who needs to look under the hood. Driving is fun. But seeing and grabbing the engine underneath is fun too ;) Read what I've found out.

First of all, video from a dSLR isn't a trivial thing to implement. Of course, one could read out all 14.6 raw million pixels 30 times a second (or at least 24) and construct the corresponding video frames, ideally by supersampling pixels into the smaller size, and compressing to a video codec. But this implies a tremendous processing load (i.e., processing 6.53 GBit/s raw input data in real time!). Implementing it this way (and I think Canon does it this way in their 5DmkII) makes the camera significantly more expensive than would have been required by still photography alone.

Pentax choose to implement it in a way which doesn't increase cost at all. The sensor of the K20D can be read out at a rate of 750+ MBit/s, or 375+ MBit/s per each of its two channels. This is exactly enough to support 3.3 fps at full resolution. In order to support 5.2 fps with the K-7 (seemingly 6.0 fps in the Samsung GX30), Pentax/Samsung doubled the number of channels to four and the K-7 sensor can be read out at a rate of 1.5 GBit/s. As staggering as this figure may seem, it is still only ~20% of what would be required following the approach above. It would have been somewhat easier with a 6 MPixel camera though ;)

Therefore, Pentax created a special subsampling mode where only every 6th raw pixel value is read out from the sensor at 30 Hz. This special signal is always used to create live view, zoomed live view and HD video frames, for all of Pentax K20D (21 Hz), Pentax K-7, Samsung GX20 (21 Hz), Samsung GX30 and Samsung NX' electronic view finder.

Because an HD video has only 2 MPixels (or less) which is about only 1/6th of pixels of a 16:9 still image, this means that at the same ISO step, pixel noise from a video frame and from a still image will look very similiar. Of course, using only every 6th pixel looses 2.5 EV stops in low light performance compared to ambitious supersampling approach. However, even 1/6th of the surface of an APS-C sensor is still a lot larger than the combined surface in dedicated 3 chip HD camcorders. So, videos in low light will look good. It is just that they could look even better.



The subsampling matrix


How are colors reconstructed if only every 6th pixel is read? This is a problem because standard demosaicing techniques as known from a Bayer matrix don't apply. Rather, color is constructed from picking values out of the Bayer matrix with a given color filter. Below is one variant of possible locations where color values are picked from:


(note: if you click onto the image, you can find another variant which most likely would yield better results.)

As you can see, the submatrix forms a pattern repeating every 6x6 pixels. Only 6 pixel values are picked from such a 6x6 area, producing 2 RGB pixels, e.g., as outlined by the black boundaries.

To tell the truth, Pentax applies a little bit of demosaicing magic and produces 4 RGB pixels from the information of 6 raw pixels. However, it does it in a rather bad way leading to the (arti)fact that two horizontally adjacent RGB pixels have very similiar values, almost reducing the advertized resolution of 1536x1024 down to 768x1024. In part three, however, we will see that part of the information is still there. We'll call this effect the "768-aliasing artifact".

Another problem with the subsampling matrix is that colors are spatially translated, i.e., the green channel sits left of the red+blue (=purple) channels within the subsampling matrix. This leads to green fringe where contrast changes from bright to dark (left to right), and purple fringe where contrast changes from dark to bright. You can see the effect in the following image:



(400% crop of a video frame, left from the K-7, right from the K20D)


You can see the fringe effect which is exactly as wide as the 6x3 subsampling matrix (2 pixels in horizontal direction). Also, K20D and K-7 share almost the same subsampling matrix, with a bit less of the "768-aliasing artifact" in the K-7.

There is a simple experiment that demosaicing of the subsampling matrix is very rudimentary indeed: Pierce a tiny hole into a black cardboard, position the K-7 on a tripod ~10 m away and zoom into the hole image using 10x zoomed live view. With a sharp lens, at most a single raw pixel in the subsampling matrix is hit only. What you see on the rear screen, is an image of the hole which is either dim or bright, in an arbitrary color, depending on minor movements of the camera. The hole is dim if a raw pixel which doesn't take part in the subsampling matrix is hit.


So, to summarize, some fringe (false colors) and jaggy edges are artifacts resulting from the way video frames are extracted from the sensor. Note that the effects are much less visible in 720p which is supersampled from the 1526x1024 feed. The K-7's 720p video quality is stunning.

You may look at the 1536x1024 recording quality as being the "raw image equivalent" for 720p final images. Needing post-processing but retaining extra headroom.




Rolling shutter


Another common problem with video in dSLRs is the rolling shutter. Because the mechanical shutter is too slow for 30 fps, it stays open all the time and an electronic shutter is used. In the K-7, the sensor is read-out line by line in progressive order, bottom edge first, within a period of ~1/30s. Because the image is projected head down, the lines at the top of a final image have been read-out earlier than the lines further down. If the camera is panned, e.g., left to right, then vertical lines become slightly skewed, e.g., tilted anti-clockwise. Therefore, this effect is called skewing effect or jello effect as well.

The jello effect does actually bend non-horizontal straight lines if they are rotating with respect to the camera (so, avoid tilting the camera when recording). It can produce funny images with rotating structures, like propellers, actually :)

As for the K-7, this effect is very well controlled. The skew is exact and without extra jagginess. I.e., the read-out is uninterrupted. Very good! If combined with a bit of motion blur, it becomes almost invisible. I would say that the rolling shutter is almost a non-issue with the K-7. Combine this with the lack of motion-compression artifacts and a gray filter maybe, and the K-7 can produce really stunning panning action.



Video compression codec


Another strong point is the selection of high bitrate MJPEG as the compression codec. Not being an amateur's first choice, it offers greater headroom for post-processing. Individual frames are JPEG-compressed and about 200 KBytes large. The JPEG compression artifacts are visible on larger than 100% inspection but don't disturb. Also, MJPEG is an easy format for post-production. And, it doesn't cause extra burden on the in-camera processing engine.

The container is "Motion JPEG OpenDML AVI" and can be opened on all platforms, e.g., using Apple Quicktime. Of course, for long-term archival, MJPEG needs to be recoded (e.g., to MP4 AVC) to save space.



Audio


The K-7 has a built-in mono microphone capturing a clear sound in the absence of any wind.

It does have a plug for a stereo microphone too. I tried the RØDE Stereo VideoMic connected to the flash hot shoe and it produces excellent results.

It plays back audio over the built-in speaker which is really bad, though ;) For decent audio in the field, one would require an HDMI-capable field monitor with a headphone jack. Yes, I checked that audio is played back via HDMI.

The audio quality seems to be good too. The format is 1 or 2 channels of 16 Bit, 32 kHz PCM.



Temperature


After 5 - 30 minutes of continued video recording, a red thermometer pops up on the rear screen and informs about increasing temperature. I didn't have any recording stopped by temperature alert. But it may be a concern in very hot regions, full sun shine and for extended scene recording.

(Update) I've test-driven continuous video recording at 27°C ambient temperature for 40 minutes. The red thermometer appeared after about 15 minutes. But the camera didn't interrupt. The camera felt warm and burned one out of three battery marks.

A still image shot at the end was ISO 800 and 40°C. It shows a very faint vertical line in the middle, about as pronounced as the ISO800 noise and only visible against a uniform background at 100%, invisible in normal photography. Even invisible against the uniform background are additional vertical lines exactly 256 pixels apart. I don't consider this hot temperature banding to be significant considering it is from a pre-production sensor.

Other observations: right after movie recording with temperature alert, the camera refuses to enter LV but still enters movie mode and continues recording movies (or allows still images using the viewfinder). Only 20s after movie recording, it accepts LV again, incl. the red thermometer. After 2 minutes, the red thermometer has disappeared.

I think at below 30°C ambient temperature, it won't emergency-break a movie recording. (end of update)


This shall conclude Part I. Next will be a discussion about making the K-7 video feature more accessible for real projects.

-> Continue to part II

June 20, 2009

Catwalk in Glockenbach quarter, Munich


On my way back home today, I ran into the preparation for a public catwalk in the streets of Munich. More precisely, Glockenbach quarter which is pretty known for cool events like this.

For the curious: the fashion designer and store owner is Svenja Jander, a cool new designer.

Great, so I grabbed "my" K-7, two limiteds and a flash and hurried back for prime time :)

People having shot catwalks may know that it is harder than it appears. The models run fast, and in this particular case, daylight was already low and artificial light provided was sparse (well, one lamp exactly lighting up the models passing by, for 1/2s maybe ;) ). My fill flash helped a bit, just a bit though. Nevertheless, compared to earlier experience with the K20D, I had a much higher rate of keepers this time. I like to use the DA 40 Ltd. in events like these and today was no exception. Unfortunately, I had no opportunity to mount the 70mm. When I was ready to change subject, the show was over, already :(

I didn't shoot burst and therefore, the higher number of keepers is mainly accounted for by a better and faster autofocus. I was quite pleased except for the fact maybe that I still got out-of-focus shots ;) Seems, the K-7 cannot produce wonders but it was a reliable tool indeed. And if you are wondering if others can produce wonders, here is a comment from a photographer shooting Nikon at the event: "Oh oh, the models ran sooo fast ..." :)

Looking at some of the missed photos again, many have motion blur actually. Despite flash and 1/100 - 1/180s ... If you look at some of the photos below, you can feel the motion, actually.

Another photographer shooting Pentax K20D, K100D, with triggers and big flash lighting box, got a big smile when he saw me and a Pentax in my hands. And he got pretty shocked to read "K-7" printed on it. He had never heard of it! ;)


One more comment about the photos you're going to see below ... They are all (sometimes heavily) processed and/or cropped and (except for one unprocessed original). My aim was not to reproduce what I saw! The photos are not meant for measurbation (if spelled correctly). I present them more as an illustration of what I could artistically achieve with a K-7, a DA40, a Sigma flash and little preparation. Others may do better.


Here you go ...


Nymph
A 100% crop (when clicked) of the photograph above.


A nice walk


Shine, baby shine

(Please, click on the photos for enlargement, select size from the toolbar. Please, respect the copyright.)


If you enjoyed the images, then you may be interested to visit the entire gallery here:

Catwalk Glockenbachviertel Jahnstreet


Enjoy,
Falk

June 19, 2009

Comparative resolution study K-7 vs. K20D


This blog article was initially meant to be part of the noise article. However, the matter turned out to be much more intricate than I thought (and somehow, it still is). So, I made it a separate article again owned by falconeye.

I would have loved to make it a short answer. However, I am going to tell you a story instead. I am sorry that Falk Lumo will have to wait with his catwalk beauties ;)

In the top of the article, you see a (synthetic -- more on this later) resolution test shot for the K-7. Please, click on it and open it in original size, and scroll to make the center visible. Note that what you see is the inner part of a special edition of the ISO 12233 test chart. Special because it contains insets of 4x resolution. I made this edition to be able to measure today's dSLRs. It is printed in A2 size and the printer's dots start to form Moiré at figure "8.5" in the chart insets, i.e., between "8" and "9". No big deal, just something to keep in mind.

For more information about the ISO 12233 test chart, you may want to visit this link:
http://www.imatest.com/docs/sfr_instructions.html

Also, note that the test chart only fills 86.7% of the picture height. As a consequence, the chart figures have to be multiplied by 460 (rather than 100) to yield LW/PH (line widths / picture height). Read, the K-7's Niquist limit is at chart figure "6.7". There shouldn't be any structure beyond this number.

Now, look at fields labelled "7" or "8" (we ignore "9" and higher for the reason given above). There still is structure but it is just Moiré, not the proper line pattern which is printed. So the lens plus AA (anti-alias) filter outresolve the sensor and we pick up a pseudo pattern which basically is a sampling error (which is what is called a Moiré pattern). Would lens plus AA filter be at the sensor resolution or below, than we would have uniform gray fields labelled "7" or "8".


First result:

The K-7 has an AA filter which allows to outresolve the sensor. It better has :)


Now comes the tricky part. Because we want to compare with the K20D which we must assume does have an AA filter which allows to outresolve the sensor, too. How on earth shall we measure a resolution beyond the sensors' capabilities? If I a had the accuracy and software of a testing lab at my disposal, I would extract these numbers from subtle details in the respective MTF figures; but I don't.

First, let's verify that the K20D is close indeed. Here is the corresponding synthetic resolution test shot for the K20D:



Oh yeah, just as nice :)
(About 3 visible fine white rings in the center circle.)

Ok, let me get serious now (which means that most likely, you're gonna run away before the end of the article -- just make sure to join in for the verdict ;) ). In order to study the AA filter's effects, I will apply a technique called superresolution. This technique involves taking multiple test shots (16 in this case) and creating a synthetic image at twice the native resolution, i.e., an 58 MPixel image! In order to construct this image, a "kernel" (deconvolution with a native pixel's PSF (point spread function)) is involved. By pure accident, I happen to have a kernel which rendered me good service with my K20D. Let me call this kernel "Falk1". I refrain from describing the exact procedure here... Let's just accept that, by some miracle, we now have test images at twice the resolution.

Because they are so large, I will only present crops (200% crops = 100% crops of superresolved image). Let's call them supercrops. First, for the K-7, next for the K20D.




Now, we see 5 rings and we suddenly see a difference, too! However, let's be cautious. The K-7 image has some artifacts. In the K-7 supercrop, the lines have more false color and more interestingly, the end of lines have a bubble artifact. E.g. look at the "5". From my experience with the superresolution method, this is a strong hint that the kernel (Falk1) overcorrected (similiar to the artifacts from oversharpening). While undercorrection just leaves some softness, overcorrection can have more funny effects ;) The assumed PSF was too wide. With a narrower PSF (Falk2, to be developped now ;) ), the supercrop would have looked better.


Second result:

From this, I am going to conclude that the AA filter in the K-7 is a tad weaker than in the K20D. This would also easily explain the pick-up of some false color in the demosaicing process.

But let's assure that this is a very subtle effect. Just any microscopic change in focus will add the softness required to make K-7 supercrops look like K20D supercrops. Here is an example from an earlier (premature) series I shot while doing the noise tests. Now, the difference is gone.



The images are with a Pentax DA 70mm Ltd. at f/5.0. Except for the last, shot with a Zeiss 50mm at f/4.0. And I did verify that a Zeiss 50mm at f/4.0 produces the same bubble artifacts when in precise focus.

One last thing ...

The images shown so far have all been synthetic. I.e., they are downsampled from the superresolved images. Here are three unaltered sample resolution images as shot:



Unaltered resolution test shot, K-7 + DA 70mm Ltd. @ f/5.0
(Note: underexposed on purpose)


Unaltered resolution test shot, K20D + DA 70mm Ltd. @ f/5.0


Unaltered resolution test shot, K-7 + Zeiss 50mm @ f/4.0 (from "premature series", 4.5% larger)

Interestingly, the unaltered sample image from the K-7 looks just a tad softer than from the K20D. Which is why I showed a third sample (with the Zeiss) to verify that this is within a range of insignificant variation. This is the reason why I consider the matter to be intricate still. Some samples tell a different story than other samples ... But it is all in the subtle details, anyway.


Verdict:



Pentax K-7 and K20D both have an AA filter of very similiar strength. It is pretty hard to say which one is weaker. I take my bet and say the K-7 has the weaker AA filter.

But by just so little that in almost all normal shooting conditions, I expect to see no significant difference in practice. The above image summarizes the data this verdict is based upon.


These and more test images are in the following image gallery:
Resolution and Noise of K-7 vs. K20D
Please, visit for further details.



Still here?

Well, one more last thing ...

Myself (and I know of at least one other alpha tester as well) have been wondering why the images on the rear screen, when magnified after the shot, don't look as crisp as with some other makes. One could think that the images are a bit soft. So, I made a test and compared the magnified image on the rear screen with a 1:1 crop as developed by Lightroom with default settings.



As you can see, the image on the rear screen, when magnified after the shot, does indeed look a bit soft. Even if it is perfectly crisp on a computer screen. I verified that this holds true for in-camera JPGs as well (to a slightly lesser extent). I think that this is something to keep in mind when working with the K-7. Even though it has a VGA screen and goes up to 32x magnification, it never shows the pixels. Probably a feature rather than a bug;) This may have been part of early rumors that the K-7 produces softer images than the K20D. My tests have not been able to confirm this.


Still here?

Then you must be waiting for the catwalk models ;)
Thanks for your patience and interest.

June 18, 2009

Comparative noise study K-7 vs. K20D


Today, I found the time to shoot images from a K-7 and a K20D side by side. In this article, I will highlight the differences in noise between the two cameras.

This is particularly interesting because Pentax used a 2nd generation version of the sensor used in the K20D, a 14.6 MPixel APS-C sensor now famous for its beautiful images when used with an excellent lens.

I am not interested to compare the advances in the camera's built-in JPG engine and its noise reduction (NR) algorithms. I am sure they are significant. I am interested in the best quality I can get from the camera, i.e. from RAW.

Test methodology:

- Almost constant lighting, although not perfect (indirect sun light)
- Constant setup:
- My "special" 400% ISO test chart on a wall.
- Constant exposure at EV 9.
- Again, underexposed by ~ -0.7 EV to exhibit more visible noise (to make it "gray").
- Second image underexposed by ~ -1.7 EV (EV 10).
- Tripod, K-7 MLU and K20D 3s timer, both via remote control.
- Zeiss 50mm/1.4 at f/4.0, manually focussed using magnified live view. (The Zeiss 50 is sharper in the center at f/4.0 than f/5.6.)
- Focus series for a resolution test (pending).
- Late sun and wood floor made a nice 3900 Kelvin color temperature.
- Shot in RAW (K20D: PEF, K-7: DNG) and exported by Lightroom using default settings.

Caveats:

- No colors.
- Focus was only almost perfect in the noise test.
- Only one camera of each type tested.
- My camera is a preproduction unit (with final firmware) which may give slightly inferior results to a production camera. Therefore, subtle differences may not be significant.

-- Begin of update --
Clarification:
The interpretation as authorized by Pentax is as follows: Tests carried out with preproduction units and final firmware are allowed to be taken representative of final quality. There won't be a noticeable difference when just inspecting photographs. However, there may be numeric differences when tests are carried out by a quantitative lab test, and if so, in favour of the production cameras. Therefore and because I didn't publish test figures, this blog article must not be considered premature.
-- End of update --

Results:

All results are presented as 100% crops prepared for easy inspection here:

Resolution and Noise of K-7 vs. K20D

Please, have a look before joing my conclusion (note that you'll see snippets magnified by 15x!).


Verdict:

The noise from the K-7 and the K20D almost look the same. If there is a slight advantage, then it would go to the K20D. But the difference is so marginal that I say:

There is no significant difference in noise from black & white subjects in raw files from the K-7 and the K20D.

The K-7 produces excellent results up to ISO 1600, and ISO 6400 remains reserved for smaller image sizes. It is however remarkable how much detail is preserved in even ISO 6400!
This is what Pentax is known for: Details rule over noise!

June 17, 2009

K-7 final firmware and tungsten high iso noise

I have just received the final firmware v1.00 and wanted to make available some samples shot at ISO 400-6400 in tungsten light (2900/2950 K, using Auto WB). Shot with the kit lens and AF focussing onto the SD card in the center.

This is a preliminary article and my evaluation of noise is pending. Also, the subject is not ideal (colors missing, no gray card). I was in a hurry. The ball's surface has a subtle texture looking like noise but not being noise (in iso 400)! So, this may be used to compare denoising artifacts.

The camera was set to "natural" (default is "bright") and default settings otherwise (i.e., sharpness -1, NR medium, NR start iso800).

The images are here (out of camera or Lightroom standard settings):

K-7 Tungsten high iso noise


And the DNG raw files are here:

http://www.file-upload.eu/download-1709906/IMGP0006.DNG.html
http://www.file-upload.eu/download-1709919/IMGP0007.DNG.html
http://www.file-upload.eu/download-1709926/IMGP0008.DNG.html
http://www.file-upload.eu/download-1709937/IMGP0009.DNG.html
http://www.file-upload.eu/download-1709948/IMGP0010.DNG.html



Disclaimer:
Preliminary test, firmware is final but the sensor in my preproduction camera is said by Pentax to be different from the final one!

This is very warm tungsten (below 3000 Kelvin). In daylight, the noise would be much less. Also, ISO6400 is not a fully advertized feature.