导航:首页 > 车辆百科 > matlab车辆检测

matlab车辆检测

发布时间:2021-08-04 06:46:58

1、如何用matlab做双目视觉车距检测以及标定时遇到的问题

: 工具箱里的函数可以直接调用的。只要确定安装好了工具箱,一般添加路径后即可直接使用了。 添加路径用addpath

2、matlab判断车位有没有车

bk_1和fr_1这两个灰度图尺寸不一样。请先裁剪成一样尺寸的。

3、matlab车辆识别程序

确定物体个数和中心的话,利用颜色值进行连通性分析,应该能确定一块相同颜色的区域,找到这块区域就能确定质心点了。要是还要判断形状还得先提取出每个形状的特征。
1.识别静态的整个人体较难;即使识别出来结果也不可靠,所以现在主要以手势/人脸识别为主;这是因为手和脸上面有比较独特的特征点。你说的滤波归根结底还是要找出具有灰度跳变的高频部分作为人体;这除非背景中除了人以外没有其他突出的物体;否则光凭滤波二值法检测人体是不太现实。
2 两张图片中人要是产生相对运动,检测起来就容易多了;利用帧间差分找到图像中灰度相差大的部分(你用的滤波也是一种手段);然后二值化区域连通;要是图像中没有其他移动物体计算连通区域的变动方向就是人的运动方向。
先建立起静态背景的模型(或者直接在没人的时候拍张);然后不断的与这个背景做差,原理和帧间差分一样。建议你先从典型的帧间差分例程开始下手(比如移动车辆的检测,这个比较多)。
在二值化之后加上一个区域连通的步骤;即使用膨胀或者闭运算;这样轮廓就是连续的了;用matlab的话bwlabel可以统计连通区域里面像素的个数也就是人体面积大小。质心就是横竖坐标的平均值;取所有人体点的横竖坐标分别累加;除以坐标总数得到的x和y平均值;这个就是质心了。

4、matlab车流统计,急啊,麻烦大家

mov=aviread('xxxxxxxx.AVI');
temp=size(mov);
fnum=temp(2);
for i=1:fnum,
strtemp=strcat(int2str(i),'.','JPG');
imwrite(mov(i).cdata(:,:,:),strtemp);
end%% 从视频中提出每一帧图像
o=1;
e='.jpg';
for i=1:15
u=o-1;v=o-2;
m=int2str(o);
n=int2str(u);h=int2str(v);
s=strcat(m,e);%%把字符串b与m连接后在连接e得到图像文件存储的位置
m=imread(s);%%从S处把图像读取出来
m=rgb2gray(m);%%将图像M灰度化

m=medfilt2(m,[3,3]);
if(o>=3)
s=strcat(n,e);
n=imread(s);
n=rgb2gray(n);
s=strcat(h,e);
h=imread(s);
h=rgb2gray(h);

n=medfilt2(n,[3,3]);
h=medfilt2(h,[3,3]);

q=im2double(m);%%将图像数组转换为double型
w=im2double(n); g=im2double(h);
c=q-w;j=w-g;

th=10/255;

k=find(abs(c)>=th);
c(k)=1;
k=find(abs(c)<th);
c(k)=0;
c=bwareaopen(c,15);

se90=strel ('line',3,90);se0=strel ('line',3,0);

c=bwmorph(c,'close'); %对上述图像进行形态学闭运算
c=imdilate(c,[se90,se0]);c=bwmorph(c,'close');
c=bwareaopen(c,50);

k=find(abs(j)>=th);
j(k)=1;
k=find(abs(j)<th);
j(k)=0;
j=bwareaopen(j,15);

j=bwmorph(j,'close'); %对上述图像进行形态学闭运算
j=imdilate(j,[se90,se0]);j=bwmorph(j,'close');
c=bwareaopen(c,50);

c=c&j;c=imerode(c,[se90,se0]);
figure,imshow(c);
a=c;b=c; d=c;f=c;
[m,n]=size(c);
%%行扫描填充
for i=1:m
for j=1:n-1
if a(i,j)>0
a(i,j+1)=1;
end
end
end

for i=1:m
for j=n:-1:2
if b(i,j)>0
b(i,j-1)=1;
end
end
end
th=a&b;
%%列扫描填充
for i=1:n
for j=1:m-1
if d(j,i)>0
d(j+1,i)=1;
end
end
end

for i=1:n
for j=m:-1:2
if f(j,i)>0
f(j-1,i)=1;
end
end
end
td=d&f;

