예제 #1
0
// Returns a vector of points that contains the four corners of a rectangle
// by finding the best features.
// Automatically refines the corners.
// Currently only tested with four points (rectangle)
// Returns empty vector when filter is not applied / successful.
std::vector<cv::Point2f> CornerExtractor::getCorners()
{
#if CALIB && !isStreaming
  // TODO: set this up with callbacks that somehow call update()
  startWindows();
#endif

  if (!(params_->applyFilter))
      return std::vector<cv::Point2f>();

  // if (params_->applyFilter)
  {
    findGoodCorners();

    // Refine the corners so that distances are absolute minima
    refineCorners();

    orderCorners();

    return corners_;
  }
}
예제 #2
0
	AdvancedEdge::AdvancedEdge(AdvancedVertex& startPoint, AdvancedVertex& endPoint)
	: Edge<AdvancedVertex>(startPoint, endPoint)
	{
		orderCorners();
	}