Quantitative measure for overall image detail?

Is there a program that can analyze digital images and calculate a number that corresponds to the overall microcontrast/detail in the image?

One possibility is to save a jpg. A more detailed image will lead to a larger jpg file. Is there a more direct and more flexible way to analyze this?
I have difficult understanding exactly what a single number would measure, and how it would relate to perceived detail. Joofa's plugin (as I understand it) aggregates the pixel to pixel variation within an image, but as he properly says that measures noise as well as detail (and since I should be consistent, and I say that shot noise is image detail, that is quite OK). the question is, whether that is the measure that you want.

I think the first step in measuring anything is to decide what you want the measurement for, then you can work out an appropriate metric, and from that a way of measuring it.

The photographic world is full of bogus 'figures of merit' that have no relation to perceived image quality. let's not add another one.
--
Bob
 
Joofa's plugin (as I understand it) aggregates the pixel to pixel variation within an image, ... the question is, whether that is the measure that you want.
Yes, I think it is.

Can you explain to me in which way the output from his plugin differs from the "jpg file size" in terms of what is measured? I know for a fact that the jpg file size measures well what I want to measure, even though I don't know exactly what is measured.. ;-)
I think the first step in measuring anything is to decide what you want the measurement for, then you can work out an appropriate metric, and from that a way of measuring it.
See here:
http://forums.dpreview.com/forums/read.asp?forum=1018&message=38170710

And here:
http://forums.dpreview.com/forums/read.asp?forum=1018&message=38197151
The photographic world is full of bogus 'figures of merit' that have no relation to perceived image quality. let's not add another one.
Well, all I can say is that the "jpg file size" has a relation to image characteristics I can perceive.
 
Sure, as pointed out in my initial post jpg file sizes are a measure of what I want. I'm just surprised that there is no more direct and more user friendly way to do this. The ImageJ plugin written by Joofa is likely better than saving jpg files.
Either that or the high-pass filter, but I would work with a standard conversion from something like DCRAW with no ISO-dependent processing. Stay away from normal converters, unless you are measuring converters.

You could stay even purer by just using a single RAW color channel, which has very high potential microcontrast, due to the weakness of the AA filter over pixels two pixels apart.

--
John

 
I think that your jpeg size is a great idea. it is equivalent to a low pass filter; as jpeg quality is increased higher frequency components are retained so changes in file size with jpeg quality will show aggregate high frequency components.

The change in jpeg file size with quality is what you seek because the change with quality would remove the low frequency components.

One difficulty is that noise is mostly high frequency; smoothing first would ease that problem.

A script might be written to do sequential jpeg saves & report the % file size difference as a quantitative, relative measure of high frequency detail.
What if one wants to compare images of different dimensions (widths and height)? Is file size still a good measure? What if one wants to compare different sized patches within the same image, as Mattr wants to do by changing radius?
Is your plugin basically measuring the same thing that would be measured by analyzing jpg file sizes?
I think jpg file size might give an approximate handle on the amount of detail if the image dimensions are kept constant. Otherwise a bigger image will tend to create a larger jpg file even if visually it seems to have relatively less overall detail than a smaller image. So, I wanted to be agnostic to image dimensions. Still, one could find a number of different techniques on how to generate a single number regarding an estimate of overall detail, and a few methods have even been suggested on this thread by some members. I have my own variation on some established ideas. I think I shall be able to send you a link later today of a basic plugin. If after experimenting you think it is what you want then we can throw in some other customizable parameters.

Sincerely,

Joofa
--
Dj Joofa
 
The photographic world is full of bogus 'figures of merit' that have no relation to perceived image quality. let's not add another one.
What mattr wants is to be able to compare pixel-level contrast in situations where all else being equal, the f-stop or the ISO alone changes.

--
John

 
Well, all I can say is that the "jpg file size" has a relation to image characteristics I can perceive.
True, but JPEG have conditional processing, and may compress the range of results, such as limiting the maximum pixel contrast, or dropping detail in shadow areas more or more at higher ISOs.

--
John

 
Well, all I can say is that the "jpg file size" has a relation to image characteristics I can perceive.
True, but JPEG have conditional processing, and may compress the range of results, such as limiting the maximum pixel contrast, or dropping detail in shadow areas more or more at higher ISOs.
OK, that's another reason why there should be something better (and more user friendly) than measuring the size of saved jpg files.
 
Joofa's plugin (as I understand it) aggregates the pixel to pixel variation within an image, ... the question is, whether that is the measure that you want.
Yes, I think it is.

