简体   繁体   中英

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. I need several things:

  1. MATLAB code

  2. Interface between MATLAB and 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. 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. 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. See this link

The only other general suggestion that I have is to consider using Simulink for this project rather than MATLAB. I feel that the model based approach of Simulink is a much better fit when designing control systems.

I hope that this helps you get things started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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