Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Resource icon

Matlab code for detecting and following a red ball. 2013-01-25

Status
Not open for further replies.

magvitron

Active Member
magvitron submitted a new article:

matlab code for detecting and following a red ball. - the code is self explanatory
Code:
clear;
clc % Clearing Matlab desktop
vid=videoinput('winvide

[quote]the code is self explanatory 
[CODE]clear;
clc % Clearing Matlab desktop
vid=videoinput('winvideo',2,'RGB24_640X480'); % Defining the video input object
set(vid,'FramesPerTrigger',1); % Setting frames per trigger
preview(vid); %////// Showing the video of the moving Ball(TO BE USED %
% WHILE TESTING)
pause(10);% Waiting for a certain time for the system to get initialised
rgb_image = getsnapshot(vid); % Storing Image in an array variable 
[a b c]= size(rgb_image); % Determining the...
[/quote]

Read more about this article...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top