Using a digital camera as a densitometer

Flap

D
Flap

  • 0
  • 0
  • 6
Chiaro o scuro?

D
Chiaro o scuro?

  • 1
  • 0
  • 222
sdeeR

D
sdeeR

  • 5
  • 2
  • 263
Rouse St

A
Rouse St

  • 2
  • 0
  • 276

Recent Classifieds

Forum statistics

Threads
199,209
Messages
2,787,861
Members
99,837
Latest member
eeffock
Recent bookmarks
2

alanrockwood

Member
Joined
Oct 11, 2006
Messages
2,185
Format
Multi Format
Don't let the "digital camera" in the topic description fool you. This is not a discussion of digital imaging. It is a discussion of how to use a digital camera as a densitometer, i.e. an instrument used to measure film densities for conventional analog photography.

This is kind of an adjunct to my discussion of how I measured the characteristic curve and film speed of Fomapan 200 developed in HC-110 dilution H, but it would apply to any application where one wants to do densitometry of a transparent medium, like a film negative.

Here's how I used a digital camera as a densitometer. Warning: This procedure is laborious and time consuming. Please forgive my somewhat sloppy writing style, such as inconsistent use of tenses, etc.



Equipment:



  1. A digitial SLR or mirrorless camera. I used a Canon Xti.

  2. A microscope objective. (I used an inexpensive 4X plana-achro objective corrected for 160 tube length, but this will be a non-imaging application, so almost none of this description actually matters.)

  3. An extension tube and adapter for attaching the microscope to the camera.

  4. A light table, preferably oriented horizontally.

  5. A computer

  6. Software. I used software packages called ImageJ and Psi-Plot to do various parts of the calculations. One software package was used to extract histogram lists from the images produced by the camera, and the other was to calculate centroids of the histogram and to do some interpolations as described later.


I turned on the light table and let it warm up.



Then I balanced the camera (with microscope objective attached) on its nose on the light table. Note: the microscope objective is touching the light table, so it is not at the right distance to image what's on the light table. In fact, I definitely don't want it to form an image. It's just there to gather light for the digital camera.



I put the camera on manual exposure and adjusted the shutter speed to produce a correctly exposed shot of the light table. Actually, the shutter speed increments would not match up to perfect exposure, so I bracketed it with two exposures, 0.04 and 0.05 seconds, i.e. 1/25 and 1/20 seconds respectively. The midpoint was 0.045 seconds, and this is a value that is used as a reference value for later calculations. (I believe it isn't actually important to get this exposure just right. For reasons I won't discuss right now, I could probably have used 1/25 seconds, 1/20 seconds, or anything in between.)



I read the two images into ImageJ and extracted histogram lists for the two images. I used jpeg images, partly because ImageJ couldn't import raw images. The jpeg images have a non-linear response to the exposure value, but this doesn't actually matter.



