上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 79 下一页
摘要: cl;img1=imread('gaosi.jpg');[m,n]=size(img1);w=fspecial('gaussian',[3 3]);img2=imresize(imfilter(img1,w),[m/2 n/2]);img3=imresize(imfilter(img2,w),[m/4 n/4]);img4=imresize(imfilter(img3,w),[m/8 n/8]);img5=imresize(imfilter(img4,w),[m/16 n/16]);imshow(img1);figure,imshow(img2);figure, 阅读全文
posted @ 2012-03-05 21:14 Dsp Tian 阅读(8498) 评论(0) 推荐(0)
摘要: #include <iostream>#include <stdlib.h>using namespace std;typedef struct tree{ int data; struct tree *left; struct tree *right; struct tree *prior;}node;void preorder_tree(node *head){ if (head==NULL) return; cout<<head->data<<""; preorder_tree(head->left); pr 阅读全文
posted @ 2012-03-05 20:15 Dsp Tian 阅读(580) 评论(0) 推荐(0)
摘要: cl;img=imread('mask.jpg');imshow(img);[x,y]=size(img);img_man=zeros(x,y);img_com=zeros(x,y);%% 直方图均衡化算法Max=max(max(img));Min=min(min(img));Hist=zeros(1,256);for i=1:x for j=1:y Hist(img(i,j)+1)=Hist(img(i,j)+1)+1; endendfigure,plot(Hist);p=zeros(1,256);for i=1:256 p(i)=Hist(i)/(x*y);... 阅读全文
posted @ 2012-03-04 15:30 Dsp Tian 阅读(11077) 评论(0) 推荐(0)
摘要: cl;img=imread('fupeng.jpg');z=3;[x y]=size(img);imshow(img);img=double(img);img_cai=zeros(x,y,z);Max=max(max(img));Min=min(min(img));img=(255/(Max-Min))*img-(255*Min)/(Max-Min);figure,imshow(uint8(img));r=1;g=2;b=3;for i=1:x for j=1:y temp=(2*pi/(Max-Min))*img(i,j)-(2*pi*Min)/(Max-Min); ... 阅读全文
posted @ 2012-03-04 14:04 Dsp Tian 阅读(7900) 评论(1) 推荐(0)
摘要: cl;img=imread('TestDatabase/1.bmp');imshow(img);img=double(img);figure,imshow(mat2gray(img))ma=double(max(max(img)));mi=double(min(min(img)));img=(255/(ma-mi))*img-(255*mi)/(ma-mi);img=uint8(img);figure,imshow(img) 阅读全文
posted @ 2012-03-04 11:58 Dsp Tian 阅读(9909) 评论(0) 推荐(0)
摘要: cl;m=31;n=31;img=zeros(m+1,n+1);img=double(img);pi=3.1415926;sigma=10;for i=-(m/2):m/2 for j=-(n/2):n/2 img(i+m/2+1,j+n/2+1)=(1/(2*pi*sigma*sigma))*exp(-(i*i+j*j)/(2*sigma*sigma)); endendimg=mat2gray(img);imshow(img);imwrite(img,'pic.bmp');%一个更好的实现,2012.12.18修改h=5;w=2;[x y]=meshgrid(-w... 阅读全文
posted @ 2012-02-26 12:53 Dsp Tian 阅读(8890) 评论(3) 推荐(1)
摘要: cl;raw=zeros(200,256,30);for i=1:30 filename=strcat('F:\算法实验\data\seq3\',int2str(i),'.bmp'); raw(:,:,i)=imread(filename);end方法二:cl;img=cell(1,30);for i=1:30 filename=strcat('F:\算法实验\data\seq3\',int2str(i),'.bmp'); img{i}=imread(filename);end 阅读全文
posted @ 2012-02-23 15:57 Dsp Tian 阅读(6193) 评论(0) 推荐(0)
摘要: #include <iostream>#include <time.h>#include <stdlib.h>using namespace std;int random(int a,int b){ srand(NULL); return rand()%(b-a)+a;}void exchange(int &a,int &b){ int temp; temp=a; a=b; b=temp;}int partition(int *a,int p,int r){ int x=a[r]; int i=p-1; for (int j=p;j<r 阅读全文
posted @ 2012-02-20 14:07 Dsp Tian 阅读(656) 评论(0) 推荐(0)
摘要: //元素只能为正整数#include <iostream>using namespace std;int Max(int *a,int length){ int temp=-1000; for (int i=0;i<length;i++) if (temp<a[i]) temp=a[i]; return temp;}void counting_sort(int *a,int *b,int k,int length){ int *c; c=(int*)malloc(sizeof(int)*(k+1)); for (int i... 阅读全文
posted @ 2012-02-19 14:03 Dsp Tian 阅读(459) 评论(0) 推荐(0)
摘要: #include <iostream>#include <time.h>#include <stdlib.h>using namespace std;int random(int a,int b){ srand(NULL); return rand()%(b-a)+a;}void exchange(int &a,int &b){ int temp; temp=a; a=b; b=temp;}int partition(int *a,int p,int r){ int x=a[r]; int i=p-1; for (int j=p;j<r 阅读全文
posted @ 2012-02-18 21:31 Dsp Tian 阅读(588) 评论(0) 推荐(0)
上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 79 下一页