91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

大型飛機(jī)航拍圖處理matlab代碼

資源截圖

代碼片段和文件信息

%?生成rio.lan的LanAdapter對(duì)象
input_adapter?=?LanAdapter(‘rio.lan‘);

%?選擇、綠和藍(lán)光譜
input_adapter.SelectedBands?=?[3?2?1];

%生成一個(gè)分塊函數(shù)來返回未改動(dòng)的分塊數(shù)據(jù)
identityFcn?=?@(block_struct)?block_struct.data;

%?生成剛開始的真彩圖像
truecolor?=?blockproc(input_adapter[100?100]identityFcn);

%?顯示未改動(dòng)的圖像
figure;
imshow(truecolor);
title(‘Truecolor?Composite?(Un-enhanced)‘);


adjustFcn?=?@(block_struct)?imadjust(block_struct.data...
????stretchlim(block_struct.data));
truecolor_enhanced?=?blockproc(input_adapter[100?100]adjustFcn);
figure
imshow(truecolor_enhanced)
title(‘Truecolor?Composite?with?Blockwise?Contrast?Stretch‘)

%?HistogramAccumulator?Accumulate?incremental?histogram.
%???HistogramAccumulator?is?a?class?that?incrementally?builds?up?a
%???histogram?for?an?image.??This?class?is?appropriate?for?use?with?8-bit
%???or?16-bit?integer?images?and?is?for?educational?purposes?ONLY.

%???Copyright?2009?The?MathWorks?Inc.
%???$Revision:?1.1.6.1?$??$Date:?2009/11/09?16:24:41?$

classdef?HistogramAccumulator????
????properties
????????Histogram
????????Range
????end
????
????methods
????????
????????function?obj?=?HistogramAccumulator()
????????????obj.Range?=?[];
????????????obj.Histogram?=?[];
????????end
????????
????????function?addToHistogram(objnew_data)
????????????if?isempty(obj.Histogram)
????????????????obj.Range?=?double(0:intmax(class(new_data)));
????????????????obj.Histogram?=?hist(double(new_data(:))obj.Range);
????????????else
????????????????new_hist?=?hist(double(new_data(:))obj.Range);
????????????????obj.Histogram?=?obj.Histogram?+?new_hist;
????????????end
????????end
????end
end

%?生成HistogramAccumulator類
hist_obj?=?HistogramAccumulator();

%?將樣本圖像分割為兩半
full_image?=?imread(‘liftingbody.png‘);
top_half?=?full_image(1:256:);
bottom_half?=?full_image(257:end:);

%?計(jì)算直方圖增量
hist_obj.addToHistogram(top_half);
hist_obj.addToHistogram(bottom_half);
computed_histogram?=?hist_obj.Histogram;

%?與函數(shù)IMHIST計(jì)算的結(jié)果進(jìn)行對(duì)比
normal_histogram?=?imhist(full_image);

%?檢查結(jié)果
figure
subplot(121);
stem(computed_histogram‘Marker‘‘none‘);
title(‘Incrementally?Computed?Histogram‘);
subplot(122);
stem(normal_histogram‘‘Marker‘‘none‘);
title(‘IMHIST?Histogram‘);


%?生成HistogramAccumulator類
hist_obj?=?HistogramAccumulator();

%?設(shè)置blockproc函數(shù)句柄
addToHistFcn?=?@(block_struct)?hist_obj.addToHistogram(block_struct.data);

%?計(jì)算histogram的紅色譜??
%?注意到addToHistFcn函數(shù)句柄沒有生成輸出,?
%?這是因?yàn)閭鬟f給blockproc的句柄沒有返回
input_adapter.SelectedBands?=?3;
blockproc(input_adapter[100?100]addToHistFcn);
red_hist?=?hist_obj.Histogram;

%?顯示結(jié)果
figure
stem(red_hist‘Marker‘‘none‘);
title(‘Histogram?of?Red?Band?(Band?3)‘);

%計(jì)算綠色光譜直方圖
hist_obj?=?HistogramAccumulator();
addToHistFcn?=?@(block_struct)?hist_obj.addToHistogram(block_struct.data);
input_adapter.SelectedBands?=?2;
blockproc(input_adapter[100?100]addToHistFcn);
green_hist?=?hist_obj.Histogram;

%?計(jì)算藍(lán)色光譜直方圖
hist_obj?=?HistogramAcc

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????4420??2013-06-02?23:52??大型飛機(jī)航拍圖處理matlab代碼\feijihangpai.m
?????目錄???????????0??2017-03-26?21:55??大型飛機(jī)航拍圖處理matlab代碼\

評(píng)論

共有 條評(píng)論

相關(guān)資源