I copied the histograms into Psi-Plot and calculated the centroids of the two peaks. This gives an average value of what the sensor sees for each image. (Maybe I should say non-image, because we aren't actually forming a true image.) Since I picked my reference time for the light source (i.e. the “image” produced by the bare light table) to be midway between 0.04 and 0.05 seconds, I took the average of the centroids of the two histograms as a reference sensor value. It is a kind of target value that will be used in subsequent processes. In other words, the reference shutter speed in the digital camera was 0.045 seconds, and the reference centroid was the average of the centroids at 0.045 and 0.050 seconds.



I then laid the film onto the light table, stood the camera on its nose onto a frame of the film, and took two or three shots. One was unerexposed (barely unerexposed), one was overexposed (barely overexposed, and if I could get one that was nominally correctly exposed I took that one as well. I adjusted the exposure by changing shutter speed.



I read the two (or three) images of a film frame into ImageJ and extracted the centroids of the two (or three) histograms. I did this by fitting a Gaussian function to the histogram, and took the center of the Gaussian fit to be the centroid of the histogram. It might have been a little better to calculate the centroids by quadrature, but in this application it's not really going to matter. Here's where some of the magic happens. I interpolated between the two bracketed exposures to determine what shutter speed would produce a centroid of exactly the same value as the reference centroid taken from the bare light table. It doesn't have to match any shutter speed that the camera actually produces. For example, when I did this for a base+fog frame I got 1/8 and 1/10 seconds as bracketing a “correct” exposure. When I interpolated between them I calculated that a shutter speed of 0.1016 seconds would give the exact same centroid as the my light table reference centroid discussed previously.



For the base+fog frame I then calculated the ratio of 0.1016/0.045=2.25777..., and density= log(2.25777...)=0.353, where I rounded density to three decimal points. (This might be more precision than justified by the experimental uncertainty, but it's free to carry an extra significant figure, so why not?)



I did the same for the other film frames. For example, the frame exposed at 1/2000 seconds (that's exposure given to the film, not the exposure used in the digital camera-based densitometer) gave an interpolated shutter speed of 0.1029 which gave a density of log(0.1029/0.045) = 0.359, and the frame in which the film was exposed at 1/125 seconds gave a density of 0.817.



That's pretty much it for the densitometry measurements.



I haven't discussed above how I decided how much to expose the film frames for the characteristic curve determination. Theoretically, exposing the film through a step table would be a good idea, but for various reasons it was actually not a good idea in this case. Briefly, I picked a convenient combination of f-stop and shutter speeds in my film camera, a Canon T2 in this case. During all film exposures I held the f-stop constant and varied the shutter speed. I did this because I figured that the shutter speeds are more precise than the f-stops, so I just relied on shutter speeds to vary the amount of light the film is exposed to. In picking the right f-stop to use one kind of juggles the available values of f-stop so as to give a convenient range of shutter speeds that will cover the range of exposures I want to produce, such as (for example if I am using the zone system) how many stops above and below zone V I want to test. If I am doing a film speed test I might not know what the E.I. is, so I don't actually know where zone V is in the exposure range, but I probably have a rough guess, so I just make sure that I have plenty of stops above and below that range in the table of shutter speeds I am going to use for exposing the film. I tried to be avoid extremes of shutter speed at the fast and slow ends so as to avoid reciprocity failure. However, I might have stuck my toe in the reciprocity failure pond at the fast shutter speed end of the experiment. In some cases maybe I should have varied the f-stop as well, to avoid approaching the reciprocity failure regions.
 

ic-racer

Member
Joined
Feb 25, 2007
Messages
16,562
Location
USA
Format
Multi Format
Spot meter can be a lot easer. After observing the 'null' reading on the readout, most people can figure the density in their head; 1 stop = 0.3 log d.

Using a spotmeter for a densiometer has been a logical choice since spotmeters were invented.

SEI densitometer.jpg
 
Last edited:

Chan Tran

Subscriber
Joined
May 10, 2006
Messages
6,845
Location
Sachse, TX
Format
35mm
Don't let the "digital camera" in the topic description fool you. This is not a discussion of digital imaging. It is a discussion of how to use a digital camera as a densitometer, i.e. an instrument used to measure film densities for conventional analog photography.

This is kind of an adjunct to my discussion of how I measured the characteristic curve and film speed of Fomapan 200 developed in HC-110 dilution H, but it would apply to any application where one wants to do densitometry of a transparent medium, like a film negative.

Here's how I used a digital camera as a densitometer. Warning: This procedure is laborious and time consuming. Please forgive my somewhat sloppy writing style, such as inconsistent use of tenses, etc.



Equipment:



  1. A digitial SLR or mirrorless camera. I used a Canon Xti.

  2. A microscope objective. (I used an inexpensive 4X plana-achro objective corrected for 160 tube length, but this will be a non-imaging application, so almost none of this description actually matters.)

  3. An extension tube and adapter for attaching the microscope to the camera.

  4. A light table, preferably oriented horizontally.

  5. A computer

  6. Software. I used software packages called ImageJ and Psi-Plot to do various parts of the calculations. One software package was used to extract histogram lists from the images produced by the camera, and the other was to calculate centroids of the histogram and to do some interpolations as described later.


I turned on the light table and let it warm up.



Then I balanced the camera (with microscope objective attached) on its nose on the light table. Note: the microscope objective is touching the light table, so it is not at the right distance to image what's on the light table. In fact, I definitely don't want it to form an image. It's just there to gather light for the digital camera.



I put the camera on manual exposure and adjusted the shutter speed to produce a correctly exposed shot of the light table. Actually, the shutter speed increments would not match up to perfect exposure, so I bracketed it with two exposures, 0.04 and 0.05 seconds, i.e. 1/25 and 1/20 seconds respectively. The midpoint was 0.045 seconds, and this is a value that is used as a reference value for later calculations. (I believe it isn't actually important to get this exposure just right. For reasons I won't discuss right now, I could probably have used 1/25 seconds, 1/20 seconds, or anything in between.)



I read the two images into ImageJ and extracted histogram lists for the two images. I used jpeg images, partly because ImageJ couldn't import raw images. The jpeg images have a non-linear response to the exposure value, but this doesn't actually matter.



I copied the histograms into Psi-Plot and calculated the centroids of the two peaks. This gives an average value of what the sensor sees for each image. (Maybe I should say non-image, because we aren't actually forming a true image.) Since I picked my reference time for the light source (i.e. the “image” produced by the bare light table) to be midway between 0.04 and 0.05 seconds, I took the average of the centroids of the two histograms as a reference sensor value. It is a kind of target value that will be used in subsequent processes. In other words, the reference shutter speed in the digital camera was 0.045 seconds, and the reference centroid was the average of the centroids at 0.045 and 0.050 seconds.



I then laid the film onto the light table, stood the camera on its nose onto a frame of the film, and took two or three shots. One was unerexposed (barely unerexposed), one was overexposed (barely overexposed, and if I could get one that was nominally correctly exposed I took that one as well. I adjusted the exposure by changing shutter speed.



I read the two (or three) images of a film frame into ImageJ and extracted the centroids of the two (or three) histograms. I did this by fitting a Gaussian function to the histogram, and took the center of the Gaussian fit to be the centroid of the histogram. It might have been a little better to calculate the centroids by quadrature, but in this application it's not really going to matter. Here's where some of the magic happens. I interpolated between the two bracketed exposures to determine what shutter speed would produce a centroid of exactly the same value as the reference centroid taken from the bare light table. It doesn't have to match any shutter speed that the camera actually produces. For example, when I did this for a base+fog frame I got 1/8 and 1/10 seconds as bracketing a “correct” exposure. When I interpolated between them I calculated that a shutter speed of 0.1016 seconds would give the exact same centroid as the my light table reference centroid discussed previously.



For the base+fog frame I then calculated the ratio of 0.1016/0.045=2.25777..., and density= log(2.25777...)=0.353, where I rounded density to three decimal points. (This might be more precision than justified by the experimental uncertainty, but it's free to carry an extra significant figure, so why not?)



I did the same for the other film frames. For example, the frame exposed at 1/2000 seconds (that's exposure given to the film, not the exposure used in the digital camera-based densitometer) gave an interpolated shutter speed of 0.1029 which gave a density of log(0.1029/0.045) = 0.359, and the frame in which the film was exposed at 1/125 seconds gave a density of 0.817.



That's pretty much it for the densitometry measurements.



I haven't discussed above how I decided how much to expose the film frames for the characteristic curve determination. Theoretically, exposing the film through a step table would be a good idea, but for various reasons it was actually not a good idea in this case. Briefly, I picked a convenient combination of f-stop and shutter speeds in my film camera, a Canon T2 in this case. During all film exposures I held the f-stop constant and varied the shutter speed. I did this because I figured that the shutter speeds are more precise than the f-stops, so I just relied on shutter speeds to vary the amount of light the film is exposed to. In picking the right f-stop to use one kind of juggles the available values of f-stop so as to give a convenient range of shutter speeds that will cover the range of exposures I want to produce, such as (for example if I am using the zone system) how many stops above and below zone V I want to test. If I am doing a film speed test I might not know what the E.I. is, so I don't actually know where zone V is in the exposure range, but I probably have a rough guess, so I just make sure that I have plenty of stops above and below that range in the table of shutter speeds I am going to use for exposing the film. I tried to be avoid extremes of shutter speed at the fast and slow ends so as to avoid reciprocity failure. However, I might have stuck my toe in the reciprocity failure pond at the fast shutter speed end of the experiment. In some cases maybe I should have varied the f-stop as well, to avoid approaching the reciprocity failure regions.

How do you know if the image is correctly exposed? What do you read to determine this.
 
Joined
Jul 28, 2016
Messages
2,771
Location
India
Format
Multi Format
Very clever idea of using digital camera to estimate density - if I understood correctly, you find out what shutter speed gives digitally the same result with and without the negative and use the ratio of the shutter speeds to estimate the density. Very cool.
 
OP
OP

alanrockwood

Member
Joined
Oct 11, 2006
Messages
2,185
Format
Multi Format
Spot meter can be a lot easer. After observing the 'null' reading on the readout, most people can figure the density in their head; 1 stop = 0.3 log d.

Using a spotmeter for a densiometer has been a logical choice since spotmeters were invented.

View attachment 279945
Yes, that should work. However, most people don't own a spotmeter.
 
OP
OP

alanrockwood

Member
Joined
Oct 11, 2006
Messages
2,185
Format
Multi Format
How do you know if the image is correctly exposed? What do you read to determine this.
When I expose the film I use the cameras built in exposure meter. What you can do is to arrange your exposure sequence so that one of the frames has the nominally "right" exposure. For example, in the sequence I did for the Fomapan 200 test I set things up so that when the cameras meter was set at 100 iso the shot at 1/125 second was "correctly" exposed according to the camera's built in meter. This does not mean that it was actually correctly exposed, but it gives me an anchor point for a calculation. Later, if it turns out that the film speed test indicated that a different shutter speed gave a density that corresponded to correct exposure, it is possible to use the information to calculate what value to use for the personal E.I.
 
OP
OP

alanrockwood

Member
Joined
Oct 11, 2006
Messages
2,185
Format
Multi Format
Very clever idea of using digital camera to estimate density - if I understood correctly, you find out what shutter speed gives digitally the same result with and without the negative and use the ratio of the shutter speeds to estimate the density. Very cool.
Yes, you understand correctly, but don't forget to calculate the logarithm of the ratio. The ratio itself gives a quantity known (actually, 1/transmittance if I do the mental math right). You get the density by taking the logarithm.
 

Chan Tran

Subscriber
Joined
May 10, 2006
Messages
6,845
Location
Sachse, TX
Format
35mm
When I expose the film I use the cameras built in exposure meter. What you can do is to arrange your exposure sequence so that one of the frames has the nominally "right" exposure. For example, in the sequence I did for the Fomapan 200 test I set things up so that when the cameras meter was set at 100 iso the shot at 1/125 second was "correctly" exposed according to the camera's built in meter. This does not mean that it was actually correctly exposed, but it gives me an anchor point for a calculation. Later, if it turns out that the film speed test indicated that a different shutter speed gave a density that corresponded to correct exposure, it is possible to use the information to calculate what value to use for the personal E.I.
I still don't understand your approach. Do you have any known density to check like a calibrated step wedge?
 
OP
OP

alanrockwood

Member
Joined
Oct 11, 2006
Messages
2,185
Format
Multi Format
I still don't understand your approach. Do you have any known density to check like a calibrated step wedge?

No step wedge is needed to determine density. I base it on fundamental theory. If you are familiar with absorption spectroscopy, it uses the exact same principle. I am simplifying the description a bit. Light intensity hitting a detector (the digital camera in this case) is measured twice, once with no sample between the light source and the detector (I_sub_zero) and once with a sample (film in this case) between the light source and the detector (I). The transmission is defined as T=I/I_sub_zero. Absorbance (which is the same thing as density) is defied as -log(T).



Since we are doing a measurement based on ratios it's not necessary to know the exact value of I_sub_zero because the unknown scale factor will cancel out when the ratio T is calculated.



We assume that the silicon detector in the digital camera has perfect reciprocity properties. This implies that we can determine I (the intensity of light after it passes through the film) by varying the shutter speed of the digital camera until the signal is equal to the signal of the reference measurement. The reference measurement is the measurement taken without the sample in place.



Here's a worked example. Suppose I take a photo of the light source with no sample in place, and suppose I expose it for 0.045 seconds. When I look at the histogram of this frame suppose it's centroid is located at 190 units on the horizontal axis of the histogram. (I am using the number 190 for sake of discussion. It's value is not fundamentally important. It will be whatever the camera gives us, but we can adjust the shutter speed of the digital camera to give some other number if we want. In other words, we can choose to change the reference conditions.) Now I place the sample (the film) between the light source and the camera. There will now be less light reaching the camera. Suppose it is only 10% as much as the amount of light as when there is no sample in place. In order to get 190 units for the centroid location in the new frame I have to change the shutter speed of the digital camera to expose for ten times as long, i.e. 0.45 seconds. This implies that T = 0.045/0.45 = 0.1. I take the negative of the logarithm of 0.1 and get D=1. As an aside, note that -log(T) = log(1/T), so I could also do the calculation as log(0.45/0.045) = 1.



As I noted in my earlier post, most digital cameras do not have continuously variable shutter speed, so I can't actually adjust the shutter speed for the second frame to give exactly 190 horizontal units on the histogram when I measure the film, so what I do is to take two more frames (beyond the reference frame) instead of just one frame. One of the two will be slightly underexposed (i.e. I set the shutter speed a little fast), and the other is slightly over-exposed (i.e. I set the shutter speed a little slow). I can interpolate between those two to determine what shutter speed of the digital camera would give exactly 190 on the histogram if I had a continuously variable shutter speed.

Chen Tran, did that answer your question? If not, let me know.
 
Last edited:

whojammyflip

Subscriber
Joined
Dec 3, 2009
Messages
186
Location
Wellesbourne, UK
Format
35mm
Darkroom Automation meter, enlarger, darkroom. Gives me relative density readings down to 0.01 of a stop, and accounts for any flare which occurs at the printing stage.

I am a massive fan of the above meter. I've just ordered my second, in case they stop making them.
 
OP
OP

alanrockwood

Member
Joined
Oct 11, 2006
Messages
2,185
Format
Multi Format
Darkroom Automation meter, enlarger, darkroom. Gives me relative density readings down to 0.01 of a stop, and accounts for any flare which occurs at the printing stage.

I am a massive fan of the above meter. I've just ordered my second, in case they stop making them.

That looks like a good idea. If one already has a digital camera then the Darkroom Automation Precision Enlarging Meter and Densitometer would be an extra cost, but it would be a lot less laborious than the method I described and probably worth the extra cost.

The automatic compensation for flair in the complete film/enlarger system also seems like a good idea, provided that is what you want to do, although it would make the results not quite comparable to a conventional densitometer.
 

gone

Member
Joined
Jun 14, 2009
Messages
5,504
Location
gone
Format
Medium Format
Thank you for providing the definition of a densitometer, which would be a great party word to drop into a conversation. Say, have you seen Stan's new densitomer? His wife says either it goes, or she does.

I guess I don't need one though, things seem to go along pretty well w/o one.
 

xkaes

Subscriber
Joined
Mar 25, 2006
Messages
4,798
Location
Colorado
Format
Multi Format
No need to re-invent the wheel. There are lots of $10 darkroom tools that are designed to do this.
 
Photrio.com contains affiliate links to products. We may receive a commission for purchases made through these links.
To read our full affiliate disclosure statement please click Here.

PHOTRIO PARTNERS EQUALLY FUNDING OUR COMMUNITY:



Ilford ADOX Freestyle Photographic Stearman Press Weldon Color Lab Blue Moon Camera & Machine
Top Bottom