当前位置:网站首页>[image detection] SAR image change detection based on depth difference and pcanet with matlab code

[image detection] SAR image change detection based on depth difference and pcanet with matlab code

2022-06-12 06:49:00 Matlab scientific research studio

1 brief introduction

DPPCANet It is a robust deep learning method , It is used to detect the change of unbalanced multi temporal SAR image , It mainly includes 1) Generate variance chart ;2) parallel FCM clustering , Provide training sample pseudo tags ;3) Based on sampling PCANet+SVM Models are constructed to classify oversampling and undersampling pixels .

2 Part of the code

% notice:% The training samples are randomly generated, so the results are slightly different% clear;% clc;% close all;addpath('./utils');addpath('./liblinear');pool_size = 3;w = 7;b = 0.16;T_num = 11;% Import Dataim1   = imread('./pic/B1.tif');im2   = imread('./pic/B2.tif');im_gt = imread('./pic/BGT.tif');im1   = double(im1(:,:,1));  im2   = double(im2(:,:,1)); im_gt = double(im_gt(:,:,1));% Compute the deep difference imagefprintf('... ... compute the deep difference image ... ...\n');im1 = WP(im1,pool_size);im2 = WP(im2,pool_size);DI_or = di_gen(im1,im2);                      % Calculate log-ratio imageDDI = Normalized(CWP(DI_or,T_num));           % Calculate deep different image[DDIMAP1,DDIMAP2]=DDIMAP(DI_or,T_num,w,b);    % Computing mapped DDI% Gabor feature extractionfprintf('... ... Gabor feature extraction... ...\n');[f1_all,fea_1] = Gabor_fea(DDIMAP1);[f2_all,fea_2] = Gabor_fea(DDIMAP2);%Parallel FCM clusteringfprintf('... ... parallelclustering begin ... ...\n');im_lab = parallelclustering(fea_1,DDIMAP1,fea_2,DDIMAP2);% Clustering results are saved in im_lab% Changed pixels as 1% Unchanged pixels is marked as 0% Classification modelPatSize = 5;  % PatSize must be oddim_lab = 1-im_lab;% PCANet PCANet_SVM_train;PCANet_SVM_test;[Ylen, Xlen] = size(im_gt);% DenoisingPreRes = reshape(PreRes, Ylen, Xlen);[lab_pre,num] = bwlabel(~PreRes);for i = 1:num    idx = find(lab_pre==i);    if numel(idx) <= 20        lab_pre(idx)=0;    endend%Save resultslab_pre = lab_pre>0;res = uint8(lab_pre)*255;pic = res;[TP,TN,FP,FN,MC,MU,FPR,FNR,OER,PCC,Kappa] = PE(res,im_gt);list = [TP,TN,FP,FN,MC,MU,FPR,FNR,OER,PCC,Kappa];imwrite(pic, 'changemap.png');save('result.mat','list');figureim1   = imread('./pic/B1.tif');im2   = imread('./pic/B2.tif');subplot(131);imshow(im1);title(' chart 1')subplot(132);imshow(im2);title(' chart 2')subplot(133);imshow(pic);title(' Detection diagram ')

3 Simulation results

4 reference

About bloggers : Good at intelligent optimization algorithms 、 Neural networks predict 、 signal processing 、 Cellular automata 、 The image processing 、 Path planning 、 UAV and other fields Matlab Simulation , relevant matlab Code problems can be exchanged by private letter .

Some theories cite network literature , If there is infringement, contact the blogger to delete .

原网站

版权声明
本文为[Matlab scientific research studio]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120641164886.html