View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
IMAQMOTION - Image acquisition motion detection

4.2 | 17 ratings Rate this file 36 Downloads (last 30 days) File Size: 3.19 KB File ID: #5470 Version:
image thumbnail

IMAQMOTION - Image acquisition motion detection



12 Jul 2004 (Updated )

A live image acquisition motion detection GUI.

| Watch this File

File Information

Using the Image Acquisition and Image Processing Toolboxes, IMAQMOTION offers a MATLAB based motion detection GUI.
Using a video input object, live data is acquired and analyzed to calculate any motion between two adjacent image frames. Any motion in the image stream is plotted in a MATLAB figure window.
To create the display, simply associate a video input object with your hardware and provide it to IMAQMOTION:
   obj = videoinput('matrox', 1);


This file inspired Face Detection & Recognition System and Intruder Detection And Recording.

Required Products Image Acquisition Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (27)
12 Dec 2012 ragy atef

07 Jul 2012 Chen Mr

Wow~ So Cool~

Comment only
02 Jan 2012 GEORGE

GEORGE (view profile)

pretty good!

29 Oct 2011 Chanakya Jayasinghe

hello dear friend/Sir,
This solution is superb.
could you, please anyone figure out me where is the code segment which detect the motion in this program.
Please help me.
Thank You.

Comment only
29 Oct 2011 Chanakya Jayasinghe

hello dear friend/Sire,
This solution is superb.
could you, please anyone figure out me where is the code segment which detect the motion in this program.
Please help me.
Thank You.

29 Oct 2011 Kok Hong

im doing a project of sign language recognition. can i know izit possible to return to rgb when detect any motion?

Comment only
20 Apr 2010 Maria

Maria (view profile)

Guys!! I am doing my final year project on noice and movement detection...(i am studyinG telecommunications and IT). i am using the code below for the noice detection but it seems not to be working correctly (it always shows that target exists)
please help!!

1.At the begining i record my voice and save it to the yrecordedtarget file.Then i am making another recording (which doen't has any noice) and save it on the yrecordednoise.
The code for the above is:

y=wavrecord(5*Fs, Fs, 1);

%save yrecordednoise y Fs
save yrecordedtarget y Fs

%the histograms of the .wav files
%Normalization of the histograms

%save the variables in a file
%filename = strcat('hist_noise');
%save(filename, 'y', 'h_noise','bins')

filename = strcat('hist_target');
save(filename, 'y', 'h_target', 'bins')

load hist_target
% plot(bins,h_target)

%load hist_noise
% plot(bins,hist_noise)

2.Then i am doing the detection:

clear; clc

cd 'e:/matlab.proj'

load hist_noise
load hist_target

%recording of the the signal w
y=wavrecord(5*Fs, Fs, 1);
%training it there is target or not

while (i<=length(y))

% [h1,bins]=hist(y,length(y));
% [h2,xout]=hist(x,length(y));
% [minval2,minind2]=min(abs(y(i)-bins));
if h_target(minind)>h_noise(minind)



if counter_target>counter_noise
'target exists'

'no target'

Comment only
01 Apr 2010 Sandeep

nice speed of operation

Comment only
31 Oct 2009 stephy

stephy (view profile)

i am using matlab version 7.5 ,i got this error when i run your code, is ter anything thing i ned to type to run it?
??? Error using ==> imaqmotion at 55
IMAQMOTION is unable to run properly.
Input argument "obj" is undefined

Comment only
07 Sep 2009 susheel kumar

respected sir
i am susheel and i student of IIIT allahabad , i am studing M.Tech (IT) , my final year thesis "real time face detection and face recognition " in Matlab

so i need help i am not getting how to do
so sir please help me i need code for my thesis

so please send me code "real time face detection and face recognition" in matlab

think you sir

Comment only
11 Apr 2009 vikram

vikram (view profile)

can some one help me debug this error..

Warning: File 'log.txt' not found.
> In motion_detection>togglebutton1_Callback at 96
In gui_mainfcn at 75
In motion_detection at 42
Warning: File 'film.avi' not found.
> In motion_detection>togglebutton1_Callback at 97
In gui_mainfcn at 75
In motion_detection at 42
Warning: File 'var.mat' not found.
> In motion_detection>togglebutton1_Callback at 98
In gui_mainfcn at 75
In motion_detection at 42

radio =


??? Error using ==> videoinput.videoinput
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.

Error in ==> sad_algorithm at 17
vobj=videoinput('winvideo',2) %initializes a video object to connect to camera

Error in ==> motion_detection>togglebutton1_Callback at 101

Error in ==> gui_mainfcn at 75

Error in ==> motion_detection at 42
gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.

Comment only
24 Mar 2009 buddala

I am also doing my project in motion detection. I need some help instead of always using difference of two frames can i go for any other efficient algorithm. If any please send me to
If you have code send it also. Thank You for the help.

Comment only
29 Nov 2008 bhaskar kapoor

sir i hav a that we are tracking a motion detection and after catching the frame difference between two frames we send the capture image to the ower cell pls can u help me that hw can we find the edges in matlab and can we calculate the difference between to frames..pls sir can u help me out ..i will be very thankful..regards bhaskar

Comment only
02 Sep 2008 Roel de Jong


09 Jul 2008 UCSC Undergrad

Awesome work dude!

08 Apr 2008 ayman hwedi

28 Mar 2008 marzia marzia

09 Jan 2008 sherif El-Etriby

09 Jan 2008 sherif El-Etriby

02 Jul 2007 Asghar Ayati

03 Oct 2006 shakiba moaddab

21 Jul 2006 mesheal tanious

i saw your very Intelligent work but i have a big problem because my project is more difficult my project is to tracking atarget using a camera conected to the computer and according to the image catched and some actions (like filtering , compairing , calibrating , etc the program have to out a control signal to drive a stepper motor to follow the target
really i need you kind advice and your kind help
really i will be very happy if you reply me
in all cases you work is very good and i hope you to go ahead
many thanks

16 May 2006 magrini antonio

19 Mar 2006 jam krutosky

10 Jun 2005 INAM ULLAH

hello dear friend,
i saw ur work it was realy excellent and i hope that u can upgrade it with some more interesting changes.But there is a prblem with me that i m also working on the Project "motion detection using matlab" oohhh sorry i didnt intriduced myself i m doing computer and information system engineering in NED UET karachi Pakistan.But there is a slight diffrence in usrs and mine project that i have to detect the motion from a security camera that is connected to the computer and as it find something moving it will take the snap and will store it to the computer.In these regards i really very need ur help and i will very very thankful to u if u help me for that i need the matlab code u used in ur poject so that i get an idea of the work u did and plz send me also the brief explanation of the code if u could do so i will remember u for the whole of my life for this act thanks.

28 May 2005 aneesh nanda

sir,i hv a project regarding horizontal optical tracking of a target using u help me out.kindly let me know.i'll b grateful2u.

20 Apr 2005 yip kah weng

01 Sep 2016

Updated license

Contact us