当前位置: 首页 > news >正文

wordpress子域名网站石排东莞网站建设

wordpress子域名网站,石排东莞网站建设,安阳seo网站优化,为学校做网站策划怎么写OpenCV颜色空间实战 〇、Coding实战内容一、imread1.1 函数介绍1.2 Flags1.3 Code 二. 色彩空间2.1 获取单色空间2.2. HSV、YUV、RGB2.3. 不同颜色空间应用场景 〇、Coding实战内容 OpenCV imread()方法不同的flags差异性获取单色通道【R通道、G通道、B通道】HSV、YUV、RGB 一… OpenCV颜色空间实战 〇、Coding实战内容一、imread1.1 函数介绍1.2 Flags1.3 Code 二. 色彩空间2.1 获取单色空间2.2. HSV、YUV、RGB2.3. 不同颜色空间应用场景 〇、Coding实战内容 OpenCV imread()方法不同的flags差异性获取单色通道【R通道、G通道、B通道】HSV、YUV、RGB 一、imread 1.1 函数介绍 /** The function imread loads an image from the specified file and returns it param filename Name of file to be loaded. param flags Flag that can take values of cv::ImreadModes **/ CV_EXPORTS_W Mat imread( const String filename, int flags IMREAD_COLOR );1.2 Flags // enum ImreadModes { // IMREAD_UNCHANGED -1, //! If set, return the loaded image as is (with alpha channel, otherwise it gets cropped). Ignore EXIF orientation. // IMREAD_GRAYSCALE 0, //! If set, always convert image to the single channel grayscale image (codec internal conversion). // IMREAD_COLOR 1, //! If set, always convert image to the 3 channel BGR color image. // IMREAD_ANYDEPTH 2, //! If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit. // IMREAD_ANYCOLOR 4, //! If set, the image is read in any possible color format. // IMREAD_LOAD_GDAL 8, //! If set, use the gdal driver for loading the image. // IMREAD_REDUCED_GRAYSCALE_2 16, //! If set, always convert image to the single channel grayscale image and the image size reduced 1/2. // IMREAD_REDUCED_COLOR_2 17, //! If set, always convert image to the 3 channel BGR color image and the image size reduced 1/2. // IMREAD_REDUCED_GRAYSCALE_4 32, //! If set, always convert image to the single channel grayscale image and the image size reduced 1/4. // IMREAD_REDUCED_COLOR_4 33, //! If set, always convert image to the 3 channel BGR color image and the image size reduced 1/4. // IMREAD_REDUCED_GRAYSCALE_8 64, //! If set, always convert image to the single channel grayscale image and the image size reduced 1/8. // IMREAD_REDUCED_COLOR_8 65, //! If set, always convert image to the 3 channel BGR color image and the image size reduced 1/8. // IMREAD_IGNORE_ORIENTATION 128 //! If set, do not rotate the image according to EXIFs orientation flag. // };常用的有三种 a. -1 IMREAD_UNCHANGED忽视alpha通道 b. 0 IMREAD_GRAYSCALE灰度图 c. 1 IMREAD_COLOR 不填默认值且格式为BGR 1.3 Code assign_2.cpp #include opencv2/opencv.hpp #include iostream #include vector #include stringusing namespace cv; using namespace std;#include opencv2/opencv.hpp #include iostream #include vector #include string using namespace cv; using namespace std;int main(int argc, char *argv[]) {std::string filePath std::string(__FILE__);size_t pos filePath.find_last_of(/\\);std::string rootPath filePath.substr(0, pos); // string path string(__BASE_FILE__)/img.webp;cout rootPath;//IMREAD_COLOR BGRMat image imread(rootPath/img.webp,IMREAD_COLOR);//IMREAD_UNCHANGED, 无alpha通道Mat image1 imread(rootPath/img.webp,IMREAD_UNCHANGED);//IMREAD_GRAYSCALE 灰度图Mat image2 imread(rootPath/img.webp,IMREAD_GRAYSCALE);namedWindow(imread imread_unchanged); // 创建一个标题为 hello 的窗口imshow(hello, image); // image1, image2 //在窗口 hello 中显示图片waitKey(0); // 等待用户按下键盘destroyWindow(hello); // 销毁窗口 helloreturn 0; }输出结果 二. 色彩空间 2.1 获取单色空间 #include opencv2/opencv.hpp #include iostream #include vector #include string using namespace cv; using namespace std;int main(int argc, char *argv[]) {/*** 二、色彩空间* *///红色vectorMat channels;split(image, channels);//bgrchannels[0] Mat::zeros(image.rows, image.cols, CV_8UC1); // bluechannels[1] Mat::zeros(image.rows, image.cols, CV_8UC1); // greenMat red;merge(channels, red);//蓝色vectorMat channels_1;split(image, channels_1);//bgrchannels[1] Mat::zeros(image.rows, image.cols, CV_8UC1); // greenchannels[2] Mat::zeros(image.rows, image.cols, CV_8UC1); // redMat blue;merge(channels, blue);//绿色vectorMat channels_2;split(image, channels_2);//bgrchannels[0] Mat::zeros(image.rows, image.cols, CV_8UC1); // greenchannels[2] Mat::zeros(image.rows, image.cols, CV_8UC1); // redMat green;merge(channels, green); }输出结果 2.2. HSV、YUV、RGB int main(int argc, char *argv[]) {std::string filePath std::string(__FILE__);size_t pos filePath.find_last_of(/\\);std::string rootPath filePath.substr(0, pos); // string path string(__BASE_FILE__)/img.webp;cout rootPath;Mat image imread(rootPath/img.webp,IMREAD_COLOR);/*** 三、色彩空间**/Mat hsv;cvtColor(image,hsv,COLOR_BGR2HSV);Mat rgb;cvtColor(image,hsv,COLOR_BGR2RGB);Mat yuv;cvtColor(image,yuv,COLOR_BGR2YUV);namedWindow(hsv); imshow(hsv, hsv); waitKey(0); destroyWindow(hsv); return 0; }输出结果 颜色空间 具体可搜索wikipedia有很详细的介绍 1. HSV vs HSBhttps://en.wikipedia.org/wiki/HSL_and_HSV 2. YUV可参考本人以前的一篇文章https://blog.csdn.net/Scott_S/article/details/118525159?spm1001.2014.3001.55012.3. 不同颜色空间应用场景 RGB视频监视器彩色摄像机HSV [色调、饱和度、亮度]彩色处理为目的CMYK 印刷行业如果用过小米照片打印机就会发现一张照片需要渲染4次按照如下流程 Cyan蓝青色magenta品红、杨红Yellow:黄色Key: (black) YUV 电视信号传输占用极少的带宽
http://www.w-s-a.com/news/600871/

