Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 1005 Bytes

README.md

File metadata and controls

23 lines (13 loc) · 1005 Bytes

smootour

A temporally-smoothed contour class for OpenCV, with an approach similar to implicit surfaces.

Smootour on YouTube!

Inspired by [my question on Stack Overflow] (http://stackoverflow.com/questions/23525856/simplifying-a-contour-to-a-fixed-length-to-smooth-over-several-frames), where one poster observed that temporally-averaging points around a contour was not a feasible approach. This should be a better, by avoiding defining specific points between frames.

How to use smootour:

Smootour smootour(img_height, img_width);

//in loop
  //thresholded_image is a binary image
  
  smootour.update(thresholded_image);
  std::vector<std::vector<cv::Point> >smooth_contours = smootour.get_contours();