Protocol description update

Protocol description is as follows:

KindOfEvent|User|XCoordinate|YCoordinate|XDirComponent|YDirComponent\n

KindOfEvent: integer. 0 = USER_JOINED; 1 = USER_MOVE; 2 = USER_LEFT

User: integer. UserID. Note: UserID of 99 means “mood of the room”. (Read on)

XCoordinate: float [0.0-1.0]. Note: if UserID is 99, this value is the mood of the room.

YCoordinate: float [0.0-1.0].

XDirComponent: float [0.0-1.0].

YDirComponent: float [0.0-1.0].

Comments

Sunday November 22, 2009 @ 00:42

oldfrau

Hej there,

what does “mood” mean ? I saw this word in the post and in your code as well .

By the way, your project is really great and appreciate it a lot you can make it public.

Sunday November 22, 2009 @ 04:45

alejandro

Hi! thank you for your message.

The “mood” is the level of activity in the room, as measured by getting the average black and white value from the (grayscale) image of the scene difference with respect to the scene without people.

That is, first the system takes a picture of the place without people - then turns it into grayscale and keeps it in memory. Each frame coming from the webcam is then turned into grayscale and subtracted the picture without people to detect changes.

This resulting image is then used to calculate the average black and white value - this is the mood value, which the system reports as “user No. 99” - then the same image is used in other algorithms to detect blobs.