邻域算子和线性滤波函数

#include 
#include 
#include 
#include 
#include 
using namespace std;
int main()
{
    cv::Mat srcImage = cv::imread("C:\\Users\\LP\\Desktop\\C++\\ConsoleApplication4\\ConsoleApplication4\\1.jpg");
    if (srcImage.empty())
    {
        return -1;
    } 
    cv::imshow("原图像", srcImage);
    cv::Mat image_hsv, image_H, image_S, image_V, image_col;
    //HSV颜色空间转换
    cv::cvtColor(srcImage, image_hsv, CV_BGR2HSV);
    cv::imshow("image_hsv", image_hsv);
    //YCrCb颜色空间转换
    cv::cvtColor(srcImage, image_col, CV_BGR2YCrCb);
    cv::imshow("image_col", image_col);
    //HLS颜色空间转换
    cv::cvtColor(srcImage, image_col, CV_BGR2HLS);
    cv::imshow("iamge_HLS", image_col);
    //Lab颜色空间转换
    cv::cvtColor(srcImage, image_col, CV_BGR2Lab);
    cv::imshow("image_Lab", image_col);
    //分离HSV各个通道
    std::vector hsvChannels;
    cv::split(image_hsv, hsvChannels);
    //0通道为H分量,1通道为S分量,2通道为V分量
    image_H = hsvChannels[0];
    image_S = hsvChannels[1];
    image_V = hsvChannels[2];
    //分别显示各通道图像
    cv::imshow("image_H", image_H);
    cv::imshow("image_S", image_S);
    cv::imshow("image_V", image_V);

    cv::waitKey(0);
    return 0;
}