Exactly so, it's a sensitive test of the straightness of the trail. Here's an image that overlays the result onto the original trail, and hopefully makes things clearer (note this is an unenhanced diff, which is what the LS fit alogrithm operated on).Luis wrote:
I see... if I understand you correctly what you are trying to do is to measure the "strightness" of the pattern. By doing the LSF to that template you want to measure variations from it.
Now wouldn't this analysis be insensitive to what side of the streak is changing shape? I mean it would equally pick up a symmetric narrowing of the streak and an asymmetric narrowing of it, or even a change of idrection without a noarrowing...
If my interpretation is correct, could you come up with a template that picks up what side of the streak changed shape and in what direction. We would like to know if the streak is ondulating, but its width is constant, or if its width is actually changing periodically.
Also have you run an FFT of your signal? Is there a spike somwhere, or is it the brain picking up a pattern that is not really there?
Cheers
(click image for larger version)
Now, if you scale that image vertical by x5 or so and flip it vertically, you'll see the line is precisely the same as the red trace on the graph I posted earlier.
(if the trail is hard to see in that image, see this enhanced version which covers the same area and has the same rotation angle - note the general similiarity of the graph line to the compressed version on the left)
The algorithm would be, as you say, insensitive to the variations in the width of the streak - as long as the variation in width and the streak cross-section are reasonably symmetrical (the streak cross-section is indeed quite symmetric, but we can't assume that about the streak). Detecting one edge versus the other is maybe possible, but it's likely to suffer badly from noise.
It may however be possible to get a reasonable fix on the streak width by finding the optimum setting for the streak width all the way along the trail (as stated before, the graph used a fixed 22 pixels). Adding that shouldn't affect the line choosen by the LS fit, and might give us width info too.
Ref. the FFT, I'll try that later; note though that the main reason I did this was to improve our understanding of the real shape of the trail; I didn't expect to see the 'humps and bumps'.