【目标检测】基于LCM算法实现红外小目标检测matlab源码

1 模型

Robust small target detection of low signal-to-noise ratio (SNR) is very important in infrared search and track applications for self-defense or attacks. Consequently, an effective small target detection algorithm inspired by the contrast mechanism of human vision system and derived kernel model is presented in this paper. At the first stage, the local contrast map of the input image is obtained using the proposed local contrast measure which measures the dissimilarity between the current location and its neighborhoods. In this way, target signal enhancement and background clutter suppression are achieved simultaneously. At the second stage, an adaptive threshold is adopted to segment the target. The experiments on two sequences have validated the detection capability of the proposed target detection method. Experimental evaluation results show that our method is simple and effective with respect to detection accuracy. In particular, the proposed method can improve the SNR of the image significantly.

2 部分代码

clear all;
close all;
clc;
% cd 'D:\Small target detection\code\code3\MS_LCM-master'; % 改路径后即可直接运行!!!

% 读取测试图像
I_read = imread('test.bmp');

% 检测RGB,转为灰度图
Channel_test = size(size(I_read));
if Channel_test(1,2) == 2
   I_in = I_read;
else
   I_in = rgb2gray(I_read); 
end
% 显示输入图像,转为double型
% imshow(I_in);   % imtool(I_in);
I_in = double(I_in);

% 计算最终的Multiscale LCM,注意这张图小于原始图像,最大的patch为27*27,因此比原始图像小26
[C_hat,max_margin] = MLCM_computation(I_in);
% 计算均值、标准差
mean_C_hat = mean(C_hat(:));   % 矩阵均值
sqrt_C_hat = (sqrt_matrix(C_hat,mean_C_hat))^0.5; % 标准差
% 计算阈值
k_Th = 4;
threshold = mean_C_hat + k_Th*sqrt_C_hat;
% 根据阈值判断,输出二值探测结果和统计小目标在mask中占据的像元数
[I_out,target_pixel_num] = target_detection(C_hat,threshold,max_margin,I_in);

% 显示输入和输出
figure()
subplot(1,2,1); imshow(I_in,[0,255]),impixelinfo; title('原图');
subplot(1,2,2); imshow(I_out),impixelinfo; title('二值化输出');

3 仿真结果

4 参考文献

[1] Chen, C. ,  Li, H. ,  Wei, Y. ,  Xia, T. , &  Tang, Y. Y. . (2013). A local contrast method for small infrared target detection. IEEE Transactions on Geoscience & Remote Sensing, 52(1), 574-581.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Matlab科研辅导帮

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值