简体   繁体   English

使用网络摄像头进行对象检测的MATLAB代码?

[英]MATLAB code for object detection using a webcam?

I am using an Arduino to control a car and I want to make it autonomous by using a webcam to see the object I want and make the car move to this location. 我正在使用Arduino来控制汽车,并且想通过使用网络摄像头来查看我想要的对象并使汽车移动到该位置来使其自动化。 I need several things: 我需要几件事:

  1. MATLAB code MATLAB代码

  2. Interface between MATLAB and Arduino MATLAB与Arduino之间的接口

  3. How do I connect between them (software, not hardware) 我如何在它们之间进行连接(软件,而不是硬件)

I need any tutorial to learn or any instructions to make my project. 我需要任何教程来学习或做任何指示来制作我的项目。 I see many people have done this before, but unfortunately they did not mention how to start these kind of projects. 我看到很多人以前都这样做过,但是不幸的是他们没有提到如何启动这类项目。

This question is fairly broad, so I apologize in advance for my somewhat general response. 这个问题涉及面很广,因此我对我的一般回答表示歉意。

The easiest way to interface a webcam with MATLAB is to make use of the Image Acquisition Toolbox. 将网络摄像头与MATLAB交互的最简单方法是使用“图像采集工具箱”。 This link provides documentation detailing how to do this. 链接提供了详细说明如何执行此操作的文档。

There is a good chance that you'll also want to make use of the Image Processing toolbox in MATLAB to be able to process the acquired images to determine where to go. 您很有可能还希望利用MATLAB中的“图像处理”工具箱来处理获取的图像以确定去向。 See this doc . 请参阅此文档 Though, after you've determined more specifically how you plan to process these images, there are probably numerous algorithms that you could find online that would not explicitly require this toolbox. 但是,在更具体地确定了计划处理这些图像的方式之后,可能有很多算法可以在网上找到,而这些算法显然不需要此工具箱。

As far as interfacing with Arduino is concerned, there is a support package from the MathWorks that allows you to interface MATLAB code and Simulink models with Arduino. 至于与Arduino的接口,MathWorks提供了一个支持包,允许您将MATLAB代码和Simulink模型与Arduino接口。 See this link 看到这个链接

The only other general suggestion that I have is to consider using Simulink for this project rather than MATLAB. 我仅有的其他一般建议是考虑针对此项目而不是MATLAB使用Simulink I feel that the model based approach of Simulink is a much better fit when designing control systems. 我觉得在设计控制系统时,Simulink的基于模型的方法更为合适。

I hope that this helps you get things started. 我希望这可以帮助您入门。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM