Forgot Password
Pentax Camera Forums Home

Show Printable Version Search this Thread
Focus Stacking C41 Negs with Pentax Bellows M
Posted By: wombat2go, 03-21-2013, 09:11 AM

This project took about 6 days to make the mechanical parts, and 1 day to write the software.
The object was to copy C41 negatives to tif files with better resolution and more automation than by using a flat bed scanner.
So far I am pleased with the results.

The project is based on the Pentax Bellows M and Pentax slide copier A, and using cameras and lenses existing in my collection and a heavy duty computer.
The first stage is to copy 35 mm negatives, which is completed, and the next stage, not started yet is to make additional parts to copy 6 by 7 and 6 by 9 negatives.

I have an Olympus M43 and a Pentax K-01 camera and Rodenstock Rogonar S 50 mm and 90mm enlarger lenses and Pentax M 100mm Dental macro.
It was not possible to use a Pentax Dslr body because of the minimum collapsed length of the bellows.
Prior to this project, I had machined adaptors for the M39 whitworth Leica mount to Pentax K and the nose of the Rogonar s , to get that lens into the Pentax Bellows M.

Geometric optics diagram and calculations (link below) show the layout in the Pentax bellows M ,the M43 sensor via the 50mm lens, with the lens in its normal orientation (reversed to the camera).
The DOF calculation (on same sheet) showed that the DOF is only about 600 micrometre (24 thou inch).
Also I wanted to contrast stack images over a focussing range to correct effects such as film bow, lens imperfections and the overall parallelism of the set up.
I did not want to modify the Pentax bellows M in any way, so I set about machining up a micro focusser which attaches to the camera rack knob on the bellows.

The negs are first mounted in Gepe stainless slide holders to keep them as flat as possible.
The micro focusser is powered by a micro robotic gearmotor driving a leadscrew, presently manually controlled by pulsing a reversing switch.
A dial indicator measuring the camera movement is set to zero at best focus at 14x live view.
The camera is driven + 400 micrometre (+10 thou inch) into near focus, then a series of about 7 shots is taken as the micro focusser is driven back through focus.
1 thou inch is 25 micrometre; a series of exposures is made manually at about +7.5, +5, +2.5, 0, -2.5, -5, -7.5 thou inch.

The computer is an Asus X59 with Intel I7 Sandy Bridge with Fedora 14 linux X86_64. Its day job is number crunching models of temperatures inside steel billets heating in furnaces.
Various GPL photo utilities are added to the Fedora.
The program (link below) is a Bash script and arranged to launch multiple child processes so the OS can load up all the cpu cores simultaneously.
This allows a batch of photos to be shot on the sd card and processed per session. It takes about half a cup of coffee to get 4 or 5 photos processed.
I dislike post processing work, so the script does as much as possible and silently.

The Olympus camera has facility to change file nume prefix for subsequent shots, and this is how the software keeps track of which images on the sd card to stack together.
Settings: I tried f/2.8 to f/16 and found that 1/3 stop under f/8 is sharpest from the lens.
It is critical not to have any of the rgb histograms into black or into saturation, as this will ruin the results. However, the C41 is strongly red (actually orange) to correct dye errors.
So, the camera is set to 2200K color balance to partially color balance the film, and shutter speed for each neg is adjusted for best histogram +/- 1/3 stop.

The camera is plugged in to the usb, and the software runs to automatically:
download to working dir, and make archive dir.
Convert raw to 16 bit tif. The ufraw reads each file's camera Temp and green level, and sets auto exposure of its tif.
Measure ca of the copying lens in each shot and correct it.
Align images ready for contrast stack.
Produce an enfused image from the stack.
Invert the rgb to produce a positive from the negative
De Gamma the 3 channels according to the film data sheet values.
Archive the files.

After that, each resulting tif16 file is manually opened in Gimp for final gray balance and edge crop etc to produce a jpg.

The Copier

The Geometric optics calculation sheet ( Excuse me it is rough)

The script as a pdf so it can't execute
Views: 2,595
03-21-2013, 12:26 PM   #2

Join Date: Jan 2013
Location: Near Vienna, Austria
Photos: Gallery
Posts: 758
Amazing concept and technical abilities!
I resorted to focus stacking the scans from my film scanner for critical slides or negs with depth of field issues.
03-21-2013, 12:29 PM   #3
Site Supporter
JimJohnson's Avatar

Join Date: Jan 2012
Location: Lake Superior - Michigan
Photos: Gallery
Posts: 2,270
I always thought the Pentax K-01 camera, while mirrorless, had the same registration distance and sensor size as all Pentax K-mount APS-C dSLR cameras. If so, there should be no reason why one of the dSLR bodies couldn't be used with this rig.

While I have not even imagined focus stacking for slide duplication - my hats off to you! - I have used my K-r along with the Pentax K bellows and slide adapter with a 70mm lens in normal orientation and a couple reverse extension tubes (screw into the lens' filter mount) to create a longer bellows on the slide adapter. I can duplicate the entire 24X36mm slide image on the APS-C sensor to make a digital reproduction.
Go to this thread, then scroll down several posts for my third entry with photos.
The only update is I now use a Pentax F 35-70 lens.
03-21-2013, 12:48 PM   #4
Site Supporter

Join Date: Jan 2010
Location: Michigan
Photos: Gallery
Posts: 2,182
Original Poster
Yes I would certainly like to use the Pentax k-01 for this but it is not possible with the Pentax bellows M and my 50 mm lens.
The register of the Pentax K mount ( always) is 45.46 mm
The distance from N2 of the lens needs to be 75 mm and it is not quite possible to close the bellows up to 75 - 45.46
The M43 register is 19.25, making it just possible.
However I am in luck for the 6 by 9 negatives, using a 90 mm lens the k-01 will fit!

03-21-2013, 03:00 PM   #5
Site Supporter
JimJohnson's Avatar

Join Date: Jan 2012
Location: Lake Superior - Michigan
Photos: Gallery
Posts: 2,270
Ahh, now I understand. The K-01 is not technically a dSLR. it is a mirrorless interchangeable lens camera - the 'reflex' part in SLR refers to using a mirror (or beam splitter) to (typically) project an image on a ground glass. I thought you implied you could use a K-01, but not a dSLR.
03-21-2013, 03:42 PM   #6
Site Supporter

Join Date: Jan 2010
Location: Michigan
Photos: Gallery
Posts: 2,182
Original Poster
That is right, Jim
The register is the issue and K-01 is same as pentax slr and dslr. I am looking at your way of using 70 mm and extension tubes onto the aps-c sensor.
For 6 by 9 negs , image circle at the neg is 103 mm, image won't fit in K- extension tubes all the way, but maybe usable half way.

  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
camera, diy, do it yourself, film, focus, inch, lens, pentax, script, sheet, stack, yourself
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Focus stacking with special hw Stack Shot and sw Zerene Sten Pentax K-5 50 11-28-2013 09:53 AM
Macro Focus Stacking AzureC Photo Critique 15 08-01-2012 04:21 AM
Macro Focus Stacking AzureC Photo Critique 9 05-12-2012 11:05 PM
For Sale - Sold: Pentax M42 Bellows 135mm and 35mm lens with focus rail Peter Zack Sold Items 3 08-25-2008 06:26 PM

All times are GMT -7. The time now is 01:05 AM. | See also:, part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]