1
Modules Development / Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« on: August 29, 2014, 05:49:42 AM »
Yea, second derivative - or take the pink curve where the second derivative is smaller than a threshold. Not sue if it is going to wok though - depends on exactly what that curve looks like and how close you need to get.
One way I have gotten around fitting data somewhat like this is iterative least squares. What I did was:
Do least squares, compute standard deviation.
Remove outliers more that 2 SD from fit
Refit
Remove outliers more than 1.5 SD from new fit (computed SD from initial fit, not new SD)
Refit
This could work depending on the data and how computationally expensive you can work with; moving in small steps does better, but you may only need 3. at SD 2, 1.75, 1.2 say.
You could also compute the pink curve, then only use the data where the second derivative of the pink curve is below a certain threshold (not sure how variable this will be with different ISO combinations though) and then use iterative least squares on the remaining data.
If the pink and red lines are supposed to always overlap in the center, you could also compute the pink curve and then choose say 40 points (or however many makes sense) on that curve and then use iterative LS to fit a line to those data. That would be a lot quicker than using all the data and you could do enough iterations to (hopefully) guarantee fitting the center part.
Not sure if any of this is actually helpful, but just in case...
One way I have gotten around fitting data somewhat like this is iterative least squares. What I did was:
Do least squares, compute standard deviation.
Remove outliers more that 2 SD from fit
Refit
Remove outliers more than 1.5 SD from new fit (computed SD from initial fit, not new SD)
Refit
This could work depending on the data and how computationally expensive you can work with; moving in small steps does better, but you may only need 3. at SD 2, 1.75, 1.2 say.
You could also compute the pink curve, then only use the data where the second derivative of the pink curve is below a certain threshold (not sure how variable this will be with different ISO combinations though) and then use iterative least squares on the remaining data.
If the pink and red lines are supposed to always overlap in the center, you could also compute the pink curve and then choose say 40 points (or however many makes sense) on that curve and then use iterative LS to fit a line to those data. That would be a lot quicker than using all the data and you could do enough iterations to (hopefully) guarantee fitting the center part.
Not sure if any of this is actually helpful, but just in case...