1. A visual-based obstacle detection method, comprising: receiving image information of an environment containing a mobile robot captured by at least one visual sensor to obtain one of a three-dimensional (3D) space and a two-dimensional (2D) plane; based on the received image information, extracting feature geometric primitives; based on a certain matching criteria, matching the extracted feature geometric primitives to obtain matched extracted feature geometric primitives; reconstructing coordinates of the matched extracted feature geometric primitives and positions and orientations of the visual sensor; optimizing the reconstructed coordinates to obtain a calculation result, wherein the calculation result includes the matched extracted feature geometric primitives, the positions and orientations of the visual sensor, as well as visible constraint relationships between the matched extracted feature geometric primitives and the positions and orientations of the visual sensor; based on the obtained calculation result, detecting obstacles in the environment containing the mobile robot; and plotting a path for automatic motion of the mobile robot based on the detected obstacles.