▼页尾
摘要: 终于,考研成绩下来了。考得还不错,应该能上选的学校,也希望能进一个好的实验室。很长时间都没有更新了,一直在忙于考研的事情,希望以后能忙起来。联系了一个导师,以后可能要做自然语言处理方面的事情,希望自己保持学习的劲头。好了,就是这样。 阅读全文
posted @ 2012-02-23 15:38 xiatwhu 阅读(709) 评论(3) 推荐(0) 编辑
摘要: 这篇文章介绍了直方图均衡化的方法 阅读全文
posted @ 2011-08-06 13:45 xiatwhu 阅读(11962) 评论(0) 推荐(1) 编辑
摘要: 我们仍然如前例一样,构建一个类来处理得到直方图。我们来看看基本的类定义#ifndef HISTOGRAM_H_#define HISTOGRAM_H_#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>#include <opencv2/imgproc/imgproc.hpp>#include <iostream>#include <vector>class Histogram {private: int histSize[1]; float hr 阅读全文
posted @ 2011-08-03 13:33 xiatwhu 阅读(5228) 评论(4) 推荐(0) 编辑
摘要: 在这个例子中,我们开始选定一种颜色,并设置一个阈值然后把图片中和所选颜色的差别在阈值中的点标定出来在这个例子中,主要要注意这两点:1. OpenCV与QT的结合,包括Mat 与 QImage 的转换2. 我们使用了类来实现此功能,创建了一个单例模式的类首先我们创建一个简单的图形界面,使用的是QT创建处理图像用的类#ifndef COLORDETECTOR_H_#define COLORDETECTOR_H_#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>#include < 阅读全文
posted @ 2011-07-31 14:21 xiatwhu 阅读(15923) 评论(1) 推荐(0) 编辑
摘要: 内容来自《OpenCV 2 Computer Vision Application Programming Cookbook》OpenCV2 访问图像的各个像素有各种方法我们来用各种方法来实现减少图像的颜色数量color = color/div*div +div/2;若div为8,则原来RGB每个通道的256种颜色减少为32种。若div为64,则原来RGB每个通道的256种颜色减少为4种,此时三通道所有能表示的颜色有4×4×4 = 64 种首先,我们来看一个函数C++: uchar* Mat::ptr(int i=0)i 是行号,返回的是该行数据的指针。在OpenCV中,一 阅读全文
posted @ 2011-07-30 23:21 xiatwhu 阅读(25052) 评论(1) 推荐(1) 编辑
摘要: C++: void Mat::copyTo(OutputArray m) constC++: void Mat::copyTo(OutputArray m, InputArray mask) const这个函数可以复制图像到另一个图像或矩阵上,可选参数是掩码由于叠加的图像大小不一定相等,比如我们这里把一张小照片加到一张大照片上我们可以在大照片上设置一个和小照片一样大的感兴趣区域不使用掩码的时候,我们载入一张png,和一张jpg#include <opencv2/highgui/highgui.hpp>#include <opencv2/core/core.hpp>int 阅读全文
posted @ 2011-07-30 20:52 xiatwhu 阅读(12637) 评论(6) 推荐(0) 编辑
摘要: 椒盐噪声是由图像传感器,传输信道,解码处理等产生的黑白相间的亮暗点噪声。椒盐噪声往往由图像切割引起。我们用程序来模拟椒盐噪声,随机选取一些像素,把这些像素设为白色。#include <opencv2/core/core.hpp>#include <opencv2/highgui/highgui.hpp>#include <cstdlib>void salt(cv::Mat&, int n=3000);int main(){ cv::Mat image = cv::imread("E:/Image/Lena.jpg"); salt( 阅读全文
posted @ 2011-07-28 12:00 xiatwhu 阅读(8643) 评论(1) 推荐(0) 编辑
摘要: OpenCV的接口包括C++,C,Python的我用MinGW编译OpenCV2.1 和 OpenCV2.2 从未成功过前几日发现 OpenCV 2.3发布,下载了自解压程序,解压后又visual studio 2008,2010和MinGW版的但其中的MinGW版的是官方 MinGW的,我使用的是在 http://nuwen.net/mingw.html 下载的编译程序连接时总出错,于是下载了源码包,编译后能正常使用先来看看最简单的图像的载入与显示,使用C++接口#include <opencv2/core/core.hpp>#include <opencv2/highgu 阅读全文
posted @ 2011-07-28 11:53 xiatwhu 阅读(7605) 评论(0) 推荐(0) 编辑
摘要: In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p). It is possible to make £2 in the following way: 1×£1 + 1×50p + 2×20p + 1×5p + 1×2p + 3×1p How many different ways can £2 be made using any number of coins? 阅读全文
posted @ 2011-07-02 14:56 xiatwhu 阅读(517) 评论(0) 推荐(0) 编辑
摘要: Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 14 + 64 + 34 + 44 8208 = 84 + 24 + 04 + 84 9474 = 94 + 44 + 74 + 44 As 1 = 14 is not a sum it is not included. The sum of these numbers is 1634 + 8208 + 9474 = 19316. Find the sum of all the numbers that can be written as the sum of fifth powers of their digits. 阅读全文
posted @ 2011-06-29 10:57 xiatwhu 阅读(424) 评论(0) 推荐(0) 编辑
▲页首
西