- 博客(11)
- 资源 (10)
- 收藏
- 关注
原创 python shuffle文本行
import osimport randomout = open("feature_shuffle.txt",'w')lines=[]with open("feature.txt", 'r') as infile: for line in infile: lines.append(line)random.shuffle(lines)for line in lines: out.
2017-04-22 18:38:46
2295
转载 java日志测试
import java.awt.*;import java.awt.event.*;import java.io.*;import java.util.logging.*;import javax.swing.*;/** * A modification of the image viewer program that logs various events.
2013-10-06 16:08:12
480
原创 opencv实现canndy算子
// cannyDetection.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "cv.h"#include "highgui.h"IplImage* doCanny(IplImage* in,double lowThresh,double highThresh,double aperture){i
2013-05-04 22:10:44
775
原创 opencv处理矩阵系列子程序
// cvMatTest.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include "cv.h"int _tmain(int argc, _TCHAR* argv[]){/*//用固定数据创建矩阵CvMat rotmat;int sizes[2];
2013-05-04 22:08:03
622
原创 opencv实现视频加载与播放
// vedioLoad.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "highgui.h"int _tmain(int argc, char** argv[]){char* vedio="E:\\nba.avi";cvNamedWindow("Example2",CV_WINDOW_AUTOSIZ
2013-05-04 22:05:48
1046
原创 opencv绘制矩形程序
// RectPaint.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "cv.h"#include "highgui.h"/*CvRect box;bool Drawing=false;void DrawRect(IplImage* img,CvRect rect){cvRectangle(im
2013-05-04 22:04:38
615
原创 opencv实现图像缩放
// scaleTransform.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "cv.h"#include "highgui.h"//把图像缩放为原来的1/2IplImage* doPyrDown(IplImage* in,int filter=IPL_GAUSSIAN_5x5){assert(in-
2013-05-04 22:04:29
897
原创 opencv加载并显示图像程序
#include "stdafx.h"#include "highgui.h"int _tmain(int argc, char** argv[]){char* image="E:\\Demo.jpg";IplImage* img=cvLoadImage(image);//将图像加载至内存cvNamedWindow("Example1",CV_WINDOW_
2013-05-04 21:59:37
651
原创 opencv累加一个三通道矩阵的所有元素(结果绝对正确)
float sum(const CvMat* mat){float s=0.0f;for(int row=0;rowrows;row++){float* prt=(float*)(mat->data.ptr+row*mat->step);for (int col=0;colcols;col++){s+=prt[3*col]+prt[3*col+1]+prt[3*co
2013-05-04 20:13:53
2019
原创 C++ 图像镜像
问题主要集中于图像每一个扫描行的实际字节数,对于8bit灰度图像其扫描行字节数为int bytesperline = (((width*8)+31)/32*4);因此水平镜像程序如下: void CImageProcessBetaView::OnMirrorHorizonal(){ // TODO: 在此添加命令处理程序代码 //指向源图像 BYTE* lpSrc;
2013-04-11 11:13:53
1463
原创 LINUX下java环境的设置
1.安装JAVA:sudo apt-get install openjdk2.设置环境变量# sudo gvim /etc/profile在profile后面添加上最后包含export的三句话export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-i386export CLASSPATH=.:$PATH:JAVA_HOME/lib:JA
2013-04-08 12:53:37
425
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人