资源简介
目标检测matlab代码,我下载的,希望下载这个的支持Matlab中文论坛。谢谢!

代码片段和文件信息
% Target Recongition
% This program detects a target in a given image and focuses on it
% Programmed By: Mina Ayman Makar
% On 2/2/2004
% Part(1) : Entering the image for MATLAB
fprintf(‘\n This program detects a target in an image‘)
fprintf(‘\n Entering the image for MATLAB...‘)
fprintf(‘\n Save the image or its copy in MATLAB working Directory‘)
imagname = input(‘\n Enter the name of the image file (filename.ext) : ‘‘s‘);
w = imread(imagname);
w = im2double(w);
sizw = size(w);
figure
imshow(w)
title(‘Input Image‘)
pause(3.5);
close;
fprintf(‘\n Entering the target image for MATLAB...‘)
fprintf(‘\n Save the target image or its copy in MATLAB working Directory‘)
tarname = input(‘\n Enter the name of the target image file (filename.ext) : ‘‘s‘);
t = imread(tarname);
t = im2double(t);
sizt = size(t);
figure
imshow(t)
title(‘Target Image‘)
pause(3.5);
close;
ww = rgb2gray(w);
tt = rgb2gray(t);
tedge = edge(tt);
wedge = edge(ww);
out = filter2(tedgewedge);
o = max(max(out));
output = (1/o)*out;
pixel = find(output == 1);
pcolumn = fix(pixel / sizw(1));
prow = mod(pixelsizw(1));
rdis = fix(sizt(1)/2);
cdis = fix(sizt(2)/2);
cmin = pcolumn - cdis;
cmax = pcolumn + cdis;
rmin = prow - rdis;
rmax = prow + rdis;
c = [cmin cmin cmax cmax];
r = [rmin rmax rmax rmin];
m = roipoly(wwcr);
m = im2double(m);
m = 0.5 * (m + 1);
mask(::1) = m;
mask(::2) = m;
mask(::3) = m;
final = mask .* w;
figure
imshow(final)
title(‘Result Image‘)
pause(3.5);
close;
subplot(121)
imshow(w)
title(‘Input Image‘)
subplot(122)
imshow(final)
title(‘Result Image‘)
sav = input(‘\n Do you like to SAVE Result Image? (y/n) : ‘‘s‘);
if (sav == ‘y‘)
fprintf(‘\n You choose to SAVE the Result Image‘)
naming = input(‘\n Type the name of the new image file (filename.ext) : ‘‘s‘);
fprintf(‘\n Saving ...‘)
imwrite(finalnaming);
fprintf(‘\n The new file is called %s and it is saved in MATLAB working Directory‘naming)
else
fprintf(‘\n You choose NOT to SAVE the Result Image‘)
end
clear
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 2093 2006-10-16 20:01 target.m
----------- --------- ---------- ----- ----
2093 1
相关资源
- ROC曲线 matlab实现
- matlab2019运动目标检测--数字图像处理
- 检索视频中运动的点并计算线速度角
- 目标检测的DPM模型在windows下的实现
- 基于adaboost算法的目标检测MATLAB代码
- 基于matlab的运动目标检测源代码
- 人脸目标检测的matlab实现论文
- 基于帧差法的运动目标检测程序matl
- 运动目标检测的混合高斯背景建模m
- DPM算法实现:voc-release5(Win7+matlab20
- 运动目标检测算法Matlab
- 梯形调制调频连续波目标解算流程
- matlab实现运动目标检测与最小外接矩
- MATLAB运动视频检测
- VOC2007目标检测ground truth制作
- MATLAB运动目标检测代码
- FasterRcnn2.m
- 用matlab读取视频文件中的图像,并对
- FCM目标检测代码
- 基于MATLAB的行人检测代码
- 基于MATLAB的vibe算法的运动目标检测代
- 自动驾驶多目标检测.7z
- GMM代码用于目标检测
- 运动目标检测的背景建模
- 基于MATLAB运动目标检测追踪
- 运动目标检测光流法
- 代码MATLAB基于形态学的目标检测一
- 视频移动目标检测
- 移动目标检测MATLAB版
- 基于帧差法的运动目标检测的matlab代
评论
共有 条评论