Quantitative measure for overall image detail?

mattr

Senior Member
Messages
3,549
Solutions
1
Reaction score
71
Location
CA, US
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?
 
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?
Suppose you had nothing but noise and applied no NR then the jpg would be maximally large because minimal correlation would exist in the image. I understand what you are asking but not sure a jpg is the best answer.
--
A bird in the viewfinder is worth...
 
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?
Suppose you had nothing but noise and applied no NR then the jpg would be maximally large...
That's right. In this analysis I don't care whether it is noise or real detail.
I understand what you are asking but not sure a jpg is the best answer.
Exactly. I can't imagine that checking the size of jpg files is the best/only answer for what I want to do. However, I'm not aware of any other tool to do this.
 
Is there a program that can analyze digital images and calculate a number that corresponds to the overall microcontrast/detail in the image?
Don't know about an existing program, but if you are willing to do a small programming effort then one can use a variation of a statistical formulation. We can talk offline about it if you are interested.

Sincerely,

Joofa

--
Dj Joofa
 
Don't know about an existing program, but if you are willing to do a small programming effort then one can use a variation of a statistical formulation.
Sorry, I don't know enough about programming. Thanks anyway.
 
Don't know about an existing program, but if you are willing to do a small programming effort then one can use a variation of a statistical formulation.
Sorry, I don't know enough about programming. Thanks anyway.
Hi,

I decided to put the method I was thinking about in an ImageJ plugin. ImageJ is a freely available image processing toolbox that can be downloaded online. I can make the plugin available to you if you are interested and if this is what you want. Need to put in some enhancements - such as right now it is only working for grayscale images; need to add color. This is the first time I ever programmed in ImageJ so I have to learn some stuff here also :).

An example of the plugin output is below:



Sincerely,

Joofa

--
Dj Joofa
 
Don't know about an existing program, but if you are willing to do a small programming effort then one can use a variation of a statistical formulation.
Sorry, I don't know enough about programming. Thanks anyway.
Hi,

I decided to put the method I was thinking about in an ImageJ plugin. ImageJ is a freely available image processing toolbox that can be downloaded online. I can make the plugin available to you if you are interested and if this is what you want. Need to put in some enhancements - such as right now it is only working for grayscale images; need to add color. This is the first time I ever programmed in ImageJ so I have to learn some stuff here also :).
Yes, I think this is exactly what I want. Grayscale should be fine and I have used ImageJ (no plugins) years ago. How can I get your plugin and how is it used/installed? Are there any parameters in the process that can be modified?
 
Yes, I think this is exactly what I want. Grayscale should be fine and I have used ImageJ (no plugins) years ago. How can I get your plugin and how is it used/installed? Are there any parameters in the process that can be modified?
I can send you a link to download when it is ready. I think mid next week. You would just have to put it in the plugins directory of ImageJ and that's it. Currently, there are no parameters, but if you have something in mind, please let me know.

BTW, what do you want to use it for?

--
Dj Joofa
 
I can send you a link to download when it is ready. I think mid next week. You would just have to put it in the plugins directory of ImageJ and that's it.
OK, thank you.
Currently, there are no parameters, but if you have something in mind, please let me know.
I was just wondering what exactly your program is measuring and whether e.g. the "radius" for microcontrast measurement could be modified.
BTW, what do you want to use it for?
I plan to use my 100L macro with a 60D to reproduce flat objects and wanted to know where the sweet spot with this particular setup is. It could obviously be used to analyze the effect of f-ratio on lens performance (overall/center/border) at different focus distance.
 
I plan to use my 100L macro with a 60D to reproduce flat objects and wanted to know where the sweet spot with this particular setup is. It could obviously be used to analyze the effect of f-ratio on lens performance (overall/center/border) at different focus distance.
Of course this could also be used for a lot of other things, quantification of noise and blur from camera/subject movement included.

I'm surprised that there is no good program with a nice interface to do this. I would like to load a series of images into the program. When I select an area in one image the program should measure the microcontrast in the corresponding area for all of the images and it should be easy to paste the results into a spreadsheet.

I want some pixel peeping help! Isn't that what computers are made for? :-)
 
A landscape of a distant view might not have detail, while a closeup of an insect would. Yet the image of the landscape might very well be of a higher quality.