Can you explain to me in which way the output from his plugin differs from the "jpg file size" in terms of what is measured? I know for a fact that the jpg file size measures well what I want to measure, even though I don't know exactly what is measured.. ;-)
The JPEG compression tries to remove invisible detail and leave visible, whereas Joofa's just measures aggregate pixel variance, so measures the visible, invisible and noise. That means there will be some difference, and JPEG file size should measure more of the amount of visible definition. A complication, of course, is that JPEG decimates the chroma channels, but then you said you were fine with a monochrome measure.
I think the first step in measuring anything is to decide what you want the measurement for, then you can work out an appropriate metric, and from that a way of measuring it.
See here:
http://forums.dpreview.com/forums/read.asp?forum=1018&message=38170710
This one really does beg the question of what you mean by 'detail'. My first thought was, if you want the sweet spot, why not simply use MTF? Then I wondered which MTF measurement would suit you best, and hoe you'd differentiate between high contrast low frequency kind of 'sharpness' and the low contrast high frequency kind of 'sharpness'. It kind of begs the question what you're looking for. In the end, MTF is a pretty good measure of this kind of 'detail'.
That seems to me not a requirement but a speculation on what you might do with a single figure that meant 'detail'. What I'm wondering is whether it's possible to have a single figure meaning 'detail'. Detail comes in different forms.
The photographic world is full of bogus 'figures of merit' that have no relation to perceived image quality. let's not add another one.
Well, all I can say is that the "jpg file size" has a relation to image characteristics I can perceive.
One way of approaching this would be to rank a load images in terms of what you can perceive of detail, then plot the ranking against JPEG file size (of course, you don't want to know the file size before you do the ranking). If there is a clear correlation, then maybe, perceptually, you are onto something.
Edit: this approach could also be applied to Joofa's metric.
--
Bob
 
The photographic world is full of bogus 'figures of merit' that have no relation to perceived image quality. let's not add another one.
What mattr wants is to be able to compare pixel-level contrast in situations where all else being equal, the f-stop or the ISO alone changes.
I'm not sure that's what he wants.

--
Bob
 
I think jpg file size might give an approximate handle on the amount of detail if the image dimensions are kept constant. Otherwise a bigger image will tend to create a larger jpg file even if visually it seems to have relatively less overall detail than a smaller image. So, I wanted to be agnostic to image dimensions.
Yes, I understand that pixel dimensions have to be the same if jpg file size is used to measure image detail. This is really to compare images quantitatively that were taken under controlled conditions, usually from a tripod.
I think I shall be able to send you a link later today of a basic plugin. If after experimenting you think it is what you want then we can throw in some other customizable parameters.
Looking forward to it!
 
The JPEG compression tries to remove invisible detail and leave visible, whereas Joofa's just measures aggregate pixel variance, so measures the visible, invisible and noise. That means there will be some difference, and JPEG file size should measure more of the amount of visible definition. A complication, of course, is that JPEG decimates the chroma channels, but then you said you were fine with a monochrome measure.
I'm starting to think that jpg file size is indeed an excellent way to measure visible detail/noise, e.g. when viewing on a monitor or as a print. Would it be easy to write a program that calculates resulting file sizes (using the jpg algorithm for compression)?
That seems to me not a requirement but a speculation on what you might do with a single figure that meant 'detail'. What I'm wondering is whether it's possible to have a single figure meaning 'detail'. Detail comes in different forms.
Agreed. But it would be interesting to calculate such a figure (using perhaps different alogorithms) in the applications I listed in order to test how it correlates with visual perception. I would be surprised if there is no useful correlation. What I find frustrating is that there doesn't seem to be any program that can efficiently do such a quantification on a batch of image files.
One way of approaching this would be to rank a load images in terms of what you can perceive of detail, then plot the ranking against JPEG file size (of course, you don't want to know the file size before you do the ranking). If there is a clear correlation, then maybe, perceptually, you are onto something.
JPG file size correlates very well with my visual perception of "sharpness" when I look at 100% on the screen at a series of images taken at different f-stops.
Edit: this approach could also be applied to Joofa's metric.
That's exactly what I'm going to do.
 
The JPEG compression tries to remove invisible detail and leave visible, whereas Joofa's just measures aggregate pixel variance, so measures the visible, invisible and noise. That means there will be some difference, and JPEG file size should measure more of the amount of visible definition. A complication, of course, is that JPEG decimates the chroma channels, but then you said you were fine with a monochrome measure.
I'm starting to think that jpg file size is indeed an excellent way to measure visible detail/noise, e.g. when viewing on a monitor or as a print. Would it be easy to write a program that calculates resulting file sizes (using the jpg algorithm for compression)?
On the one hand, you can just measure the file size. On the other, there are open source JPEG encoders around, one could be hacked to provide compression data (which is probably what you want, rather than file size - hoe much the file shrinks under lossy compression)
That seems to me not a requirement but a speculation on what you might do with a single figure that meant 'detail'. What I'm wondering is whether it's possible to have a single figure meaning 'detail'. Detail comes in different forms.
Agreed. But it would be interesting to calculate such a figure (using perhaps different alogorithms) in the applications I listed in order to test how it correlates with visual perception. I would be surprised if there is no useful correlation. What I find frustrating is that there doesn't seem to be any program that can efficiently do such a quantification on a batch of image files.
Probably because no-one has wanted one before.
One way of approaching this would be to rank a load images in terms of what you can perceive of detail, then plot the ranking against JPEG file size (of course, you don't want to know the file size before you do the ranking). If there is a clear correlation, then maybe, perceptually, you are onto something.
JPG file size correlates very well with my visual perception of "sharpness" when I look at 100% on the screen at a series of images taken at different f-stops.
Have you done it blind?
Edit: this approach could also be applied to Joofa's metric.
That's exactly what I'm going to do.
You could use the rest of the thread to publish crops and take a vote on 'sharpness', so you get more than your perception in the experiment.
--
Bob
 
I'm starting to think that jpg file size is indeed an excellent way to measure visible detail/noise, e.g. when viewing on a monitor or as a print.
This measurement can be fooled. Want to significantly increase the size of a JPEG file? Add some noise or grain. 1% gaussian monochrome noise is pretty much visually imperceptible yet will dramatically increase the JPEG size.

Now if your comparisons are limited in scope enough that noise is essentially constant, then it could be correlated close enough to be useful. However, note that while you could have more detail, it could also be the wrong detail if it came from a slight focus shift.

--
Erik
 
JPG file size correlates very well with my visual perception of "sharpness" when I look at 100% on the screen at a series of images taken at different f-stops.
Yes, stopping down and thereby increasing DoF will normally increase the overall amount of detail in the image (if the scene/subject has depth, isn't flat), but it's perfectly possible to get an overall increase in detail (and JPEG file size) as a result of increased DoF, while at the same time the absolute sharpness in the focus plane has decreased as a result of increased shake or diffraction.

And if the f-stop (DoF) is held constant while changing the ISO (exposure), then the increased shot noise ( or 'noise detail') at higher ISOs will also increase the file size, but that doesn't mean that the image has more detail in any useful sense. So, I'd still say that the JPEG file size (or Joofa's alternative measure) is most useful if selecting the sharpest image (with lowest shake/blur) amongst several images shot with the same framing, DoF, ISO, etc.
 
I took a series of images of my bookshelf at different f-stops with the 50/1.8 on a 60D (ISO100). Images were saved from DPP as tif with standard settings and 100% vignetting correction. Files were saved as jpg from Photoshop (quality 8) before and after grayscale conversion. Resulting file sizes were noted. Joofa's plugin was used according to the (very good) instructions.

All numbers were normalized to the highest number (f/8).



The different measures correlate very well in this test. Joofa's plugin creates the biggest spread and may be more sensitive for the detection of small differences.
 
Yes, stopping down and thereby increasing DoF will normally increase the overall amount of detail in the image (if the scene/subject has depth, isn't flat), but it's perfectly possible to get an overall increase in detail (and JPEG file size) as a result of increased DoF, while at the same time the absolute sharpness in the focus plane has decreased as a result of increased shake or diffraction.
That's precisely why such a program would be sometimes useful to find the best overall "balance". Nobody suggests that a photographer should rely solely on a single number to select the best shot. But such a number could be helpful in making a decision. That's what computer's exist for, after all.
And if the f-stop (DoF) is held constant while changing the ISO (exposure), then the increased shot noise ( or 'noise detail') at higher ISOs will also increase the file size, but that doesn't mean that the image has more detail in any useful sense. So, I'd still say that the JPEG file size (or Joofa's alternative measure) is most useful if selecting the sharpest image (with lowest shake/blur) amongst several images shot with the same framing, DoF, ISO, etc.
Sure.
 
You could use the rest of the thread to publish crops and take a vote on 'sharpness', so you get more than your perception in the experiment.


Four corner crops from the 50/1.8 at different f-stops, please rank them in terms of "sharpness".
 
Thanks for the interesting test that shows the range as the aperture is varied from one end to another. It is interesting to see the correlation between the three measures.

BTW, if you want to run the plugin on a selected patch within an image then the procedure is as follows: With an image loaded in ImageJ, drag the mouse to select a rectangular region. Select EDT-> Copy from the menu, and then, New-> Internal Clipboard. That will create a new image with the caption Clipboard and the selected patch of the original image. With this clipboard image selected, please run Plugins-> Joofa-> detail measure to get a measure of image detail within only this patch.

Sincerely,

Joofa
--
Dj Joofa
 
You could use the rest of the thread to publish crops and take a vote on 'sharpness', so you get more than your perception in the experiment.


Four corner crops from the 50/1.8 at different f-stops, please rank them in terms of "sharpness".
You need people's choice not to be displayed to others, the desire to be 'right' is a strong one, people go with the crowd, instead of just saying what they think. I'll pm you my ordering - if others want to play, they should do the same, then you can announce the results.
--
Bob
 

Keyboard shortcuts

Back
Top