A comparison. Single-shot vs 4-shot pixel-shift

Begonnen von Beatsy, März 27, 2023, 20:53:37 NACHMITTAGS

Vorheriges Thema - Nächstes Thema

Beatsy

Hello all,

I just did a quick test to check if a home made oblique illumination stop would compromise focus stacking of 4-shot, pixel-shifted colour images (120 shots for 30 images). I thought some features might "wander about" as focus moved - but no problems were found. Woohoo!

As a side effect, I was able to construct this comparison image. It shows the difference between stacking 4-shot pixel-shifted versus one-shot RAW images. The latter were simply the first RAW file from each group of four pixel-shifted shots. This ensured that exposure, subject, field-of-view and lighting were identical throughout. All images were converted to uncompressed, 16-bit TIFF format for stacking (two lots of 30 images)

I used a Sony A7riv and a plan 40/0.75 objective. The brightfield condenser was wide open (NA 1.0 in air) with a small circular stop at one side, fitted close to the aperture iris. The composite image below is a 100% pixel-for-pixel crop into the 40 megapixel focus-stacked result(s).

Note: the purpose of 4-shot pixel shift is to ensure every pixel has fully-sampled red, green and blue components. With single shot, only one colour component (R, G or B) is sampled and the other two are calculated (guessed) by the debayering algorithm using colours from neighbouring pixels.

I admit this isn't particularly scientific; the oblique stop was too big (harsh) and I forgot to add a scale bar too (sorry). But I think the quality difference is pretty convincing. See what you think.

Cheers
Beats





Knowledge is cheap. Experience is not.

Nochnmikroskop

Hello Steve,
interesting post from you.
First of all, I would like to ask if you can set the comparison parallel to the diatom, i.e. at the centre line of the sharp area.
Then a question: are you sure that a single photo (without steady-shot, without image stabilisation) offers the same conditions as a first shot from the pixelshift, which you used for the comparison?
When using a tripod, or in this case a fixed connection to the microscope, the image stabilisation should be switched off. If you shift the sensor by 0.5 pixels at a time in pixelshift mode, then maybe there is movement in the whole system?
When looking at the image I think I can see artefacts in the image with the pixel shift, in my opinion the image with pixel shift is not better, not clearer.
A comparison with a resolution test chart would be interesting, or you can use your slide idea from post https://www.mikroskopie-forum.de/index.php?topic=46181.0 for a new comparison.

By the way, I use a Panasonic G9 and my Keyence microscope partly in pixel shift mode. A real gain in resolution is only minimal, if at all recognisable. Both systems have a lower overall resolution than the Sony, of course.

Curious greetings
Frank

Translated with www.DeepL.com/Translator (free version)

Hallo Steve,
interessanter Post von Dir.
Zunächst möchte ich fragen, ob Du den Vergleich parallel an der Diatomeen setzen kannst, also an der Mittellinie des scharfen Bereichs.
Dann eine Rückfrage: bist Du sicher, dass ein Einzelfoto (ohne Steady-Shot, ohne Bildstabilisierung) gleiche Bedingungen bietet, wie eine erste Aufnahme aus dem Pixelshift, welche Du für den Vergleich verwendet hast?
Bei Verwendung von einem Stativ, oder hier einer festen Verbindung zum Mikroskop sollte die Bildstabilisierung ausgeschaltet sein. Wenn Du im Pixelshiftmodus den Sensor jeweils um 0,5 Pixel verschiebst, dann ist möglicherweise Bewegung im gesamten System?
Bei Betrachtung des Bildes meine ich Artefakte beim Bild mit dem Pixelshift erkennen zu können, meiner Meinung nach ist das Bild mit Pixelshift nicht besser, nicht klarer.
Ein Vergleich mit einem Auflösungstestchart wäre dabei interessant, oder Du benutzt für einen neuen Vergleich Deine Diatomee aus Post https://www.mikroskopie-forum.de/index.php?topic=46181.0.

Ich verwende übrigens eine Panasonic G9 und mein Keyence Mikroskop teilweise auch im Pixelshiftmodus. Ein echter Zugewinn in der Auflösung ist nur minimalst, wenn überhaupt erkennbar. Beide System haben natürlich eine insgesamt geringere Auflösung, als die Sony.

Neugierige Grüße
Frank
Meistens Auflicht, alle Themenbereiche
Zeiss Axiolab, Keyence VHX, Olympus SZX16, Canon EOS 700D, Panasonic G9, Touptek u.a.

Beatsy

Zitat von: Nochnmikroskop in April 03, 2023, 20:42:44 NACHMITTAGS
Hello Steve,
interesting post from you.
Hi Frank, and thanks.

