code: @SuppressWarnings("unchecked")
      private Collection<Polygon> doVectorize( RenderedImage src, Map<String, Object> args ) {
          ParameterBlockJAI pb = new ParameterBlockJAI("Vectorize");
          pb.setSource("source0", src);
  
          // Set any parameters that were passed in
          for( Entry<String, Object> e : args.entrySet() ) {
              pb.setParameter(e.getKey(), e.getValue());
          }
  
          // Get the desintation image: this is the unmodified source image data
          // plus a property for the generated vectors
          RenderedOp dest = JAI.create("Vectorize", pb);
  
          // Get the vectors
          Object property = dest.getProperty(VectorizeDescriptor.VECTOR_PROPERTY_NAME);
          return (Collection<Polygon>) property;
      }
docs: Helper function to run the Vectorize operation with given parameters and
  retrieve the vectors.
  
  @param src the source image
  @param args a {@code Map} of parameter names and values
  
  @return the generated vectors as JTS Polygons