在简单显示出图片之后,这次尝试一下将图片进行腐蚀操作,代码如下. #include <iostream> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; int main () { Mat img = imread ("D:\\1.jpg"); imshow ("原图",img); M
Color image loaded by OpenCV is in BGR mode.But Matplotlib displays in RGB mode.So color images will not be displayed correctly in Matplotlib if image is read with OpenCV.Please see the exercises for more details.(引自文档) import numpy as np import cv2