当前位置:网站首页>【图像检测】基于深度差分和PCANet实现SAR图像变化检测附matlab代码
【图像检测】基于深度差分和PCANet实现SAR图像变化检测附matlab代码
2022-06-12 06:41:00 【Matlab科研工作室】
1 简介
DPPCANet是一种鲁棒的深度学习方法,用于不平衡多时相合成孔径雷达图像的变化检测,主要包括1)生成差异图;2)并行FCM聚类,提供训练样本伪标签;3)基于采样PCANet+SVM模型构建过采样和欠采样像素分类。
2 部分代码
% 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;% PCANetPCANet_SVM_train;PCANet_SVM_test;[Ylen, Xlen] = size(im_gt);% DenoisingPreRes = reshape(PreRes, Ylen, Xlen);[lab_pre,num] = bwlabel(~PreRes);for i = 1:numidx = find(lab_pre==i);if numel(idx) <= 20lab_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('图1')subplot(132);imshow(im2);title('图2')subplot(133);imshow(pic);title('检测图')
3 仿真结果

4 参考文献
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
- Multithreading (4) -- no lock (2) -- Atomic related atomic classes
- leetcode 35. Search insert location
- Use ms17-010 Eternal Blue vulnerability to infiltrate win7 and establish a permanent back door
- leetcode 300. Longest increasing subsequence
- 8. form label
- LeetCode-1405. Longest happy string
- An error occurred while downloading the remote file The errormessage
- How to build your own website (using the pagoda panel)
- Drawing grid navigation by opencv map reading
- Computer composition and design work05 ——fifth verson
猜你喜欢

leetcode 278. First wrong version

Codeforces Round #793 (Div. 2) A B C

Bid farewell to the charged xshell, and the free function of tabby is more powerful

leetcode.39 --- 组合总和

Drawing grid navigation by opencv map reading

Leetcode January 10 daily question 306 Additive number

leetcode:剑指 Offer 67. 把字符串转换成整数【模拟 + 分割 +讨论】

Some operations of MATLAB array

leetcode 300. Longest increasing subsequence

2 variables and basic types
随机推荐
Idea common shortcut keys
Drawing grid navigation by opencv map reading
leetcode.39 --- 组合总和
Redis application (I) -- distributed lock
GET 和 POST 的区别及留言板代码实现
Whether the modification of basic type and reference type is valid
Solution: unsatisfieddependencyexception: error creating bean with name 'authaspect':
Redis supports data structure types
Leetcode: Sword finger offer 67 Convert string to integer [simulation + segmentation + discussion]
XML special character escape
SQL 注入读写文件
Automatic modeling of Interchange
How to build your own website (using the pagoda panel)
The second day of June training - string
8. 表单标签
MySQL multiple SQL batch operations (crud) in JDBC
AI operation ch8
SQL injection - Union query
Multithreading (4) -- no lock (3) -- longadder source code
Leetcode January 13 daily question 747 At least twice the maximum number of other numbers