A method for obtaining localization information, applied to a visual localization system including a relocation module, the method comprising: obtaining image information of an image and related information of the image information from the relocation module, wherein the related information comprises: a depth map, a point cloud map, relocation postures and a relocation variance after relocation; obtaining three-dimensional coordinates of spatial obstacle points based on the depth map; obtaining target postures and environmental three-dimensional coordinates corresponding to each of the target postures based on the relocation postures, the relocation variance and the point cloud map; scanning and matching the three-dimensional coordinates of the spatial obstacle points with the environmental three-dimensional coordinates to obtain matching result information; obtaining, if the matching result information satisfies a predetermined condition, localization information based on the relocation postures and the relocation variance; and if the matching result information does not satisfy the predetermined condition, determining that the relocation postures are wrong; characterized by obtaining target postures and environmental three-dimensional coordinates corresponding to each of the target postures based on the relocation postures, the relocation variance and the point cloud map comprises: obtaining a probability density of Gaussian probability distribution based on the relocation postures and the relocation variance; sampling the relocation postures to obtain a particle set according to the probability density of Gaussian probability distribution, wherein each particle in the particle set corresponds to one of the target postures; and obtaining environmental three-dimensional coordinates of each particle by a ray casting algorithm based on the point cloud map, wherein the environmental three-dimensional coordinates corresponding to each of the target postures are environmental three-dimensional coordinates of the particle corresponding to the target posture. obtaining image information of an image and related information of the image information from the relocation module, wherein the related information comprises: a depth map, a point cloud map, relocation postures and a relocation variance after relocation; obtaining three-dimensional coordinates of spatial obstacle points based on the depth map; obtaining target postures and environmental three-dimensional coordinates corresponding to each of the target postures based on the relocation postures, the relocation variance and the point cloud map; scanning and matching the three-dimensional coordinates of the spatial obstacle points with the environmental three-dimensional coordinates to obtain matching result information; obtaining, if the matching result information satisfies a predetermined condition, localization information based on the relocation postures and the relocation variance; and if the matching result information does not satisfy the predetermined condition, determining that the relocation postures are wrong; characterized by obtaining target postures and environmental three-dimensional coordinates corresponding to each of the target postures based on the relocation postures, the relocation variance and the point cloud map comprises: obtaining a probability density of Gaussian probability distribution based on the relocation postures and the relocation variance; sampling the relocation postures to obtain a particle set according to the probability density of Gaussian probability distribution, wherein each particle in the particle set corresponds to one of the target postures; and obtaining environmental three-dimensional coordinates of each particle by a ray casting algorithm based on the point cloud map, wherein the environmental three-dimensional coordinates corresponding to each of the target postures are environmental three-dimensional coordinates of the particle corresponding to the target posture. obtaining a probability density of Gaussian probability distribution based on the relocation postures and the relocation variance; sampling the relocation postures to obtain a particle set according to the probability density of Gaussian probability distribution, wherein each particle in the particle set corresponds to one of the target postures; and obtaining environmental three-dimensional coordinates of each particle by a ray casting algorithm based on the point cloud map, wherein the environmental three-dimensional coordinates corresponding to each of the target postures are environmental three-dimensional coordinates of the particle corresponding to the target posture.