Research Article

LoCoBoard: Low-Cost Interactive Whiteboard Using Computer Vision Algorithms

Algorithm 5

Pseudo code Algorithm A4.
function ALGORITHM (image_height, image_width, image, threshold, lookup_table, est_row, est_col) return centroid
 coordinates of a PL, or failure
inputs:image_height, height of the image
   image_width, width of the image
   image, captured grayscale image
   threshold, lower limit of brightness to identify pixels belonging to PL blob
   lookup_table, predefined spiral search path relative to estimation of PL centroid in current image
   est_row, estimated row location for PL centroid in current image
   est_col, estimated column location for PL centroid in current image
index 0 to SIZE(lookup_table) do
  column est_col + lookup_table[index].x
  row est_row + lookup_table[index].y
   image row column then
    centroid.row, centroid.col) FINDCENTER image_height, image_width, image, threshold, row, column)
    (centroid.row, centroid.col
return failure/didn’t found any center—will use another search algorithm for the rest of the image/