
OpenCV
文章平均质量分 71
JUAN425
这个作者很懒,什么都没留下…
展开
-
code::blocks(版本10.05) 配置opencv2.4.3
(1)首先下载opencv2.4.3, 解压缩到D:下;(2)配置code::blocks, 具体操作如下:第一步, 配置compiler, 操作步骤为Settings -> Compiler and debugger这样出现如下图:第二步:add link(添加链接):接下来, 切换到opencv 的解压目录目录: D:\opencv\build\includ原创 2014-07-25 21:58:21 · 1257 阅读 · 0 评论 -
opencv 检测鼠标的点击和移动
只需要定义一个callback的函数, 然后将这个函数附属到我们定义的一个opencv的window上即可, 这样每当鼠标在窗口处发生动作的时候, 就会调用callback函数。 点击鼠标的时候, callback也会记录下点击鼠标的位置。 程序如下:#include "opencv2/highgui/highgui.hpp"#include using namespace std;翻译 2015-01-25 13:22:42 · 3372 阅读 · 0 评论 -
图像增强
图像增强(image enhancement)的方法主要分为两大类:(1) 空间域方法(spatial domain methods)(2) 频域方法(frequency domain methods).图像增强的主要目的是通过修改图像的attribute, 使得得到的图像suitable for a given task and specific observe。在spatial原创 2015-01-04 19:54:09 · 2296 阅读 · 0 评论 -
How to convert an input image from one color space to another space
Mainly we will cover the case that converting BGR to/ from HSV using opencv library.RGB: 一般用于电脑显示的三原色。 代表R(red), G(green), B(blue). 任何一种standard color or brightness 均为一个combination of Red, Green, B原创 2015-01-01 15:25:40 · 770 阅读 · 0 评论 -
opencv程序: a hello world programming
程序如下(运行的IDE: code::blocks)#include #include #include using namespace std;using namespace cv;int main(int argc, char** argv) { if(argc != 2) { cout << "Usage::LoadImage ImageToLoad原创 2015-01-01 14:40:48 · 680 阅读 · 0 评论 -
计算线程index
CUDA相关知识整理CUDA libraries主要有两个: (1) BLAS:全称是Basic Linear Algebra Subprograms。 是一个用于线性代数运算的应用程序接口。 (2) FFT: 即使得能够在NVIDIA GPU上高效执行FFT变换的库。当我们launch了a grid of blocks of threads 的时候, 我们在kernel中需要指定CUDA原创 2015-02-07 14:26:20 · 914 阅读 · 0 评论 -
How to access pixel data of an image
总体来说, 总共有三种办法:(1) using 'at'(2) using direct address calculation(3) using 'ptr'方法一:如下Mat img= imread("image.jpg", 0) //0 for grayscale image reading for (int i = 0; i < img.rows; i++)原创 2015-01-01 21:18:08 · 945 阅读 · 0 评论 -
opencv: converting color 后序
#include #include using namespace std;using namespace cv;string winName = "Image";Mat rgbIm;int h = 0;int s = 255;int v = 255;void hMoved(int pos, void* x) { h = pos; Mat hsvIm;翻译 2015-01-01 20:39:29 · 667 阅读 · 0 评论 -
Ubuntu14.04下面安装opencv3.0.0
要安装opencv, 从网上下载了一个脚本, 名字是install-opencv.sh。 从U盘拷贝到自己新建的工作目录opencv下面。 然后运行如下指令:sudo ./install-opencv.sh原创 2015-02-06 14:28:04 · 1500 阅读 · 0 评论 -
ubuntu14.04 + opencv3.0.0 + code::blocks
安装好了opencv, 想要在一个IDE进行opencv的开发。 这里使用CB。 注意opencv的搜索路径默认在如下路径中: /usr/local/include/opencv /usr/local/include/opencv2可以打开查看。接下来, 打开CB, 执行如下选项:settings --> compiler ---> search directories 设置如下原创 2015-02-06 16:35:18 · 1169 阅读 · 0 评论 -
reading and writing xml files
我们可以将various OpenCV 的 data strucures 以及C++ 中的primitive data structures 写入到XML 格式 或者 YAML 格式的文件中去, 也可以从这些文件中读取我们存储进去的Open data structures 或者 primitive data structures。 XML 文件就是可扩展标记语言。 用来标记数据, 定义数据类型。原创 2015-01-06 10:30:30 · 782 阅读 · 0 评论 -
opencv 2.4.3 配置VS2010
题记: 上学期用过opencv做过一个项目。 不过用的opencv2.原创 2014-07-28 21:10:37 · 951 阅读 · 0 评论 -
关于在console中查看opencv Mat 矩阵元素的问题
程序如下:#include #include using namespace cv;using namespace std;int main() { Mat temp2(5, 5, CV_8UC1, Scalar(255)); for (int i=0; i<temp2.rows; i++) { for (int j=0; j<temp2.col原创 2015-01-25 12:58:42 · 1874 阅读 · 0 评论