Implemented DB structure and stopped at calculating grey levels at each bounding box