Pixel shift resources

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

chris_ma
Posts: 572
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Pixel shift resources

Post by chris_ma »

Hello everybody,

I'm new to this forum, been browsing a lot and benefitted enormously from the collected knowledge here!

I'm working on a project which requires high-high resolution macro shots of flat objects in the 0.5x to 2x range and since I want not only high resolution but also try to avoid moire from the bayer pattern I've been looking at pixel shift solutions intensively. I bought a Pentax K-1 and will post results as soon as I get my setup working, but in the mean time I thought I'd share a few links I've found on the topic of pixel shift:

One of the best recourses I've found is the studio scene from dpreview. A nice comparison can be found in the lower part of the article here:
https://www.dpreview.com/news/564575561 ... landscapes
I like to look at the small text just above the center, the colored circles in the lower semi-right, the coin/banknote in the lower semi-left, and the etching print picture to the semi-left.


there's also a fantastic version which shows noise/dynamic range improvements

there's also a new page which includes the Panasonic S1R:
https://www.dpreview.com/articles/35281 ... -published
I find it interesting that a higher pixel count of the Phase One XF 100MP clearly has higher resolution on things like text, but also more moire on the color circles or the etching.
It also shows that the Panasonic S1R doesn't seem to be a bit soft on the image data.
It's worth noting that they use different lenses for the cameras, so it's not a fully controlled comparison. for example the Pentax lens shows quite a bit of magenta fringing on the Siemens star even on the center.

then some experiments on creating super resolution without pixel shift:
https://www.dpreview.com/articles/07276 ... any-camera

and finally a nice page which shows the effect of choosing the right software for the processing:
http://redredphoto.com/blog/equipment/p ... xel-shift/

hope that is some use
chris

[edit to try to make the links shorter]
Last edited by chris_ma on Sun Apr 28, 2019 10:20 am, edited 3 times in total.

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Chris, welcome to the forum. I also have the Pentax K-1, though I have modified it to have a Nikon mount (maintaining infinity focus). None of my pixel-shifted photos with that camera ever have the purple cast that the dpreview tests show.

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

I should add that as of a year ago, I found the best RAW processing for the K-1 seems to be RAW Therapee, which was left out of the processing tests in the article you linked to. You might want to try it. The other programs might have improved their pixel-shift support since then, however.

chris_ma
Posts: 572
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Post by chris_ma »

Hi Lou,

thanks for the tip for RAW Therapee, will try that out as well.

I didn't mean to suggest that the K-1 has any problem with magenta cast, I'm rather suspecting that the lens they used for the Pentax has some fringing problems.

Very interested about the modified mount on the Pentax. I'd much prefer that too over the Pentax one - was it difficult/expensive to modify? (sorry for getting off topic so fast on my first thread)

chris

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

sorry for getting off topic so fast on my first thread
I like threads that wander, as long as they have distinctive searchable words for each subject. (Searchable phrase: Pentax mount conversion.) I wrote a post about the conversion here:

http://www.photomacrography.net/forum/v ... sc&start=0

It was challenging and risky and not entirely satisfactory, but I do love using this camera with my Nikon lenses. Nikon still hasn't managed to include pixel-shift technology in their cameras, so they lost me.

In retrospect, there are several things I would try to do differently if I were to do it again. In my original approach I was not able to conserve the function of the mounting lock pin. This means the camera+lens has to be handled carefully or the lens could fall off. That's fine for stacking but not for carrying around outside on hikes. Also, some Nikon lenses have rectangular baffles, but my conversion rotates the mount because of the arrangement of screw holes, so that when the lens is fully inserted, it's "top" is rotated about 20 degrees, and the rectangular baffles don't match the sensor orientation. This can be solved by not fully rotating the lens in the mount, but that can be risky.

In the end, I am thrilled that I did it without wrecking the camera, and I can't imagine using the camera without this modification, since I have a lot of very specialized Nikon glass and no Pentax glass.

Note that if you don't care about infinity focus (for example, if all your lenses are on extension tubes and don't have floating elements as the lens is focused, you don't need to do any customization; there are simple adapters from Pentax to Nikon, see the discussion at the link above. But you will lose infinity focus or using the floating elements in incorrect positions when focused at the new sensor distance.

chris_ma
Posts: 572
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Post by chris_ma »

thanks for those detail, I'll probably go with a simple adapter then since I don't really need infinity focus at the moment.

had a quick look at RAW Therapee, probably I'm not using it to full capacity, but with the default settings I get serious aliasing. Lightroom is very very clean. here some quick samples of the studio scene:

Lightroom at 0 sharpening and without lens correction:
Image

RAW Therapee at default settings:
Image

and another one:
Lightroom at 0 sharpening and without lens correction:
Image

RAW Therapee at default settings:
Image[/img]

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Glad to hear you won't have to risk your camera. As long as you are using bellows or extension tubes between the lens and camera, there's no reason to take the risk.

I am surprised by that Raw Therapee result, if those are pixel-shifted images. I have never seen aliasing on pixel-shifted images. Can you confirm that these are pixel-shifted images?

