【影象檢測】基於matlab GUI比值+歸一化+相關係數遙感影象【含Matlab原始碼 737期】
一、簡介
遙感影象模型和特徵\
\
1 遙感影象模型\
瞭解畫素值的含義\
遙感影象模型考慮的是遙感影象中畫素值的 物理意義\
對地觀測的遙感分為三部分:大氣遙感、水色遙感、陸地遙感\
遙感影象中畫素值的物理意義:電磁波能量分佈的一種表達\
\
1.1 陸地遙感的影象模型\
\
在可見光遙感中,遙感影象中的能量和地物目標的反射率是成正比的\
入射能量I是太陽輻射,這個基本上可以看成是常數\
夜晚中,右側為0,L=左項 ,左側可以通過紅外的方式來獲取,獲取的是目標發射的能量(溫度)\
\
在陸地遙感中,將水體當成一種資源、土地利用的型別,不考慮水體內部的差異,把水體當成一個整體來考慮。
1.1.2 水色遙感影象模型\
水色遙感:考慮的是水體內部的物質組成的遙感的推斷或者是遙感的繁衍\
\
首先看到的是表面的波,水下不是很清楚\
\
能量來自於太陽輻射\
感測器接收的能量有三種:大氣中顆粒物等散射過來的光,經過水體表面反射過來的光,穿過水體離開水體反射過來的光\
\
感測器接收的能量=水面的離水輻亮度+水面反射+大氣散射\
離水輻亮度=f(離水輻射)=水底發射+水中散射\
\
對地物的觀測時垂直觀測,水色的觀測時有一定角度的,因為需要避開水面的耀斑。\
光學活性物質:對光學本身(入射的電磁波)具有反映的物質。\
(如 懸浮顆粒物、浮游植物等)
陸地遙感與水色遙感的差異\
\
1.3 大氣遙感影象模型\
\
如果大氣足夠的厚,地面能量為0.用大氣遙感來推測大氣中的物質成分或者濃度。\
\
在做遙感研究的時候,首先要明確我們的遙感觀測物件是什麼,確定我們的遙感影象模型,確定合適的校正、處理和資訊提取方法。遙感影象模型是所有工作的核心。
2 影象統計\
影象統計的結果我們稱為統計特徵\
\
遙感影象本身是沒有顏色的,所有的顏色都是合成的結果。\
\
影象本身是由多波段所構成的。\
2.1 基本的統計特徵\
基本統計量\
\
變差=max-min
2.2 直方圖\
\
\
直方圖的簡單應用: 判斷對比度\
\
灰度級越大,越亮
2.3 多波段統計特徵\
\
協方差和相關係數\
\
二、原始碼
```c function varargout = ImgChangeDetect(varargin) % IMGCHANGEDETECT MATLAB code for ImgChangeDetect.fig % IMGCHANGEDETECT, by itself, creates a new IMGCHANGEDETECT or raises the existing % singleton. % % H = IMGCHANGEDETECT returns the handle to a new IMGCHANGEDETECT or the handle to % the existing singleton. % % IMGCHANGEDETECT('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in IMGCHANGEDETECT.M with the given input arguments. % % IMGCHANGEDETECT('Property','Value',...) creates a new IMGCHANGEDETECT or raises the % existing singleton. Starting from the left, property value pairs are % applied to the GUI before ImgChangeDetect_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to ImgChangeDetect_OpeningFcn via varargin. % % See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help ImgChangeDetect
% Last Modified by GUIDE v2.5 03-Dec-2014 19:30:18
% Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @ImgChangeDetect_OpeningFcn, ... 'gui_OutputFcn', @ImgChangeDetect_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end
if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT
% --- Executes just before ImgChangeDetect is made visible. function ImgChangeDetect_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to ImgChangeDetect (see VARARGIN)
% Choose default command line output for ImgChangeDetect handles.output = hObject;
% Update handles structure guidata(hObject, handles);
% UIWAIT makes ImgChangeDetect wait for user response (see UIRESUME) % uiwait(handles.figure_main);
% --- Outputs from this function are returned to the command line. function varargout = ImgChangeDetect_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure varargout{1} = handles.output;
% --- Executes on button press in pushbutton_open1. function pushbutton_open1_Callback(hObject, eventdata, handles) %影象檔案的開啟 [fname, pname] = uigetfile({ '.bmp';'.tif';'*.jpg'}, '選擇圖片'); if isequal(fname,0)||isequal(pname,0) return; else srcFile = [pname fname]; img1 = imread(srcFile); axes(handles.axes_src1); imshow(img1); title('變化前影象'); % 儲存影象1 handles.img_src1 = img1; guidata(hObject,handles); end
% --- Executes on button press in pushbutton_open2. function pushbutton_open2_Callback(hObject, eventdata, handles) %影象檔案的開啟 [fname, pname] = uigetfile({ '.bmp';'.tif';'*.jpg'}, '選擇圖片'); if isequal(fname,0)||isequal(pname,0) return; else srcFile = [pname fname]; img2 = imread(srcFile); axes(handles.axes_src2); imshow(img2); title('變化後圖像'); % 儲存影象2 handles.img_src2 = img2; guidata(hObject,handles); end
% --- Executes on button press in pushbutton_save. function pushbutton_save_Callback(hObject, eventdata, handles) % 儲存結果影象 [fname, pname] = uiputfile({'.bmp';'.tif';'*.jpg' }, '儲存圖片為'); if isequal(fname,0)||isequal(pname,0) return; else fpath = fullfile(pname,fname);% 獲取全路徑 end img_res = handles.img_res; imwrite(img_res,fpath);
% --- Executes on button press in pushbutton_exit. function pushbutton_exit_Callback(hObject, eventdata, handles) % 程式退出 close(handles.figure_main);
function edit_nChange_Callback(hObject, eventdata, handles) % hObject handle to edit_nChange (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit_nChange as text % str2double(get(hObject,'String')) returns contents of edit_nChange as a double
% --- Executes during object creation, after setting all properties. function edit_nChange_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_nChange (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end
function edit_pChange_Callback(hObject, eventdata, handles) % hObject handle to edit_pChange (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit_pChange as text % str2double(get(hObject,'String')) returns contents of edit_pChange as a double
% --- Executes during object creation, after setting all properties. function edit_pChange_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_pChange (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end ```
三、執行結果
\
四、備註
版本:2014a
- 【路徑規劃】基於matlab GUI改進的DWA演算法機器人靜態避障路徑規劃【含Matlab原始碼 678期】
- 【目標檢測】基於matlab GUI差分法運動目標檢測【含Matlab原始碼 1284期】
- 【交通預測】基於matlab GUI交通預測四階段法交通分配【含Matlab原始碼 1140期】
- 【路徑規劃】基於matalb遺傳演算法機器人柵格地圖路徑規劃【含Matlab原始碼 022期】
- 【路徑規劃】基於matlab改進的人工勢場演算法機器人避障路徑規劃【含Matlab原始碼 1151期】
- 【飛行器】基於matlab多源資訊融合演算法多旋翼無人機組合導航系統【含Matlab原始碼 1267期】
- 【無人機】基於matlab無人機追蹤軌跡【含Matlab原始碼 1152期】
- 【影象加密】基於matlab混沌演算法影象加密解密【含Matlab原始碼 1218期】
- 【影象檢測】基於matlab GUI比值 歸一化 相關係數遙感影象【含Matlab原始碼 737期】
- 【影象加密】基於matlab混沌系統圖像加密【含Matlab原始碼 1190期】
- 【影象分類】基於matlab極限學習分類器對遙感影象分類【含Matlab原始碼 150期】
- 【影象增強】基於matlab GUI暗通道影象去霧【含Matlab原始碼 740期】
- 【優化求解】基於matlab差分進化演算法求解函式極值問題【含Matlab原始碼 1199期】
- 【身份證識別】基於matlab GUI身份證號碼識別【含Matlab原始碼 014期】
- 【三維路徑規劃】基於matlab RRT演算法無人機路徑規劃【含Matlab原始碼 155期】
- 【優化求解】基於matlab GUI模擬退火演算法求解全域性最大值最小值問題【含Matlab原始碼 1242期】
- 【優化充電】基於matlab蒙特卡洛演算法求解電動汽車充電優化問題【含Matlab原始碼 1164期】
- 【定位問題】基於matlab GUI SLAM模擬地圖構建和定位【含Matlab原始碼 1120期】
- 【水果識別分類】基於matlab形態學水果識別分類【含Matlab原始碼 1132期】
- 【數學建模】基於matlab UKF腳踏車狀態估計【含Matlab原始碼 1111期】