putText function

Mat putText(
  1. InputOutputArray img,
  2. String text,
  3. Point org,
  4. int fontFace,
  5. double fontScale,
  6. Scalar color, {
  7. int thickness = 1,
  8. int lineType = LINE_8,
  9. bool bottomLeftOrigin = false,
})

PutTextWithParams draws a text string. It renders the specified text string into the img Mat at the location passed in the "org" param, using the desired font face, font scale, color, and line thinkness.

For further details, please see: http:///docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga5126f47f883d730f633d74f07456c576

Implementation

Mat putText(
  InputOutputArray img,
  String text,
  Point org,
  int fontFace,
  double fontScale,
  Scalar color, {
  int thickness = 1,
  int lineType = LINE_8,
  bool bottomLeftOrigin = false,
}) {
  final textPtr = text.toNativeUtf8().cast<ffi.Char>();
  cvRun(
    () => cffi.PutTextWithParams(
      img.ref,
      textPtr,
      org.ref,
      fontFace,
      fontScale,
      color.ref,
      thickness,
      lineType,
      bottomLeftOrigin,
    ),
  );
  calloc.free(textPtr);
  return img;
}