Check opencv version

I want to check the OpenCV version without using python, I mean directly from the terminal.
the expected results should be in the following format:

Name: opencv
Description: The opencv library
Version: 2.x.x
Cflags: -I${includedir}/opencv -I${includedir}/opencv2
Libs: -L${libdir} -lopencv_calib3d -lopencv_imgproc -lopencv_contrib -lopencv_legacy -lopencv_core -lopencv_ml -lopencv_features2d -lopencv_objdetect -lopencv_flann -lopencv_video -lopencv_highgui

Thank you.

If you have installed OpenCV with pkg_config enabled, just type:

cat /usr/local/lib/pkgconfig/opencv4.pc

(or /usr/lib/... if installed from the package manager and .../opencv.pc if using opencv 2.x/3.x).

If needed, type find /usr -name opencv4.pc (or opencv.pc)

Thanks for replying,
Actually, I tried all that did you mentioned here, and none of them is working for me.
The output of this
import cv2
Screenshot from 2021-03-01 14-50-37

My main issue was

Screenshot from 2021-03-01 16-23-17

OpenCv V4 was already installed, and I solved it by running the following

sudo apt-get install libopencv-dev

look for opencv_version. it’s an executable.

Thanks @crackwitz , already fixed.