创建opencv Matrix时候的type
来源:互联网 发布:linux ubuntu安装教程 编辑:程序博客网 时间:2024/05/17 01:15
opencv matrix type:
CV_[The number of bits per item][Signed or Unsigned][Type Prefix]C[The channel number]
CV_<bit-depth>{U|S|F}C(<number_of_channels>)
M1 with one channel =
[255, 255;
255, 255]
M2 with two channel =
[0, 255, 0, 255;
0, 255, 0, 255]
M3 with three channel =
[0, 0, 255, 0, 0, 255;
0, 0, 255, 0, 0, 255]
http://stackoverflow.com/questions/8377091/what-are-the-differences-between-cv-8u-and-cv-32f-and-what-should-i-worry-about
http://docs.opencv.org/java/org/opencv/core/CvType.html
注释: 只有二位的matrix可以打印,多维的话,你自己需要写输出方法
CV_[The number of bits per item][Signed or Unsigned][Type Prefix]C[The channel number]
CV_<bit-depth>{U|S|F}C(<number_of_channels>)
M1 with one channel =
[255, 255;
255, 255]
M2 with two channel =
[0, 255, 0, 255;
0, 255, 0, 255]
M3 with three channel =
[0, 0, 255, 0, 0, 255;
0, 0, 255, 0, 0, 255]
#include "opencv/cv.h"#include <iostream>using namespace std;using namespace cv;int main(char* args) { Mat M1(2,2, CV_8UC1, 255); Mat M2(2,2, CV_8UC2, Scalar(0,255)); Mat M3(2,2, CV_8UC3, Scalar(0,0,255)); cout << "M1 with one channel = "<< endl << " " << M1 << endl << endl; cout << "M2 with two channel = "<< endl << " " << M2 << endl << endl; cout << "M3 with three channel = "<< endl << " " << M3 << endl << endl; M1.create(4,4, CV_8UC(2)); cout << "M1 = "<< endl << " " << M1 << endl << endl; Scalar s1(1); Scalar s2(1, 2); Scalar s3(1, 2, 3); Scalar s4(1, 2, 3, 4); Scalar s5(1, 2, 3, 5);// Scalar s(1, 2, 3, 5, 6, 7, 8, 9); cout << "scalar s1 "<< endl << " " << s1 << endl << endl; cout << "scalar s2 "<< endl << " " << s2 << endl << endl; cout << "scalar s3 "<< endl << " " << s3 << endl << endl; cout << "scalar s4 "<< endl << " " << s4 << endl << endl; cout << "scalar s5 "<< endl << " " << s5 << endl << endl;// cout << "scalar s5 "<< endl << " " << s << endl << endl;}
http://stackoverflow.com/questions/8377091/what-are-the-differences-between-cv-8u-and-cv-32f-and-what-should-i-worry-about
http://docs.opencv.org/java/org/opencv/core/CvType.html
注释: 只有二位的matrix可以打印,多维的话,你自己需要写输出方法
0 0
- 创建opencv Matrix时候的type
- opencv矩阵数据类型(Matrix type)
- OpenCV的Matrix
- OpenCV: Matrix type矩阵类型宏定义探究
- Selinux的type创建
- OpenCV中mat的type
- OpenCV中Mat的type
- OpenCV中Mat的type
- OpenCV中CV_IS_MAT_CONT(src->type & dst->type) 的含义!
- session是什么时候创建的?
- 创建表的时候创建索引
- 创建表的时候创建索引
- MySQL创建表的时候创建索引
- opencv画线的时候,RGB颜色顺序
- 关于Parcelable传递时候的异常 Unmarshalling unknown type code。
- Matrix multiplication in OpenCV
- opencv mat (matrix)数据结构
- TypeError: unhashable type: 'matrix'解决方法
- linux共享库位置配置(LD_LIBRARY_PATH环境变量 或者 更改/etc/ld.so.conf 或者 使用-R选项)
- C++和android进行socket通信小结
- 为什么很多PHP文件不加闭合标签?>
- 套接字地址结构
- UItableView基础加深
- 创建opencv Matrix时候的type
- Android 引导
- (转)写代码比读代码简单, "说自己"比"理解别人"简单
- REPORETING SERVER 2008 报表访问权限设置
- 谈谈SQL server的 worker threads
- cocos2d-x学习:CCSprite总结
- SQL Server统计信息(statistics)的总结
- phpMyAdmin简明安装教程
- ubuntu使用笔记