Home  >  Article  >  Java  >  How to add text to image using Java OpenCV library?

How to add text to image using Java OpenCV library?

WBOY
WBOYforward
2023-09-15 20:21:05873browse

You can add text to an image using the putText() method of the org.opencv.imgproc.Imgproc class . This method renders the specified text within the given image. It accepts -

  • An empty pad object used to store the source image.

  • A string object to specify the required text.

  • Point object that specifies the text position.

  • Integer constant specifying the text font.

  • The scale factor multiplied by the base size specific to the font.

  • Scalar object text specifying the color.

  • Integer value that specifies text color

Example

The above is the detailed content of How to add text to image using Java OpenCV library?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete