fixed bug:reading image directory & tested with two cameras