c=th&td;
end
o=o+1;
end

5、求基于卡尔曼滤波的车辆检测 matlab代码!!!

留下你的联系方式

6、MATLAB编写交通标志检测与识别的源程序

获取server安装的各种组件的powershell命令,可以在server上正常命令行执行
powershell -command "& {get-windowsfeature | Out-File -FilePath C:\Command.txt}"

但我用C语言写出来的exe去跑的时候总是不能正常执行,因为server环境里面没有debug环境,所以也不知道具体错在什么地方了,具体source如下:

C/C++ code?

TCHAR szCommandLine[1024] = {0};
sprintf(szCommandLine,
"powershell -command \"& {get-windowsfeature | Out-File -FilePath C:\\Command.txt}\"");

bSuccess = CreateProcess( NULL, // No mole name (use command line).
szCommandLine, // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ); // Pointer to PROCESS_INFORMATION structure.

7、谁有MATLAB的交通标志检测与识别的程序

用matlab的,出自寡人之手,参看原帖 没法发链接 网络搜索 标题 交通标志识别系统 标准完全模板 HSV定位基础版

8、请问你有交通标志检测与识别的MATLAB源程序么

我有一条获取server安装的各种组件的powershell命令,可以在server上正常命令行执行
powershell -command "& {get-windowsfeature | Out-File -FilePath C:\Command.txt}"

但我用C语言写出来的exe去跑的时候总是不能正常执行,因为server环境里面没有debug环境,所以也不知道具体错在什么地方了,具体source如下:

C/C++ code?

TCHAR szCommandLine[1024] = {0};
sprintf(szCommandLine,
"powershell -command \"& {get-windowsfeature | Out-File -FilePath C:\\Command.txt}\"");

bSuccess = CreateProcess( NULL, // No mole name (use command line).
szCommandLine, // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ); // Pointer to PROCESS_INFORMATION structure.

9、matlab怎样运动目标的检测

function vu = get_mask()//定义函数VU
bg = imread('tu\\131.jpg');//读入图片131.jpg
bg = rgb2gray(bg);//将图片转换为灰度图像
bg = im2bw(bg, graythresh(bg));//再转换为二值图,阈值是对灰度图像用最大类间方差法得到的

Img = imread('tu\\1.jpg');//读入图片1.JPG
I = rgb2gray(Img);//转换为灰度图
I = im2bw(I, graythresh(I));//转换为二值图
bw = I;//
L = bwlabel(I);//从黑背景甄别白块,返回和I相同大小的图像L
stats = regionprops(L, 'Area');//统计被标记白块的区域的总面积
Ar = cat(1, stats.Area);//按列连接矩阵
[mr, ind] = max(Ar);//找到Ar中那些最大值的索引位置,将他们放在向量ind中
I(L~=ind) = 0;//I中L与ind不相等的位置赋值为零
vu = imfill(I, 'holes');//将原图填充孔洞

10、运动目标检测matlab程序

function cat_mouse

clear

clc

mov=avifile('cat_mouse.avi');

ts=0:0.005:0.5;

x0=[0,0];

[t,x]=ode45(@cat_m,ts,x0);

n=length(x);

figure(1)

plot(0,0,'.')

hold on

h1=line( 'Color' ,[0 0 1], 'Marker' , '.' , 'MarkerSize' ,40, 'EraseMode' , 'xor' );

h2=line(15,0,'MarkerFaceColor',[0 1 0],'Marker','h', 'MarkerSize' ,15, 'EraseMode' , 'xor');

plot(15,0,'.')

line([15 15],[0 11],'LineWidth',2)

axis equal

axis([0 16 0 11])

title('猫追耗子动画演示')

for i=1:n-1

plot(x([i i+1],1),x([i i+1],2))

set(h1, 'xdata' ,x(i+1,1), 'ydata' ,x(i+1,2));

set(h2, 'xdata' ,15, 'ydata' ,20*t(i+1));

drawnow; % 刷新屏幕

pause(0.005)

f=getframe(gcf);

mov=addframe(mov,f);

end

hold off

mov=close(mov);

后面是子程序
function dx=cat_m(t,x)

a=20;b=40;c=15;

s=sqrt((c-x(1))^2+(a*t-x(2))^2);

dx=[b*(c-x(1))/s;b*(a*t-x(2))/s];

上次看到一个网友做的猫捉老鼠的实现,其实就是导弹追踪问题


与matlab车辆检测相关的内容