In dealing with some strange results of single-edge images, I wanted to see what MTFMapper thought the edge looked like, so I tracked down the --esf argument, and then wrote a short script to turn the raw-esf-values.txt into a simple graph. I was very revealing in what it showed about my problems.
In case you want to try it, here is my script.
#!/bin/bash# plot first line of an edge file, as provided in single-edge mode# $1 name of raw_esf_values.txt file
head-n1"$1"|tr" ""\n">tempdata.txt
gnuplot-p-e"set xrange [0:256] ;plot 'tempdata.txt' with line"
rmtempdata.txt
You just copy this to a text file. I called mine plot_edge.sh. To plot a certain edge file, I just type from the command line:
./plot_edge.sh <file name>
and you get a display that looks something like the one I attached (or maybe it doesn't).
If you have a better way to view edges, tell us about it.
That script looks good to me. The ESF, maybe not so much :)
You could potentially smooth out those oscillations by using --esf-model loess, or if you are certain that your edge does not have any undershoot/overshoot (should not happen to raw images, only sharpened ones), you can try the as-of-yet-undocumented --monotonic-esf-filter flag.
But both of those options are likely to be like sticking band-aids to an axe wound. Was this edge perhaps extracted from a raw, un-demosaiced image?
Regards,
Frans
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It was an unmosaiced image. This one wasn't the one that made me look for the problems, but I will keep in mind that unmosaiced images are likely to have ripples in them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In dealing with some strange results of single-edge images, I wanted to see what MTFMapper thought the edge looked like, so I tracked down the --esf argument, and then wrote a short script to turn the raw-esf-values.txt into a simple graph. I was very revealing in what it showed about my problems.
In case you want to try it, here is my script.
You just copy this to a text file. I called mine plot_edge.sh. To plot a certain edge file, I just type from the command line:
and you get a display that looks something like the one I attached (or maybe it doesn't).
If you have a better way to view edges, tell us about it.
Last edit: Ted Miller 2020-07-22
Hi Ted,
That script looks good to me. The ESF, maybe not so much :)
You could potentially smooth out those oscillations by using --esf-model loess, or if you are certain that your edge does not have any undershoot/overshoot (should not happen to raw images, only sharpened ones), you can try the as-of-yet-undocumented --monotonic-esf-filter flag.
But both of those options are likely to be like sticking band-aids to an axe wound. Was this edge perhaps extracted from a raw, un-demosaiced image?
Regards,
Frans
It was an unmosaiced image. This one wasn't the one that made me look for the problems, but I will keep in mind that unmosaiced images are likely to have ripples in them.