随笔分类 - opencv/MATLAB
opencv
摘要:img_org = cv2.UMat(cv2.imread(img2_name)) img_org.get()
阅读全文
摘要:摄像头 Capture _capture = new Capture(0); _capture.SetCaptureProperty(Emgu.CV.CvEnum.CAP_PROP.CV_CAP_PROP_FPS, 30); _capture.SetCaptureProperty(Emgu.CV.C
阅读全文
摘要: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
阅读全文
摘要:#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...
阅读全文
摘要:cmake-gui 配置 确认这些都正确 生成了CV2.so make install
阅读全文
摘要:# -*- coding: utf-8 -*-from sklearn.cluster import KMeansfrom sklearn.externals import joblibimport numpyfeature =numpy.random.rand(40,20)#调用kmeans类cl
阅读全文
摘要:random numpy.random.rand(3,2) 内存操作 numpy.getbuffer() numpy.frombuffer() list to npy numpy.fromiter(llb,np.int)
阅读全文
摘要:csv2npycccsv=numpy.genfromtxt('/root/c.csv', delimiter = ',')buf2npyimga=numpy.frombuffer(buf,numpy.uint8)
阅读全文
摘要:def findface(image):import cv2 frame=cv2.imread('n1.jpg')classifier=cv2.CascadeClassifier("haarcascade_frontalface_alt.xml")minSize=(10,10) faceRects=...
阅读全文
摘要:faceimg = x222;faceDetector = vision.CascadeObjectDetector();bbox = step(faceDetector, faceimg);facebox = insertObjectAnnotation(faceimg,'r...
阅读全文
摘要: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...
阅读全文
摘要:+cv就是测试:h=cv.imread('c:\h.jpg');
阅读全文
摘要: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...
阅读全文
摘要: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,:)); ...
阅读全文
摘要:使用ffmpeg类库进行开发的时候,打开流媒体(或本地文件)的函数是avformat_open_input()。其中打开网络流的话,前面要加上函数avformat_network_init()。一般情况下,只要传入流媒体的url就可以了。但是在打开某些流媒体的时候,可能需要附加一些参数。例如在播放中...
阅读全文
摘要:问题:undefined reference to `pthread_spin_init'解:修改CMakeCache.txt,CMAKE_EXE_LINKER_FLAGS原来为空,加上-lpthread -lrt -ldl
阅读全文
摘要:Cannyfunction [ canny ] = canny( rgb )temp=rgb2gray(rgb);canny=edge(temp,'canny');end灰度temp=rgb2gray(rgb);播放视频clear allsource = VideoReader('d:\v\\bus...
阅读全文
摘要:Create a detector object.faceDetector = vision.CascadeObjectDetector;Read input image. I = imread('visionteam.jpg');Detect faces. bboxes = step(...
阅读全文
摘要:>>se3 = strel('square',3)Neighborhood: 1 1 1 1 1 1 1 1 1>> se3 = strel('line',3 , 45)Neighborhood: 0 0 ...
阅读全文