資源簡介
數字圖像處理 matlab實驗 北郵 大四 包含三次實驗報告和源代碼

代碼片段和文件信息
%使用鼠標選定圖片區域
clc
clear
img=imread(‘lena.bmp‘);??
[mnz]=size(img);
imshow(img);
k?=?waitforbuttonpress;??????????????%?等待鼠標按下
point1?=?get(gca‘CurrentPoint‘);????%?鼠標按下了
finalRect?=?rbbox;???????????????????
point2?=?get(gca‘CurrentPoint‘);????%?鼠標松開了
point1?=?point1(11:2);??????????????%?提取出兩個點
point2?=?point2(11:2);
p1?=?min(floor(point1)floor(point2));?????????????%?計算位置
p2?=?max(floor(point1)floor(point2));
fprintf(‘%g?%g?%g?%g‘p1(1)p1(2)p2(1)p2(2));
offset?=?abs(floor(point1)-floor(point2));?????????%?offset(1)表示寬,offset(2)表示高
x?=?[p1(1)?p1(1)+offset(1)?p1(1)+offset(1)?p1(1)?p1(1)];
y?=?[p1(2)?p1(2)?p1(2)+offset(2)?p1(2)+offset(2)?p1(2)];
hold?on??????????????????????????????%防止plot時閃爍
plot(xy);
for?k=1:3
for?i=p1(2):p2(2)
????for?j=p1(1):p2(1)
????????fprintf(‘%g?‘img(ijk));
????????
????end
????fprintf(‘\n‘);
end
fprintf(‘\n\n\n\n\n‘);
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-01-15?12:27??2011211151-翁劍平-2011211302-matlab實驗\
?????目錄???????????0??2015-01-15?12:27??2011211151-翁劍平-2011211302-matlab實驗\exp1\
?????文件?????????951??2015-01-13?21:06??2011211151-翁劍平-2011211302-matlab實驗\exp1\exp1_1.m
?????文件?????????266??2015-01-13?21:08??2011211151-翁劍平-2011211302-matlab實驗\exp1\exp1_2.m
?????文件?????????863??2015-01-13?21:42??2011211151-翁劍平-2011211302-matlab實驗\exp1\exp1_4.m
?????文件??????786486??2015-01-13?20:36??2011211151-翁劍平-2011211302-matlab實驗\exp1\lena.bmp
?????文件?????1686346??2015-01-13?21:43??2011211151-翁劍平-2011211302-matlab實驗\exp1\實驗一實驗報告.docx
?????目錄???????????0??2015-01-13?22:36??2011211151-翁劍平-2011211302-matlab實驗\exp2\
?????文件?????????747??2015-01-13?22:04??2011211151-翁劍平-2011211302-matlab實驗\exp2\exp2.m
?????文件??????719641??2015-01-07?15:49??2011211151-翁劍平-2011211302-matlab實驗\exp2\lena.png
?????文件?????1052962??2015-01-13?22:04??2011211151-翁劍平-2011211302-matlab實驗\exp2\實驗二實驗報告.docx
?????目錄???????????0??2015-01-15?00:30??2011211151-翁劍平-2011211302-matlab實驗\exp3\
?????文件?????????205??2015-01-07?21:52??2011211151-翁劍平-2011211302-matlab實驗\exp3\edgeDetect.m
?????文件??????719641??2015-01-07?15:49??2011211151-翁劍平-2011211302-matlab實驗\exp3\lena.png
?????文件??????176857??2015-01-13?22:35??2011211151-翁劍平-2011211302-matlab實驗\exp3\實驗三實驗報告.docx
評論
共有 條評論