- 博客(47)
- 收藏
- 关注
转载 fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
全盘搜索cvtres.exe把搜索到的位于vs目录下的该文件删除或重命名即可。
2014-12-13 11:54:19
547
原创 Preference必选其一
private void disableLastCheckedPref() { Collection checked = new ArrayList( 3); if (decode1D.isChecked()) { checked.add(decode1D); } if (decodeQR.isChecked()) { checked.add(decodeQR)
2013-12-09 20:57:57
705
转载 CountDownLatch
import java.text.SimpleDateFormat;import java.util.Date;import java.util.concurrent.CountDownLatch;public class CountDownLatchDemo { final static SimpleDateFormat sdf = new SimpleDateFormat("y
2013-11-27 22:39:55
636
转载 MYSQL配置
MySQL5.6.11安装步骤(Windows7 64位)1. 下载MySQL Community Server 5.6.142. 解压MySQL压缩包将以下载的MySQL压缩包解压到自定义目录下。3. 添加环境变量变量名:MYSQL_HOME变量值:D:\Program Files\mysql-5.6.14-winx64即为mysql的自定
2013-11-02 15:34:08
1548
原创 Fast corner detection
int _tmain(int argc, _TCHAR* argv[]) { Mat img = imread("LenaGr.jpg", 0); //vector of KeyPoints vector keyPoints; //construction of the fast feature detector object FastFeatureDetector fast(40)
2012-09-26 15:15:16
2316
原创 invert color of image
int _tmain(int argc, _TCHAR* argv[]) { IplImage *img = NULL; int height, width, step, channels; uchar *data; int i, j, k; //load an image img = cvLoadImage("Lena.jpg"); if(!img) { perror("Can
2012-09-22 18:43:37
781
原创 simple image processing
int _tmain(int argc, _TCHAR* argv[]) { IplImage *src = NULL; IplImage *tmp = NULL; IplImage *src_bg = NULL; IplImage *dst_gray = NULL; IplImage *dst_bw = NULL; IplImage *dst_contours = NULL; Ip
2012-09-22 18:20:36
496
原创 resize image
int _tmain(int argc, _TCHAR* argv[]) { IplImage *src = NULL; IplImage *dst = NULL; float scale = 0.618; CvSize dst_cvsize; src = cvLoadImage("Lena.jpg", CV_LOAD_IMAGE_COLOR); dst_cvsize.width
2012-09-21 09:38:05
728
原创 cvGaussBGModel
int _tmain(int argc, _TCHAR* argv[]) { IplImage* pFrame = NULL; IplImage* pFrImg = NULL; IplImage* pBkImg = NULL; CvCapture* pCapture = NULL; int nFrmNum = 0; cvNamedWindow
2012-09-21 09:23:49
3432
原创 use cvFindContours
IplImage *g_image = NULL;IplImage *g_gray = NULL;int g_thresh = 100;CvMemStorage *g_storage = NULL;void on_trackbar(int) { if (g_storage == NULL) { g_gray = cvCreateImage(cvGetSize(g_image), 8
2012-09-20 10:36:52
566
原创 Template matching
int _tmain(int argc, _TCHAR* argv[]) { IplImage *src, *templ, *ftmp[6]; //ftmp will hold results int i; //Read in the source image to be searched src = cvLoadImage("face.jpg", 1); if (!src) { p
2012-09-19 15:54:15
610
原创 cvHoughCircles
int _tmain(int argc, _TCHAR* argv[]) { IplImage *image = cvLoadImage("LenaGr.jpg", 0); CvMemStorage *storage = cvCreateMemStorage(0); cvSmooth(image, image, CV_GAUSSIAN, 5, 5); CvSeq *results = c
2012-09-18 20:51:37
607
原创 Canny operator
//Canny operator//int _tmain(int argc, _TCHAR* argv[]) { IplImage *img = cvLoadImage("E:\\ProgramData\\data\\LenaGr.jpg", 0);//0 means get the gray img IplImage *edgesCanny = cvCreateImage(cvGetSi
2012-09-18 16:58:43
775
原创 Sobel operator
int _tmain(int argc, _TCHAR* argv[]) { IplImage *src = cvLoadImage("LenaGray.jpg"); IplImage *dst = cvCreateImage(cvGetSize(src), IPL_DEPTH_16S, 3); cvSobel(src, dst, 1, 0, 7); cvNamedWindow("Te
2012-09-18 09:51:07
664
原创 use cvThreshold in three channel and truncate values above 100
void sum_rgb(IplImage *src, IplImage *dst) { //Allocate individual image planes. IplImage *r = cvCreateImage(cvGetSize(src), IPL_DEPTH_8U, 1); IplImage *g = cvCreateImage(cvGetSize(src), IPL_DEPTH_
2012-09-11 14:51:08
425
原创 use cvPrySegmentation
//use cvPrySegmentationvoid f( IplImage *src, IplImage *dst ) { CvMemStorage *storage = cvCreateMemStorage(0); CvSeq *comp = NULL; cvPyrSegmentation( src, dst, sto
2012-09-11 09:19:23
468
原创 use slider to realize the button function
int g_switch_value = 1;void switch_off_function() {printf("Pause\n");};void switch_on_function() {printf("Run\n");}; //This will be the callback that we give to //the trackbar.void switch_callba
2012-09-10 16:14:04
557
原创 draw rectangle
//Define out callback which we will install//for mouse events.void my_mouse_callback( int event, int x, int y, int flags, void *param );CvRect box;bool drawing_box = false;//A little subr
2012-09-10 14:30:40
1544
原创 save and load a matix
int _tmain(int argc, _TCHAR* argv[]) { CvMat *the_matrix_data = cvCreateMat(5,5,CV_32FC1); float element_3_2 = 7.7; *((float*)CV_MAT_ELEM_PTR( *the_matrix_data, 3,2) ) = element_3_2; cvmS
2012-09-09 20:37:21
508
原创 RGB to gray
//use cvCvtColorint _tmain(int argc, _TCHAR* argv[]) { IplImage *src = cvLoadImage("Lena.jpg"); IplImage *dst = cvCreateImage( cvGetSize(src), src ->depth, 1 ); cvCvtColor(src, dst, CV_RGB
2012-09-09 19:14:38
1638
原创 capture from the camera
int _tmain(int argc, _TCHAR* argv[]) { cvNamedWindow("Example2_9", CV_WINDOW_AUTOSIZE); CvCapture *capture; capture = cvCreateCameraCapture(0); assert(capture != NULL); IplImage *frame; whi
2012-09-08 15:45:56
771
原创 Transform img to 1/2
IplImage* doPyrDown( IplImage* in){ // Best to make sure input image is divisible by two. // assert( in->width%2 == 0 && in->height%2 == 0 ); IplImage* out = cvCreateImage(
2012-09-07 20:29:24
560
原创 Gaussian Smooth
#include "stdafx.h"#include #include "opencv2/opencv.hpp"using namespace std;using namespace cv;void example2_4( IplImage* image ){ // Create some windows to show the input // and out
2012-09-07 20:07:39
1218
原创 Read media
#include "stdafx.h"#include #include "opencv2/opencv.hpp"using namespace std;using namespace cv;int _tmain(int argc, _TCHAR* argv[]){//read media c style cvNamedWindow("test2", CV_WINDOW_A
2012-09-05 12:27:28
386
原创 Read Image
#include "stdafx.h"#include #include "opencv2/opencv.hpp"using namespace std;using namespace cv;int _tmain(int argc, _TCHAR* argv[]){ //read image c style IplImage *img = cvLoadImag
2012-09-05 12:15:55
638
原创 const_cast 用法
#include using namespace std;class CCTest {public: void setNumber( int ); void printNumber() const;private: int number;};inline void CCTest::setNumber( int num ) { number = num; }v
2012-08-27 22:26:16
720
转载 C++ const
一、Const作用 如下所示:1可以定义const常量 const int Max = 100; 2便于进行类型检查 const常量有数据类型,而宏常量没有数据类型。编译器可以对前者进行类型安全检查,而对后者只进行字符替换,没有类型安全检查,并且在字符替换时可能会产生意料不到的错误void f(const int i) { .........}
2012-08-27 20:47:38
317
转载 支持向量机(SVM)综述
1. SVM的优势(1)可以解决小样本情况下的机器学习问题#此前在首页部分显示#(2)可以提高泛化性能(3)可以解决高维问题(4)可以解决非线性问题(5)可以避免神经网络结构选择和局部极小点问题2. SVM的研究热点(1)模式识别(2)回归估计(3)概率密度估计3. SVM的主要核函数(1)多项式核函数(2
2011-12-20 20:22:25
752
原创 SVM入门指南
http://ntu.csie.org/~piaip/svm/svm_tutorial.htmlhttp://www.csie.ntu.edu.tw/~cjlin/libsvm/
2011-12-20 20:19:45
579
转载 Bipartite Matching
CS4245 Analysis of Algorithms Bipartite MatchingIstvan SimonThe Marriage Problem and Matchings Suppose that in a group of n single women and n single men who desire to get marrie
2011-11-28 18:24:47
4281
原创 HString
using namespace std;#include #define OK 1#define ERROR -1#define OVERFLOW -2#define TRUE 1#define FALSE -1typedef struct { /******************************************************
2011-11-11 19:47:18
3513
1
原创 SString
using namespace std;#include #define OK 1#define ERROR -1#define TRUE 1#define FALSE -1#define MAXSTRLEN 255/***********************************************************************
2011-11-08 11:00:56
6959
原创 LinkQueue
using namespace std;#include #define OK 1#define ERROR -1#define TRUE 1#define FALSE 0#define OVERFLOW -2typedef char QElemType;typedef struct QNode { /************************
2011-11-02 18:24:34
2689
原创 SqStack
#include using namespace std;#define OK 1#define ERROR -1#define TRUE 1#define FALSE 0#define OVERFLOW -2#define STACK_INIT_SIZE 100 //存储空间初始分配量#define STACKINCREMENT 10 //存储空间分配增量t
2011-10-30 12:32:11
2314
原创 DuLinkList
#include using namespace std;#define OK 1#define ERROR -1#define TRUE 1#define FALSE 0#define OVERFLOW -2typedef char ElemType;typedef struct DuLNode { /***********************************
2011-10-26 18:34:30
1699
原创 LinkList
#include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR -1typedef char ElemType; //指定ElemType的类型typedef struct LNode{ /************************************************
2011-10-23 16:36:48
3835
原创 非负数四舍五入
#include #include using namespace std;int round(double number);int main() { double num; char ans; do { cout << "Ente
2011-10-13 20:42:49
1133
原创 SqList
#include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR -1#define OVERFLOW -2#define LIST_INIT_SIZE 100 //线性表存储空间的初始分配量#define LISTINCREMENT 10 //线性表存储空间的分配增量#define ElemT
2011-10-12 12:09:08
7748
原创 数字螺旋方阵
#define N 10#include void main() { int num[N][N] = {0}; int i, j, k, r = 1; for(i = 0, j = 0; i < N; i++) num[i][j] = r++;
2011-09-16 19:10:29
1547
原创 字符型数字转换成数值型
#include void main() { int stoi(char str[]); char str[10]; printf("input a digit string:\n"); scanf("%s", str); printf("\nThe va
2011-09-15 20:37:09
2598
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人