4
votes

This is a continuation of the question from Here-How to find angle formed by the blades of a wind turbine with respect to a horizontal imaginary axis?

I've decided to use the following methodology for this-  Getting a frame from a camera and putting it in a loop.  Performing Canny edge detection.  Perform HoughLinesP to detect lines in the image. Finding Blade Angle:  Perform Probabilistic Hough Lines Transform on the image. Restrict the blade lines to the length of the blades, as known already.  The returned value will have the start and end points of the lines detected. Since there are no background noises, this gives the starting and end point of the blade lines and the image will have the blade lines.  Now, find the dot product with a vector (1,0) by finding the vectors of the blade lines detected or we can use atan2 to find the relative angle of all the points detected with respect to a horizontal.

Problem: When the yaw angle of the turbine is changed and it is not directly facing the camera, how do I calculate the blade angle formed? The idea is to basically map the angles when rotated back into the form when viewed head on. From what I've been able to understand, I thought I'd find the homography matrix, decompose the matrix to get rotation, convert to Euler angles to calculate shift from the original axis, then shift all the axes with that angle. However, it's just a vague idea with no concrete planning to go upon. Or I begin with trying to find the projection matrix, then get camera matrix and rotation matrix? I am lost on this account completely and feel overwhelmed with the many functions...

Other things I came across was the perspective transform,solvepnp..

It would be great if anyone could suggest another way to deal with this? Any links of code snippets would be helpful. I'm not that familiar with OpenCV and would be grateful for any help.

Thanks!

Edit: The wind turbine to be monitored looks like this

[Edit by Spektre]

axises

1
you need to calibrate your camera view like this: OpenCV Birdseye view without loss of data before you measure the angles. You do not need the chesboard Instead use the wind turbine main frame and probably horizon or any other etalone in your view. As I mentioned before without actual input image we can only guess ...Spektre
Hi, I've added an image of the turbine I want monitored. Does this help?AGP
partialy ... as y axis you can use the wind turbine frame but you need also the x axis. it can be deduced if the dimensions of the blades are known. You create a geometry overlay and fit the rotation angles inside perspective vie until it matches your image. (it is not as easy as it sounds) If your view covers whole rotation of the blades then you can find the point where the blades are biggest/smallest radius. those points are your x axisSpektre
I added an image to your question just to be clear. The blades will follow ellipse like shape (not axis alligned and not really an ellipse due to perspective distortion) so locate the min and max radius that will give you x, y is obvious and then fit perspective view that matches this ...Spektre
Another option is to compute 3D position of the blade endpoints (from actual radius and FOV of camera) which gives you plane of the windturbine which is all you need to construct perspective matrix (and its inverse)Spektre

1 Answers

1
votes

Assume the tip of the blades plus the center (or the three "roots" of the blades") lie on a common plane.

  1. Fit a homography between those points and the corresponding ones in a reference pose for the turbine (cv::findHomography in OpenCv)
  2. Decompose the homography into rotation and translation using an estimated or assumed camera calibration (cv::decomposeHomographyMat).
  3. Convert the rotation into Euler angles.