Object detection on an image with varying brightness

unfortunately, it’s only mostly horizontal, not exactly horizontal, and I think I see some curve to it.

you can try summing up pixel rows for a stronger 1D signal. rotate the source image by various amounts and see where the response is clearest (steepest edges).