- After computing the motion mask from before, we perform a morphological closing (2 iterations of dilation and erosion) to remove small gaps and help smooth edges.
- We apply this mask to the original frame to isolate the moving parts in the original image.
- After converting to grayscale, we run Canny edge detection.
- Finally we run a Hough transform to detect line segments.
As you can see, the line segment detection works pretty well when the club is moving slowly, but not when the club is moving more quickly and against a background with similar color.
We also ran this process on down-the-line and up-the-line videos, without changing any of the parameters to the edge and line detection algorithms:
We will continue to experiment with the parameters of the various stages (closing, Canny, Hough) to try to get better results for these sample videos. We will also record video with a more neutral background and higher contrast to the golf club to see how this segment detection performs.
Given more accurate results from Hough, the next step is to examine the segments discovered and merge close-to-parallel line segments. Once these parallel line segments are defined, we will trace them in the original images to try to detect the position of the clubhead and the golfer's hand by looking at color changes.
No comments:
Post a Comment