I have an image where there are some star streaks, with the help of edge detection and non max suppression, I am able to convert it into grayscale Image with Edges. I need to get the angle w.r.t. the x-axis at which the streaks are pointing. These are my Images
From this Image I generate the Image containing edges. (The orientation is different because the ds9 software for viewing astronomical images plot it with lower origin coordinates)
I have tried a number of ways including PCA and Connected components but the results are not consistent. All I want is the mean angle at which the streaks are oriented with minimum possible error. I'd be grateful if anyone can help me with this
Here's a possibility with following method:
I get these results:
I guess you could further refine the assumptions and parameters, and smooth or statistically analyse the angles further - but they seem to average around 14 degrees
I just guessed a threshold of 192 to get something sensible. Tune this.
I just plucked a minimum area of 8 from thin air so that I am only looking at decent size blobs, and disregarding tiny, direction-less blobs. Tune this.