Dave
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?
Suppose you had nothing but noise and applied no NR then the jpg would be maximally large...
That's right. In this analysis I don't care whether it is noise or real detail.
I understand what you are asking but not sure a jpg is the best answer.
Exactly. I can't imagine that checking the size of jpg files is the best/only answer for what I want to do. However, I'm not aware of any other tool to do this.
 
A landscape of a distant view might not have detail, while a closeup of an insect would. Yet the image of the landscape might very well be of a higher quality.
Yes, of course.

I would use the program to compare images of the same scene taken at different f-ratio or different ISO.
 
A landscape of a distant view might not have detail, while a closeup of an insect would. Yet the image of the landscape might very well be of a higher quality.
I think he just wants to quantify the difference in intensity between neighboring pixel intensities. You could do this with a high-pass filter, and calculate the standard deviation, but for an image where most of the frame is expected to be out-of-focus, this can downplay the maximum sharpness. The histogram of the high-pass will give more information, but not a monolithic value.

--
John

 
A landscape of a distant view might not have detail, while a closeup of an insect would. Yet the image of the landscape might very well be of a higher quality.
I think he just wants to quantify the difference in intensity between neighboring pixel intensities. You could do this with a high-pass filter, and calculate the standard deviation, but for an image where most of the frame is expected to be out-of-focus, this can downplay the maximum sharpness. The histogram of the high-pass will give more information, but not a monolithic value.
That I lacked a clue as to what he was driving at...

My bad. :(

Dave
 
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 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.
 
A landscape of a distant view might not have detail, while a closeup of an insect would. Yet the image of the landscape might very well be of a higher quality.
Yes, of course.

I would use the program to compare images of the same scene taken at different f-ratio or different ISO.
Don't think that's possible, because changing the f-stop or ISO (exposure) in itself will affect the amount of detail in the image ('real' detail if DoF changes and 'noise detail' if ISO changes), but it could be useful when selecting the shapest image amongst several images of the same subject with e.g. to low shutterspeed. Think that Nikon's 'best shot selector' works like that, by simply comparing the JPEG file sizes.
 
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?
--
Dj Joofa
 
A landscape of a distant view might not have detail, while a closeup of an insect would. Yet the image of the landscape might very well be of a higher quality.
Yes, of course.

I would use the program to compare images of the same scene taken at different f-ratio or different ISO.
Don't think that's possible, because changing the f-stop or ISO (exposure) in itself will affect the amount of detail in the image ('real' detail if DoF changes and 'noise detail' if ISO changes), but it could be useful when selecting the shapest image amongst several images of the same subject with e.g. to low shutterspeed.
Well, selecting the sharpest/lowest noise image is exactly what I want to use the program for. I guess my use of "detail" causes a lot of confusion.

Here (again) what I want: A program that can load a set of images and that analyzes microcontrast overall or in areas selected by the user. Any selection should be applied to all the loaded images. It should be easy to export the results into a spreadsheet. It would be great if some parameters of the analysis could be user defined, e.g. the "radius" for microcontrast determination, but pixel to neighboring pixel contrast would be fine.

Such a program could be used for a lot of things:
  • Selecting the sharpest picture (overall or center or corner) from a series with different f-stops.
  • Quantitatively comparing noise at different ISO in different areas of the image.
  • Analyzing which image has the least motion blur overall from camera shake or subject blur from subject motion.
  • Testing IS performance.
  • Testing autofocus performance (accuracy, consistency) of camera lens combinations.
  • Quantitatively comparing bokeh "smoothness".
This is just what comes quickly to my mind. I'm sure there are many other applications.
Think that Nikon's 'best shot selector' works like that, by simply comparing the JPEG file sizes.
Interesting, I have to look into it.

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.
 
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 still think that jpg file sizes are measuring what I want. Perhaps a macro could be written in Photoshop to do equivalent cropping and saving of jpg files from a set of tif images. Still, this seems to be a very convoluted way to do this analysis. And it would still be labor intesive to put the resulting file size numbers into a spreadsheet for further analysis.
 
A script might be written to do sequential jpeg saves & report the % file size difference as a quantitative, relative measure of high frequency detail.
Unfortunately, I'm not the one to write such a script. Isn't it surprising that this doesn't seem to exist yet?

Actually, the microcontrast quantification should be included in all the image processing programs used by photographers. IMO this is an equally basic analysis as for example histograms.
 

Keyboard shortcuts

Back
Top