0% found this document useful (0 votes)
4 views

Control System Lab Report

The project focuses on abandoned object detection at train stations using video surveillance. It employs a BlobAnalysis algorithm to track stationary objects, enhancing security monitoring by alerting officers to potential threats. The report includes code for video processing, object tracking, and visualization of results.

Uploaded by

Mohona Sanyal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Control System Lab Report

The project focuses on abandoned object detection at train stations using video surveillance. It employs a BlobAnalysis algorithm to track stationary objects, enhancing security monitoring by alerting officers to potential threats. The report includes code for video processing, object tracking, and visualization of results.

Uploaded by

Mohona Sanyal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

DEPARTMENT OF ELECTRONICS AND

COMMUNICATION ENGINEERING

CONTROL SYSTEM LAB PROJECT REPORT


Group Members:
Aitijhya Sarkar (Roll No : 106)
Rishav Dutta (Roll No : 107)
Suddhasatta Biswas (Roll No : 112)
Dia Sarkar (Roll No : 103)
Mohona Sanyal (Roll No:127)
Abandoned Object Detection :
This demo tracks object at a train station and determines
which ones remain stationary. Abandoned Objects in public
areas concern authorities since they might pose a security
risk. The algorithm used in this project an be used to assist
security officers monitoring live surveillance by directing their
attention towards a potential area of interest.
In this project we are using BlobAnalysis component to
identify objects and track them.
Here are the following steps :
• Eliminate video areas that are unlikely to contain abandoned
objects
• Perform video segmentation using background subtraction.
• Track objects based on their area and centroid statistics.
• Visualise the result.

Code :
roi = [100 80 360 240];
maxNumObj = 200;
alarmCount = 45;
maxConsequtiveMiss = 4;
areaChangeFraction = 13;
centroidChangeFraction = 18;
minPersistenceRatio = 0.7;
PtsOffset = int32(repmat([roi(1), roi(2), 0, 0],[maxNumObj 1]));
hVideoSrc = vision.VideoFileReader;
hVideoSrc.Filename = 'viptrain.avi';
hVideoSrc.VideoOutputDataType = 'single';

hColorConv = vision.ColorSpaceConverter('Conversion', 'RGB to YCbCr');


hAutothreshold = vision.Autothresholder('ThresholdScaleFactor', 1.3);
hClosing = vision.MorphologicalClose('Neighborhood', strel('square',5));
hBlob =
vision.BlobAnalysis('MaximumCount',maxNumObj,'ExcludeBorderBlobs',true);
hBlob.MinimumBlobArea = 100;
hBlob.MaximumBlobArea = 2500;
pos = [10 300 roi(3)+25 roi(4)+25];

hAbandonedObjects = vision.VideoPlayer('Name','Detected
Object','Position',pos);
pos(1) = 46+roi(3);
hAllObjects = vision.VideoPlayer('Name','All Objects','Position',pos);
pos = [80+2*roi(3) 300 roi(3)-roi(1)+25 roi(4)-roi(2)+25];
hThresholdDisplay = vision.VideoPlayer('Name','Threshold','Position',pos);
firsttime = true;

while ~isDone(hVideoSrc)
Im = step(hVideoSrc);
OutIm = Im(roi(2):end, roi(1):end, :);
YCbCr = step(hColorConv, OutIm);
CbCr = complex(YCbCr(:,:,2), YCbCr(:,:,3));

if firsttime
firsttime = false;
BkgY = YCbCr(:,:,1);
BkgCbCr = CbCr;
end
SegY = step(hAutothreshold, abs(YCbCr(:,:,1)-BkgY));
SegCbCr = abs(CbCr-BkgCbCr) > 0.05;
Segmented = step(hClosing, SegY | SegCbCr);
[Area,Centroid,BBox] = step(hBlob,Segmented);
[OutCount,OutBBox] = videoobjtracker(Area,Centroid,BBox,maxNumObj,...
areaChangeFraction,centroidChangeFraction,maxConsequtiveMiss,....
minPersistenceRatio,alarmCount);
Imr =
insertShape(Im,'FilledRectangle',OutBBox+PtsOffset,'Color','red','Opacity',0.5);
Imr = insertText(Imr, [1,1], OutCount);
step(hAbandonedObjects, Imr);
BlobCount = size(BBox,1);
BBoxOffset = BBox + int32(repmat([roi(1) roi(2) 0 0],[BlobCount 1]));
Imr = insertShape(Im,'Rectangle',BBoxOffset,'Color','green');
Imr = insertText(Imr, [1,1],OutCount);
Imr = insertShape(Imr,'Rectangle',roi);
step(hAllObjects, Imr);
SegBBox = PtsOffset;
SegBBox(1:BlobCount,:) = BBox;
SegIm = insertShape(double(repmat(Segmented,[1 1
3])),'Rectangle',SegBBox,'Color','green');
step(hThresholdDisplay, SegIm);

end
release(hVideoSrc);

Output

You might also like