Zitat
First of all, I would like to ask if you can set the comparison parallel to the diatom, i.e. at the centre line of the sharp area.
Sorry, I can't because I deleted all the files (it was a test). However, given the oblique illumination, the top half has significantly different lighting to the bottom half, so the comparison would not be like for like. The diatom was a bad choice for demonstration really. As I said, I just took the opportunity to combine some files for a subjective comparison. It was a not a true scientific test.

Zitat
Then a question: are you sure that a single photo (without steady-shot, without image stabilisation) offers the same conditions as a first shot from the pixelshift, which you used for the comparison?
When using a tripod, or in this case a fixed connection to the microscope, the image stabilisation should be switched off. If you shift the sensor by 0.5 pixels at a time in pixelshift mode, then maybe there is movement in the whole system?
Yes, I'm sure there was no vibration. I used electronic shutter throughout, set a 2-second delay between all shots (in case sensor movement did cause vibration), stabilisation is always off unless handheld, and my microscope is sat on a vibration-damped optical bench (all my microscopes and extreme macro rigs are - I have 3 separate optical benches). Note: the sensor is shifted a whole pixel for each shot in 4-shot pixel shift. The 0.5 pixel shift is only used in 16-shot.

Zitat
When looking at the image I think I can see artefacts in the image with the pixel shift, in my opinion the image with pixel shift is not better, not clearer.
4-shot pixel shift is not intended to increase (spatial) resolution. All 4-shot does is ensure that each pixel is fully sampled for all colours (R, G and B). In single shot, only one colour (R or G or B) is fully sampled, while the other two are calculated (guessed) from adjacent pixels. That's the "debayering" process. What 4-shot definitely does improve is colour resolution. The pixel shifted shot looks much closer to what I saw through the eyepieces - but you couldn't see that, so I fully understand and accept your comment ("..not better, not clearer"). Also, focus stacking may have behaved differently with the different input files (1-shot vs 4-shot) so that could explain some artefacts you see too - or not.

Zitat
A comparison with a resolution test chart would be interesting, or you can use your slide idea from post https://www.mikroskopie-forum.de/index.php?topic=46181.0 for a new comparison.
By the way, I use a Panasonic G9 and my Keyence microscope partly in pixel shift mode. A real gain in resolution is only minimal, if at all recognisable. Both systems have a lower overall resolution than the Sony, of course.
Again, 4-shot pixel shift is not intended to increase resolution. It is to ensure full colour sampling for each pixel. Also, when an image is diffraction limited (as microscope images most often are), 16-shot cannot increase resolution either. You'll just get a larger, blurrier image, but no extra detail. Empty magnification.

When I next get the opportunity, I will do a more scientific test on the microscope. In the meantime, here's an old comparison made using a 90mm macro lens. The full size image is >40 megabytes, so I've cropped the important part from the middle and attached it here. It is a composite of 3 images shot with 1-shot, 4-shot and 16-shot modes. That at least better illustrates the differences for the purpose of this conversation. The image is of a chip wafer, cropped in one-to-one. The first image is the whole field of view, the second is the composite of 3 separate images (over the same FoV) - cropped tight on the centre of the main image.

Thanks for your comments.

Cheers
Beats
Knowledge is cheap. Experience is not.

Nochnmikroskop

Hi Steve,
Thank you for your explanations.

An anti-vibration platform is nice to have. My vibration measurements here in the basement were sobering (very low frequency). But I'm not giving up yet.
I had overlooked the 1 pixel offset in the 4-shot pixel shift, thanks for the correction.
And thanks for explaining what 4-shot pixel shift actually does. I was not aware of this "debayering" method. Neither Panasonic nor Pentax write about it and Sony only talk about increased resolution. In principle it is, even if "only" in the colour gamut/pixel.
I have learned something again.

Many greetings
Frank

Translated with www.DeepL.com/Translator (free version)

Hallo Steve,
danke für Deine erklärenden Ausführungen.

Eine Anti-Vibrationsplattform ist Nice to Have. Meine Schwingungs-Messungen hier im Keller waren ernüchternd (sehr tieffrequent). Aber ich gebe noch nicht auf.
Das mit den 1 Pixel Versatz beim 4-Shot-Pixelshift hatte ich glatt überlesen, danke für die Richtigstellung.
Und Danke für die Erklärung was 4-Shot-Pixelshift eigentlich bewirkt. Diese "Debayering" Methode hatte ich diesbezüglich nicht gekannt. Weder bei Panasonic, noch bei Pentax wird darüber geschrieben und auch bei Sony wird nur von erhöhter Auflösung gesprochen. Ist es ja im Prinzip auch, wenn auch "nur" im Farbumfang/Pixel.
Wieder was gelernt.

Viele Grüße
Frank
Meistens Auflicht, alle Themenbereiche
Zeiss Axiolab, Keyence VHX, Olympus SZX16, Canon EOS 700D, Panasonic G9, Touptek u.a.