For many robotics and smart car applications it is vitally important to calculate the width. The present paper proposes a new approach for finding the width of a corridor within a constructed image frame that would keep a robot on a safe track away from walls. The main advantage of this approach is less computation time and hence faster response for path recognition. In this new approach, the Hugh Transform technique is also used as the basis of the provided algorithm. Within the determination of corridor width, in order to avoid the accident in the future researches, some approaches such as identify open space, modeling and reconstruction of three-dimensional space, can also be used.