Sometimes it is beneficial to actually display some information overlaid on the video sequence when doing video processing with OpenCV. Is it possible to do this? How might that be done?
Sometimes it is beneficial to actually display some information overlaid on the video sequence
Share
There is a function
cv::putTextwhich can be used to draw text into an image. So just grab the image from the video and draw the text on top of it before showing it. There should also be a similar function in the OpenCV C-API, but since you tagged it C++ I assume you use the C++ API, anyway.EDIT: Of course this function modifies the image, which then also contains the drawn text. So if you still need the original image for further processing, you should use
cv::displayOverlay. This might actually be a better solution thancv::putText, since it is a bit easier to use and is intended exactly for showing some small information over an image in a highgui window.