MGH Mouse Behavior Analysis

Xueying Han
Yueying Li
11/19/2018


Problem Definition

The first problem is that quantifying the time each mouse spent on soft versus solid food.
The second problem is that quantifying how much time the male was in pursuit of the female.
The third problem is that quantifying the amount of time the right eye was closed or semi-closed.


Input Data




Current Results

Video Result

1. Blue rectangular: sand
2. Green rectangular: solid-food area
3. Red rectangular: soft-food area
4. Smaller red rectangular: around the contour of the mouse body
5. white part of mouse body : head area
6. 2 blue points: body centroid and head centroid

Data Result

Source data Result Image
Confidence Value: (The left image and the right image are not correspondence restrictly, just to show the processing part and the results that will be presented eventually.)

Background Research

1. Food Preference
color detection: find mouse's body, sand area
centroid: find mouse's body centroid and head centroid

2. Pursuit
color detection: find mouse's body, sand area
centroid: body centroid and head centroid
tracking algorithm: we need to distinguish the male mouse and the female mouse, the male mouse has red dots on its rear. But in some frames, we can't find the red dots by color detection because of the shadow. So we need to track two mice.

Method and Implementation

First, we need to classify different activities.
-3 -- eating the solid-food area
-2 -- smelling the solid-food area
-1 -- hanging around the solid-food area
0 -- at the middle area between the solid-food area and the soft-food area
1 -- hanging around the soft-food area
2 -- smelling the soft-food area
3 -- eating the soft-food area


Second, we need to build judgements to clarify these activities.
1. Find the mouse's body by color and get its body centroid.
2. Find the mouse's head and get its head centroid
3. Find two food areas
4. Get the postion value by current body centroid, head centroid and two food areas
5. Distinguish smelling food with eating food by the duration of both head centroid and body centroid in the food areas.
6. Save all confidence values into the txt file.


Problems:
1. The rear and ears are too hard to find out.
Because the colors of sands cause a lot of noises, and the areas of rear and ears are too small. We can't find mouse's rear and ears by color detection.
But we need to distinguish the eating action by finding the head. Since we can get the body area, and we found that the head area is a small part of body area if we seperate the body area into 3 parts.
We seperate the body area according to the longer edge of the rectangular around the body contour. Because of ears, the head area is smaller than other 2 parts.

2. The reflection on the window.
Because of the aquarium, the mouse's reflection on the wall affects the result of find the mouse's body.
So, we seperate the sands area by color detection and find the mouse from the sand area.


Discussion

We can't say that the action is eating but not smelling in confidence. Sometimes, we can't even distinguish these two action by our own eyes.
And because we seperate the body area according to the longer side of the rectangular. When the mouse's body area can't be bouded by a rectangular but a square, the body can be seperated into another way and it's not correct. Fortunately, it doesn't always happen.