Focus on the first equation for EY. Back in the day when color television was being developed, the color signal had to be compatible with black and white TVs and vice versa. So the compatible brightness signal (luma Y) has to be calculated from the three primary color signals (R, G B) for transmission. Human visual system does not perceive brightnesses of ...
There is a similar DSP trick here, but I don't remember the details exactly.
I read about it somewhere, some while ago. It has to do with figuring out fabric pattern matches regardless of the orientation. So you may want to research on that.
Grab a circle sample. Do sums along spokes of the circle to get a circumference profile. Then they did a DFT on ...
I've went ahead and basically adjusted the Hough transform example of opencv to your use case. The idea is nice, but since your image already has plenty of edges due to its edgy nature, the edge detection shouldn't have much benefit.
So, what I did above said example was
Omit the edge detection
decompose your input image into color channels and process ...
Rather performance intensive, but should get you accuracy as wanted:
Edge detect the image
Hough transform to a space where you have enough pixels for the wanted accuracy.
Because there are enough orthogonal lines; the image in the hough space will contain maxima lying on two lines. These are easily detectable and give you the desired angle.