相关文章:

  • 商务网站建设的可行性分析包括小程序源码网免费
  • 永州网站建设收费标准重庆网站建设公司夹夹虫专业
  • python做网站多少钱wordpress 2.8
  • 深圳网站平台网站开发工作程序怎么写
  • 自己可以接单做网站吗wordpress 添加自定义按钮
  • 网站首页权重宣传页制作
  • 智能网站建设软件有哪些方面网页的建设
  • 石铜路网站建设生鲜电商网站开发
  • 怎么提高网站加载速度慢网站的轮播怎么做的
  • 网络网站推广优化建筑工程教育网官方网站
  • 旅行社网站策划做网站编辑好还是美工好
  • 珠海做网站找哪家好在线磁力搜索神器
  • 做网站优化有必要wordpress导航栏字体
  • 中山网站建设半江红沈阳免费网站建站模板
  • 工信部网站备案管理系统网站备案负责人 更换
  • 我要做个网站该怎么做怎么做电商平台网站
  • wordpress教程 网站标题莱芜大众网
  • 网站建设业务终止合作范本主机公园wordpress
  • 口碑好企业网站建设网站建设与什么专业有关
  • 助贷获客系统快速优化排名公司推荐
  • 重庆做网站优化推广的公司企业网站如何进行定位
  • 高密市赏旋网站设计有限公司山东广饶县建设局网站
  • 成都哪里有网站开发公司网业分离是什么
  • 购物导购网站开发女孩学建筑学好找工作吗
  • 做网站沈阳掌握夏邑进入公众号
  • 怎么做自动提卡网站谷歌推广怎么做
  • 大同网站建设熊掌号wordpress 首页单页
  • 青岛网站美工成都优秀网站建设
  • 聊城大型门户网站建设多版本wordpress
  • 建网站的公司 快云wordpress的搜索