3. Use OPenCV in the QT environment (common operations of Mat objects - copy and clone, create blank images, pixel traversal and operations)

1. Description

Under normal circumstances, OPenCV is used to read images, but sometimes images are created by themselves. In this case, the Mat class is needed . Here are only some commonly used related methods.

2. Commonly used methods

2.1 Image copy copyTo and clone clone

cv::Mat imageMat = cv::imread("D:/LearnQt/opencv/firstTest/images/test.jpg");
//判断为空
if(imageMat.empty()

Guess you like

Origin blog.csdn.net/FY_13781298928/article/details/131290625