Wow, I think in terms of describing your problem in detail and even going as far as making some videos you win some Kudos for that!
Calculating the distance from the centre is fairly straightforward - you just need to calculate the centre point (you can get the array size as I have already demonstrated) and then calculate pythagoras' theorum on the difference between the current point and the centre point.
I've attached a new VI that demonstrates this...and produces a pretty graph in the process that shows the distance values.
I'm sure from this you will be able to calculate the super lorentzian as per the equation you mentioned in the video now you have the distance value and the current pixel (in lexicographical order!).
This is absolutely wonderful! It works jgreat, but there is one thing I don't quite get.
You calculate the center by decrementing it by one and dividing it by two. Your array for an example 13 X 22. But the center of 22 is between 11 and 12: 11,5 to be exact. But yours however finds it at 10,5.
Normal median calculations means taking the two center values of an even number, adding them together and dividing them by two: essentially taking the average of the two numbers.
So that would mean 11+12 / 2 = 11,5
Why does yours use the value at 10,5?
When displaying the array however it works and finds the center of the array in the correct way.
My guess this is because the array starts counting at 0 up to 21, giving you a distance of 22 cells. The numerical correct center would then be at 10,5. Is my hunch correct?
(by the way, I use comma's for decimals because I'm from Europe. With 10,5 I mean the American 10 and a half, not 105)
You're right - the i-terminals on the for loops are 0-indexed (start at 0) and count up to array size-1.
I originally didn't have these and it was immediately obvious that the calculation was wrong (because if there is an odd number of rows & columns there should be an exact centre point).
(And hey...I'm from Europe too! ...but I know in some/most european countries they use , as the decimal seperator instead of . !)
Well you answered my questions perfectly and both lexicographical image processing and the distance calculation problems have now been solved. I hooked them up to my program and they work just fine, though it still needs some debugging but that's trivial.
The only problem I now have is getting the error inducement right. The error inducement was the rounding error of a pixel and trying to solve that using the neigbouring unprocessed pixels. But that's another problem that I might post too. Thanks for your help!