1. A method of obtaining a panoramic image, comprising steps of: a) obtaining panoramic image frames of regions of interest to be taken in an object, wherein the panoramic image frames are correspond to multiple image-layer-traces; b) dividing the multiple image-layer-traces into a plurality of regions respectively and determining at least two analysis regions among the plurality of regions; c) selecting an optimal image-layer-trace most closely related to a focus-trace by analyzing the multiple image-layer-traces in the same analysis region; d) extracting at least one connecting-trace linking the optimal image-layer-traces selected in the analysis regions; e) completing a final-trace by connecting the optimal image-layer-trace selected in each analysis region and the connecting-trace all together; and f) reconstructing a panoramic image corresponding to the final-trace.