Class FindCirclesPipe

java.lang.Object
org.photonvision.vision.pipe.CVPipe<org.apache.commons.lang3.tuple.Pair<org.opencv.core.Mat,List<Contour>>,List<CVShape>,FindCirclesPipe.FindCirclePipeParams>
org.photonvision.vision.pipe.impl.FindCirclesPipe

public class FindCirclesPipe extends CVPipe<org.apache.commons.lang3.tuple.Pair<org.opencv.core.Mat,List<Contour>>,List<CVShape>,FindCirclesPipe.FindCirclePipeParams>
  • Constructor Details

    • FindCirclesPipe

      public FindCirclesPipe()
  • Method Details

    • process

      protected List<CVShape> process(org.apache.commons.lang3.tuple.Pair<org.opencv.core.Mat,List<Contour>> in)
      Runs the process for the pipe. The reason we need a separate pipe for circles is because if we were to use the FindShapes pipe, we would have to assume that any shape more than 10-20+ sides is a circle. Only issue with such approximation is that the user would no longer be able to track shapes with 10-20+ sides. And hence, in order to overcome this edge case, we can use HoughCircles which is more flexible and accurate for finding circles.
      Specified by:
      process in class CVPipe<org.apache.commons.lang3.tuple.Pair<org.opencv.core.Mat,List<Contour>>,List<CVShape>,FindCirclesPipe.FindCirclePipeParams>
      Parameters:
      in - Input for pipe processing. 8-bit, single-channel, grayscale input image.
      Returns:
      Result of processing.