shiguangliangchunshanbo

别人说通过一张照片就可以定位你的位置,看来个视频,仔细研究了一下自己的照片没想到真的可以做到,想想真的有点可怕。

如何通过一张照片去定位这张照片的经纬度下面我以我手机中的照片为例。

我们通过python3 去读取照片的信息  下面是我用python3写的代码


import exifread
import re

def imageread():
GPS = {}
date = \'\'
f = open("E:\\2.jpg",\'rb\')
imagetext = exifread.process_file(f)
for key in imagetext: #打印键值对
print(key,":",imagetext[key])
print(\'********************************************************\n********************************************************\')
for q in imagetext: #打印该图片的经纬度 以及拍摄的时间
if q == "GPS GPSLongitude":
print("GPS经度 =", imagetext[q],imagetext[\'GPS GPSLatitudeRef\'])
elif q =="GPS GPSLatitude":
print("GPS纬度 =",imagetext[q],imagetext[\'GPS GPSLongitudeRef\'])
elif q ==\'Image DateTime\':
print("拍摄时间 =",imagetext[q])

imageread()

将这个经纬度转化一下。将转换的结果上网查一下。

以上就是通过图片进行的定位的过程。

 
 

 

 

 

分类:

技术点:

相关文章:

  • 2021-06-30
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
猜你喜欢
  • 2022-01-20
  • 2022-02-01
  • 2022-02-18
  • 2021-06-26
  • 2021-07-31
  • 2021-12-21
相关资源
相似解决方案