I am supposed to determine the direction a windmill is facing from aerial images (with respect to True North - 0 to 359 degrees).
My question is, how can I determine the correct direction of the windmill and calculate its angle relative to the y-axis? Thanks!
Do not know if this works in general, but given your sample images I'd find the middle point of the short edges of the bounding box and get two rectangles for the two halves of the big BBox.
I would then compute the sum of the mask pixels in the two separate half-BBoxes, assuming white is 1 and black is 0. Since the white area is bigger on the half of the rectangle where the "front" of the turbine is, pick the direction according to which of the two half-BBoxes has a higher sum
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With