Ask Your Question
0

Detecting empty room

asked 2013-01-12 23:50:22 -0600

bhagi gravatar image

I am doing a project in which I have to use image processing to detect whether a room is empty. Now, I have to use a camera (surveillance types) which will be live feeding the room. Images will be taken at regular intervals and given to the computer which will do the processing of the image.

The issue is the room is big and face might be far away or sometimes even in angles where faces might not be detectable.

How should I proceed with this problem.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-01-13 04:27:19 -0600

rics gravatar image

Assuming that when the room is empty then there is no movement at all (no moving curtains, working production line etc.) you may compare the image sequence whether there are differences on them. If so it means that someone entered the room and moving.

I have just pasted my simple code here. It reads the images from the webcam one by one, selects one channel, smooths it and calculates the absolute difference on each pixel. Finally when the difference is above a certain level (20) then the resulting image will contain a white pixel in that position:

cvAbsDiff(image1, image2, result);
cvCmpS(result, 20, result, CV_CMP_GE);

To make the difference more visible a rectangle is drawn that creates a frame around all those pixels where there was a change (calculateMovementCoordinates).

I know that it is a naive solution but you may begin with it.

edit flag offensive delete link more
0

answered 2013-01-13 01:52:45 -0600

Adi gravatar image

Background modeling and subtraction may give you a good starting point.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-12 23:50:22 -0600

Seen: 811 times

Last updated: Jan 13 '13