算法程序
1.到图片
addpath('C:\Documents and Settings\user\My Documents\My Pictures');
imshow('3.jpg')
2.将彩图片处理成灰度图片
addpath('C:\Documents and Settings\user\My Documents\My Pictures');
A=imread('3.jpg');
I=rgb2gray(A);
imshow(I)
3.改变图片大小
右键----编辑----属性-----输入想要的大小
4.两张图片相叠加(区分imadd和系数叠加)
直接把图像数据矩阵相加,可以设定叠加系数,如(系数可自由设定,按需要)
img_tot = img1 * 0.5 + img2 * 0.5; %两个图像大小要一致
图像的矩阵我再那里能到 
img1 = imread('tupian.bmp');
图片相加
addpath('C:\Documents and Settings\user\My Documents\My Pictures');
A=imread('2.jpg');
imshow(A)
>> B=imread('3.jpg');
imshow(B)
>> C=imadd(A,B);
imshow(C)
>> D=A*0.5+B*0.5;
imshow(D)
A图像
B图像
C图像如何用matlab将已知点连线
D图像
5.两张图片相减
addpath('C:\Documents and Settings\user\My Documents\My Pictures');
A=imread('2.jpg');
imshow(A)
>> B=imread('3.jpg');
imshow(B)
K=A-B;
imshow(K)
各种运算一次可以按照下面的方式用MATLAB呈现
6.噪声
图像增强
直方均衡,平滑,锐化A=imread('18.jpg');
B=rgb2gray(A);
figure,subplot(2,2,1),imshow(B);
subplot(2,2,2),imhist(B);
A1=imadjust(B,[0.2 0.5],[]);
subplot(2,2,3),imshow(A1);
subplot(2,2,4),imhist(A1);
C=imnoise(B,'salt & pepper');
h1=[0.1 0.1 0.1;0.1 0.2 0.1;0.1 0.1 0.1];
h2=1/4.*[1 2 1;2 4 2;1 2 1];
C1=filter2(h1,C);
C2=filter2(h2,C);
C3=medfilt2(C);
figure,subplot(2,2,1),imshow(C);
subplot(2,2,2),imshow(C1,[]);
subplot(2,2,3),imshow(C2,[]);
subplot(2,2,4),imshow(C3);
h=[0 -1 0;-1 4 -1;0 -1 0];
D1=imfilter(B,h);
d2=fspecial('sobel');
D2=imfilter(B,d2);
D3=edge(B,'roberts',0.1);
figure,subplot(2,2,1),imshow(B);
subplot(2,2,2),imshow(D1);
subplot(2,2,3),imshow(D2,[]);
subplot(2,2,4),imshow(D3);
Sas散点图程序:
data a;
input x y;
cards;
413    359
403    343
383.5    351
381    377.5
339    376
335    383
317    362
334.5    353.5
333    342
282    325
247    301
219    316
225    270
280    292
290    335
337    328
415    335
432    371
418    374
444    394
251    277
234    271
225    265
212    290
227    300
256    301
250.5    306
243    328
246    337
314    367
315    351
326    355
327    350
328    342.5
336    339
336    334
331    335
371    330
371    333
388.5    330.5
411    327.5
419    344
411    343
394    346
342    342
342    348
325    372
315    374
342    372
345    382
348.5    380.5
351    377
348    369
370    363
371    353
354    374
363    382.5
357    387
351    382
369    388
335    395
381    381
391    375
392    366
395    361
398    362
401    359
405    360
410    355
408    350
415    351
418    347
422    354
418.5    356
405.5    364.5
405    368
409    370
417    364
420    370
424    372
438    368
438.5    373
434    376
438    385
440    392
447    392
448    381
444.5    383
441    385
440.5    381.5
445    380
444    360
;
run;
proc gplot data=a;
symbol v=star;
plot y*x;
run;
Matlab中画散点图并标号程序:
x=[413    403    383.5    381    339    335    317    334.5    333    282    247    219    225    280    290    337    415    432    418    444    251    234    225    212    227    256    250.5    243    246    314    315    326    327    328    336    336    331    371    371    388.5    411    419    411    394    342    342    325    315    342    345    348.5    351    348    370    371    354    363    357    351    369    335    381    391    392    395    398    401    405    410    408    415    418    422    418.5    405.5    405    409    417    420    424    438    438.5    434    438    440    447    448    444.5    441    440.5    445    444];