随笔分类 -  opencv/MATLAB

opencv
摘要:img_org = cv2.UMat(cv2.imread(img2_name)) img_org.get() 阅读全文
posted @ 2020-02-03 14:47 ahuo 阅读(1661) 评论(0) 推荐(0) 编辑
摘要:摄像头 Capture _capture = new Capture(0); _capture.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FPS, 30); _capture.SetCaptureProperty(Emgu.CV.C 阅读全文
posted @ 2016-08-19 13:47 ahuo 阅读(1493) 评论(0) 推荐(0) 编辑
摘要:cmake设置 CUDA_ARCH_BIN 3.2 5.2 CUDA_ARCH_PTX 3.2 5.2 否则报一下错误: OpenCV Error: Gpu API call (NCV Assertion Failed: cudaError_t=18, file=opencv-3.1.0/modul 阅读全文
posted @ 2016-08-03 11:32 ahuo 阅读(579) 评论(0) 推荐(0) 编辑
摘要:#include "stdafx.h" #include #include #include #include #include #include #include using namespace std; using namespace cv; using namespace dlib; //#pragma comment(lib,"dlib.lib") int main... 阅读全文
posted @ 2016-06-22 11:14 ahuo 阅读(1835) 评论(0) 推荐(0) 编辑
摘要:cmake-gui 配置 确认这些都正确 生成了CV2.so make install 阅读全文
posted @ 2016-04-20 15:08 ahuo 阅读(1734) 评论(1) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-04-07 16:51 ahuo 阅读(142) 评论(0) 推荐(0) 编辑
摘要:# -*- coding: utf-8 -*-from sklearn.cluster import KMeansfrom sklearn.externals import joblibimport numpyfeature =numpy.random.rand(40,20)#调用kmeans类cl 阅读全文
posted @ 2016-04-01 17:33 ahuo 阅读(429) 评论(0) 推荐(0) 编辑
摘要:random numpy.random.rand(3,2) 内存操作 numpy.getbuffer() numpy.frombuffer() list to npy numpy.fromiter(llb,np.int) 阅读全文
posted @ 2016-04-01 17:16 ahuo 阅读(248) 评论(0) 推荐(0) 编辑
摘要:csv2npycccsv=numpy.genfromtxt('/root/c.csv', delimiter = ',')buf2npyimga=numpy.frombuffer(buf,numpy.uint8) 阅读全文
posted @ 2015-12-25 08:59 ahuo 阅读(382) 评论(0) 推荐(0) 编辑
摘要:def findface(image):import cv2 frame=cv2.imread('n1.jpg')classifier=cv2.CascadeClassifier("haarcascade_frontalface_alt.xml")minSize=(10,10) faceRects=... 阅读全文
posted @ 2015-11-20 16:10 ahuo 阅读(323) 评论(0) 推荐(0) 编辑
摘要:faceimg = x222;faceDetector = vision.CascadeObjectDetector();bbox = step(faceDetector, faceimg);facebox = insertObjectAnnotation(faceimg,'r... 阅读全文
posted @ 2015-10-30 15:07 ahuo 阅读(1545) 评论(0) 推荐(0) 编辑
摘要:clc;clear all;for i=1:40for j=1:10image=imread(strcat('N:\FACE\orl_faces\s',...int2str(i),'\',int2str(j),'.pgm'));imwrite(image,strcat('N:\FACE\orl_fa... 阅读全文
posted @ 2015-10-29 17:50 ahuo 阅读(658) 评论(0) 推荐(0) 编辑
摘要:+cv就是测试:h=cv.imread('c:\h.jpg'); 阅读全文
posted @ 2015-10-20 09:57 ahuo 阅读(821) 评论(0) 推荐(0) 编辑
摘要:function MyGetFiles(F)path=F;filelist=dir(fullfile(path,'*.JPG'));n=length(filelist);for i=1:n f=strcat(path,filelist(i).name); disp(f);endMyGet... 阅读全文
posted @ 2015-09-06 15:14 ahuo 阅读(758) 评论(0) 推荐(0) 编辑
摘要:function[l]= Gray(I) % I: The name of image A=imread(I);m=0;n=0;[m,n]= size(A);Hproj=zeros(m,1);Vproj=zeros(1,n);for h=1:m Hproj(h) = sum(A(h,:)); ... 阅读全文
posted @ 2015-09-06 14:36 ahuo 阅读(744) 评论(0) 推荐(0) 编辑
摘要:使用ffmpeg类库进行开发的时候,打开流媒体(或本地文件)的函数是avformat_open_input()。其中打开网络流的话,前面要加上函数avformat_network_init()。一般情况下,只要传入流媒体的url就可以了。但是在打开某些流媒体的时候,可能需要附加一些参数。例如在播放中... 阅读全文
posted @ 2015-03-06 12:12 ahuo 阅读(1295) 评论(0) 推荐(0) 编辑
摘要:问题:undefined reference to `pthread_spin_init'解:修改CMakeCache.txt,CMAKE_EXE_LINKER_FLAGS原来为空,加上-lpthread -lrt -ldl 阅读全文
posted @ 2014-11-20 15:48 ahuo 阅读(550) 评论(0) 推荐(0) 编辑
摘要:Cannyfunction [ canny ] = canny( rgb )temp=rgb2gray(rgb);canny=edge(temp,'canny');end灰度temp=rgb2gray(rgb);播放视频clear allsource = VideoReader('d:\v\\bus... 阅读全文
posted @ 2014-11-11 11:44 ahuo 阅读(334) 评论(0) 推荐(0) 编辑
摘要:Create a detector object.faceDetector = vision.CascadeObjectDetector;Read input image. I = imread('visionteam.jpg');Detect faces. bboxes = step(... 阅读全文
posted @ 2014-08-22 14:03 ahuo 阅读(577) 评论(0) 推荐(0) 编辑
摘要:>>se3 = strel('square',3)Neighborhood: 1 1 1 1 1 1 1 1 1>> se3 = strel('line',3 , 45)Neighborhood: 0 0 ... 阅读全文
posted @ 2014-08-22 11:17 ahuo 阅读(697) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示