We first sum up the the number of white pixels in each column. Then we scan from left to right to compute two things:
- The index of the leftmost column with at least THRESHOLD% pixels white.
- The index of the rightmost column with at least THRESHOLD% pixels white.
We rotate the image and repeat this process, giving us similar projections along multiple directions. The polygon enclosed by these boundaries is an approximation of the boundary of the object.
The following are the results of running this process on the binary upswing motion history image from a previous post. The thresholds for the images below are 3%, 6%, and 9%, and we evaluate projections in 16 directions.
The following is the result for the corresponding upswing with a threshold of 5%.
Notice that the intensity of the mask is duller than the original. This is probably an artifact from the way we are manually rotating images, but it doesn't seem to affect the results.
Also note we have not yet computed the enclosing polygon; we are simply drawing the boundary lines from each projection.
No comments:
Post a Comment