| Algorithm 1Food plate detection |
|
Input: an RGB image captured by Kinect Output: four corner points of the food plate 1. Calculate the center point p of the captured image. The point p would locate inside the food plate. 2. Draw a vertical ray along the y-axis with starting point p and upwards until it meets a red line. The red line L1 is selected as the upper edge of the plate. Calculate the red line’s slope and the angle θ between the line and x-axis. 3. Draw a parallel rightwards ray of L1 with starting point p until it meets a red line and denoted as L2. 4. Draw a parallel leftwards ray of L1 with starting point p until it meets a red line and denoted as L3. 5. Draw a vertical downwards ray of L1 with starting point p until it meets a red line and denoted as L4. 6. Determine the four corners from the extracted four lines L1 to L4 and redraw a rectangle (bounding box) and then output the four corner points. |