RT is the only developer that gets red tones right on my Pentax RAW files.

chris_ma
Posts: 572
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Post by chris_ma »

Lou Jost wrote:I am surprised by that Raw Therapee result, if those are pixel-shifted images. I have never seen aliasing on pixel-shifted images. Can you confirm that these are pixel-shifted images?
It might well be that I'm doing something wrong, or that the mac version doesn't have the feature implemented properly. the page here definitely shows better results and that's back from 2017:
https://pixls.us/articles/rawtherapee-a ... xel-shift/

the latest version for osx I downloaded does recognise it as 4 images pixel shift in the info tag though:

Image

edit:
the file can be downloaded from the first link I posted, direct link here:
https://www.dpreview.com/reviews/image- ... 43dc31.dng

I also tried the .PEF file on the other test with similar results

chris_ma
Posts: 572
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Post by chris_ma »

another link I've found:
https://petapixel.com/2017/11/18/testin ... e-a7r-iii/

and Lou has made some real world experiments in another thread as well:
http://www.photomacrography.net/forum/v ... hp?t=39541

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Chris, thanks for linking to my experiment. I hope to do more of them soon.

One thing to keep in mind when reading the links is that there are currently two kinds of pixel shifting algorithms, and the difference between them is important.

The first kind is the Sony and Pentax four-shot shifting algorithm. This results in a new file with the same number of pixels as a non-shifted image. The only thing going on here is measurement of full color information at every pixel location, and perhaps, a little bit of noise reduction from averaging two green measurements.

The second kind is the Olympus and Panasonic eight-shot algorithm. This quadruples the number of megapixels in an image. It is more computationally intensive, and it has the ability to resolve details that are invisible in the unshifted image. However, the algorithm isn't good enough to resolve four times the detail of the unshifted image, so some of the extra megapixels are wasted. Also contrast is lower for this interpolated detail. Olympus figures the real resolution of its 80Mp shifted image is just 50Mp, and others have estimated the number to be between 40-50Mp. Still, that's a significant improvement over the 20Mp unshifted image. But this algorithm can produce false detail in some situations. In the real world I had never noticed any problems, but Ray had noticed this in his shiny coins, and now I am seeing some examples in my experiments with synthetic targets I have created for this purpose. These seem like very special situations though, and I find the increase in resolution is usually real and very helpful.

Ray had also noted false detail in the Sony-Pentax four-shot algorithm, but I don't understand how that could happen if the camera was working properly, since the algorithm is only increasing the accuracy of the color measurements at each image "pixel". If time permits, I will add some examples with this algorithm in my experiment thread mentioned above.
Last edited by Lou Jost on Wed May 01, 2019 11:57 am, edited 1 time in total.

chris_ma
Posts: 572
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Post by chris_ma »

Hey Lou,

good point about the two different methods.
btw, the half pixel shift also gets used in the Arriscan motion picture film scanner to get higher resolution, but they use full RGB captures with a monochrome sensor.
Lou Jost wrote:The first kind is the Sony and Pentax eight-shot shifting algorithm.
I think you have a typo there and meant that it only takes four-shots (at least that's my understanding and also fits your description)
This results in a new file with the same number of pixels as a non-shifted image. The only thing going on here is measurement of full color information at every pixel location, and perhaps, a little bit of noise reduction from averaging two green measurements.
true, the noise reduction is really amazing though. mathematically we should get about two stops better shadow detail, but because the noise doesn't need to get interpolated in the debayering it really looks like much more (see the link in my first post above). so if you have very high contrast scenes you can recover more of the shadow detail.
Ray had also noted false detail in the Sony-Pentax four-shot algorithm, but I don't understand how that could happen if the camera was working properly, since the algorithm is only increasing the accuracy of the color measurements at each image "pixel".
Interesting. In the dpreview of the studio scene I couldn't see any false detail. Could be that it only shows up in certain scene, or that there was some movement in between shots.

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Thanks for catching the brain-typo.

About Ray's results, yes, I also have never seen false detail in reviews or in my own work with the Pentax. He shoots shiny coins so maybe something is special about specular reflections, or maybe his camera was bad. I love both kinds of shifting and find them very useful for studio work. I wouldn't buy a camera without it nowadays. This is what made me abandon Nikon.

chris_ma
Posts: 572
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Post by chris_ma »

found a page that shows an attempt to measure the resolution difference on m43 cameras:

https://jimchungblog.com/2019/04/28/can ... -res-mode/

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Those are interesting tests. I've only just read the linked article quickly, but his initial expectation that the resolution would double is known to be wrong. The theoretically expected resolution increase is not double. That's why Olympus hi-res jpgs are 50Mp instead of 80Mp. This suggests that the expected linear resolution increase is SQR(50)/SQR(20) = 1.6x, not 2x. This is very close to what he has actually measured.

rjlittlefield
Site Admin
Posts: 23621
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Lou Jost wrote:The theoretically expected resolution increase is not double.
Hhmm... I'm not familiar with that theory. Can you give some details or a link to them?

--Rik

Post Reply Previous topicNext topic