matlab練習程式(透視變換)

close all;clc;H=1; %索引pix中第一個元素,即高度W=2; %索引pix中第二個元素,即寬度left_right=0.3; %抬起左邊或右邊時值為0-1之間,不抬起時為0up_down=0; %抬起上邊或下邊時值為0-1之間,不抬起時為0img=imread('lena.jpg');

獲得磁碟卷序號

#include <iostream>#include <windows.h>int main(int argc, char* argv[]){ char VolumeInfo[100]; DWORD VolNameSize=100; DWORD VolSerialNumber; DWORD VolMaxComponentLength; DWORD

Socket(發送,接收)

send.cpp:#include <WinSock2.h>#include <stdio.h>#include <Windows.h>#pragma comment(lib,"ws2_32.lib")int main(){ unsigned long ip; ip=inet_addr("127.0.0.1"); short port; port=8000; printf("Connecting to 127.0.0.1:8000

Win控制台(多線程)

#include <windows.h>#include <process.h> /* _beginthread, _endthread */#include <iostream>#include <fstream>#include <string>using namespace std;ofstream out("out.txt");void ThreadFunc1(PVOID param){ while(1) {

matlab練習程式(感知雜湊對比圖片)

clear all;close all;clc;img=imread('saber9.jpg');img2=imread('saber2.jpg');imshow(img)figure,imshow(img2);tmp=rgb2gray(img);tmp2=rgb2gray(img2);img_re=imresize(tmp,[8 8]);img_re2=imresize(tmp2,[8

matlab練習程式(zs映像細化)

zseven.mfunction out=zseven(nbhd) s=sum(nbhd(:))-nbhd(5); temp1=(2<=s)&(s<=6); p=[nbhd(1) nbhd(4) nbhd(7) nbhd(8) nbhd(9) nbhd(6) nbhd(3) nbhd(2)]; pp=[p(2:8) p(1)]; xp=sum((1-p).*pp); temp2=(xp==1); prod1=nbhd(4)*nbhd(

matlab練習程式(LMS)

%LMS演算法示範(matlab)%設定參數,N為採樣個數,u為步長clear,clc;N=16;u=0.1;%設定迭代次數kk=1000;%pha為隨機雜訊的平均功率rk=randn(1,k)/2;%%常態分佈的隨機矩陣pha=mean(rk);%%求元素平均值%設定起始權值wk(1,:)=[0 0];%用LMS演算法迭代求最佳權值for i=1:k xk(i,:)=[sin(2*pi*i/N) sin(2*pi*(i-1)/N)]+rk(i);%輸入訊號 yk(i)=xk(i,:

matlab練習程式(產生多維高斯分布機率密度函數)

clear all;close all;clc;randn('seed',0);%%一維高斯函數mu=0;sigma=1;x=-6:0.1:6;y=normpdf(x,mu,sigma);plot(x,y);figure;%%二維或多維高斯函數mu=[0 0];sigma=[0.3 0;0 0.35];[x y]=meshgrid(linspace(-8,8,80)',linspace(-8,8,80)');X=[x(:) y(:)];z=mvnpdf(X,mu,sigma);surf(x,y,

matlab練習程式(卡爾曼濾波)

clear all;close

matlab練習程式(白平衡)

clear all;close all;clc;im=imread('2.png');im2=im;im1=rgb2ycbcr(im);%將圖片的RGB值轉換成YCbCr值%Lu=im1(:,:,1);Cb=im1(:,:,2);Cr=im1(:,:,3);[x y

matlab練習程式(Gabor Filter)

clear all;close all;clc;img=imread('lena.jpg');imshow(img);phi=pi/2;theta=2;sigma=0.65*theta;filterSize=6;G=zeros(filterSize);for i=(0:filterSize-1)/filterSize for j=(0:filterSize-1)/filterSize xprime=j*cos(phi); yprime=i*sin(phi);

matlab練習程式(線性分類器)

clear all;close all;clc;num=4; %元素數量k=180; %迭代次數step=0.1; %迭代步長w(1,:)=[-0.5 1 1]; %權值x=[1 0 0; %輸入的值,每行為一組 1 1 0; 1 0 1; 1 1 1];d=[1 0 1 0]; %實際輸出的值y=zeros(1,num); %迭代輸出的值 y=w0+w1x1+w2x2e=zeros(1

matlab練習程式(線性分類器)。。。待改進

clear all;close all;clc;step=0.1; %迭代步長num=15; %資料個數k=100; %迭代次數set=[ 0.4 0.05 1; - 0.2 0.75 1; 0.5 0.1 1; - 0.1 0.7 1; 0.3 0.2 1; - 0.15 0.9 1; 0 0.8 1;

matlab練習程式(PCA)

clear all;close all;clc;img1=imread('Corner.png');img2=imread('Corner1.png');img3=imread('Corner2.png');img1=imresize(img1,[35 90]); %Matlab的svd不支援太大的資料,我把資料變小了.img2=imresize(img2,[35 90]);img3=imresize(img3,[35 90]);[height

matlab練習程式(Top-Hat操作)

clear all;close all;clc;img=imread('lena.jpg');img=im2bw(img,graythresh(img));imshow(img)[height width]=size(img);img_re=zeros(height,width);temp=[];for i=2:height-1 %腐蝕 for j=2:width-1 temp=img(i-1:i+1,j-1:j+1); img_

matlab練習程式(常態分佈貝葉斯分類)

clear all;close all;clc;randn('seed',0);mu1=[0 0];S1=[0.3 0;0 0.35];cls1_data=mvnrnd(mu1,S1,1000);plot(cls1_data(:,1),cls1_data(:,2),'+');hold on;mu2=[4 0];S2=[1.2 0;0 1.85];cls2_data=mvnrnd(mu2,S2,1000);plot(cls2_data(:,1),cls2_data(:,2),'r+');axis(

matlab練習程式(光流法)

 HSoptflow.mfunction [us,vs] = HSoptflow(Xrgb,n)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Author: Gregory Power gregory.power@wpafb.af.mil% This MATLAB code shows a Motion Estimation map created by% using a Horn and Schunck

Boost練習程式(program_options)

#include <iostream>#include <string>#include <boost/program_options.hpp>int main(int argc,char **argv){ namespace po = boost::program_options; po::option_description desc("allowed options"); desc.add_options()

STL練習程式(set…)

#include <iostream>#include <string>#include <set>using namespace std;int main(){ string name[]={"tian","dsp","su","chu"}; set<string> setname; for (int i=0;i<4;i++) setname.insert(name[i]);

初始化二維指標

#include <iostream>using namespace std;int main(){ double **a; a=new double *[3]; //初始一個三行二列的矩陣 for (int i=0;i<3;i++) { a[i]=new double[2]; } a[0][0]=1; a[0][1]=2; a[1][0]=4; a[1][1]=5;

總頁數: 61357 1 .... 9036 9037 9038 9039 9040 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.