当前位置:网站首页>How to obtain geographical location based on photos and how to prevent photos from leaking geographical location
How to obtain geographical location based on photos and how to prevent photos from leaking geographical location
2022-04-23 09:28:00 【Python concentration camp】
First , Explain python You can really get geographical location from photos , But there are certain restrictions .
The realization idea of obtaining the geographical location of photos is as follows : By extracting the longitude and latitude information in the photo . Then find the specific geographic location information through the longitude and latitude information .
Install... That can read longitude and latitude information python Non standard library exifread
pip install exifread
Import the module into the current code block .
import exifread as ex
Write photo information reading function , Get the latitude and longitude information in the photo .
def read_image():
'''
Longitude and latitude information reading function
:return:
'''
image = open('C:/sc.jpg', 'rb') # Open photo file
messages = ex.process_file(image) # Get photo information
''' Traverse and extract photo information '''
for message in messages:
print(' Photo information :', message)
if message == "GPS GPSLongitude":
print(" longitude =", messages[message], messages['GPS GPSLatitudeRef'])
elif message == "GPS GPSLatitude":
print(" latitude =", messages[message], messages['GPS GPSLongitudeRef'])
if __name__ == '__main__':
read_image()
Through the above processing, the current longitude and latitude information has been obtained , Now we only need to obtain the specific geographical location according to the longitude and latitude information .
Use it directly web Just go to the website to query the geographical location .
Geographic location conversion web address :http://www.giscalculator.com/enter_regeocode_input/
Last , So how to prevent your mobile phone photos from being tracked to your address , It is necessary to explain the hard conditions for photos to obtain geographic location information .
1、 If the mobile phone is an Android mobile phone, the tracked location will appear . 2、 The phone is turned on when shooting GPS Located photos will be stored GPS Location information , Otherwise, you can't get it . 3、 In the process of sending mobile phone photos, you must send the original picture before sending photos and other information to others .
According to the above situation , Turn off positioning when taking pictures 、 When sending photos to others, in order to avoid information leakage, do not use the original image to send , If it's an Apple phone, don't worry for the time being !
【 Past highlights 】
Cherry blossoms are in full bloom again , Use the little turtle to draw a cherry tree !
Python Read PDF The file is text characters and converted to audio ...
python Get the latest house price information - Take house prices in Beijing as an example
Office automation :Image Convert the picture to PDF Document storage ...
python Make a micro beauty image processor , Ten lines of code can complete ...
use python Make a text translator , Automatically translate Chinese into English , Super convenient !
Xiao Wang , To give the 2000 A customer sends a holiday blessing email ...
python One line command enables file sharing between networks ...
PyQt5 Batch deletion Excel Duplicate data , Multiple files 、 User defined duplicates can be deleted with one click ...
bye XShell, This Chinese open source terminal command line tool is more nice!
python Expression pack downloader , Easily download tens of thousands of expression packages 、 Don't worry about fighting pictures ...
Python Automatically clean up computer junk files , One click start ...
版权声明
本文为[Python concentration camp]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230924410068.html
边栏推荐
- JS what is an event? Event three elements and operation elements
- SAP 101K 411K 库存变化
- Group Backpack
- Write down the post order traversal of the ~ binary tree
- Cloud computing competition -- basic part of 2020 competition [task 3]
- Operation not allowed for a result set of type resultset TYPE_ FORWARD_ ONLY. Explain in detail
- JS scope, scope chain, global variables and local variables
- 错题汇总1
- ALV树(LL LR RL RR)插入删除
- Yyds dry goods inventory ubuntu18 0.4 install MySQL and solve error 1698: access denied for user ''root' '@' 'localhost' '
猜你喜欢
《信息系统项目管理师总结》第八章 项目干系人管理
Yyds dry goods inventory ubuntu18 0.4 install MySQL and solve error 1698: access denied for user ''root' '@' 'localhost' '
Kettle experiment
Go language learning notes - language interface | go language from scratch
653. 两数之和 IV - 输入 BST
501. Mode in binary search tree
112. Path sum
A must see wechat applet development guide 1 - basic knowledge
Go language learning notes - slice, map | go language from scratch
数据清洗 ETL 工具Kettle的安装
随机推荐
Cloud computing competition -- basic part of 2020 competition [task 3]
Data visualization: use Excel to make radar chart
Kettle experiment (III)
Using sqlmap injection to obtain the account and password of the website administrator
Creation of raid0 and RAID5 and Simulation of how RAID5 works
错题汇总1
[in-depth good article] detailed explanation of Flink SQL streaming batch integration technology (I)
三、6【Verilog HDL】基础知识之门级建模
Redis Desktop Manager for Mac
653. Sum of two IV - input BST
LGB, XGB, cat, k-fold cross validation
Installation of data cleaning ETL tool kettle
DVWA range practice
Employee probation application (Luzhou Laojiao)
[boutique] using dynamic agent to realize unified transaction management II
JS and how to judge custom attributes in H5
Summary of common concepts and problems of linear algebra in postgraduate entrance examination
Go language learning notes - structure | go language from scratch
Give the method of instantiating the object to the new object
Write down the post order traversal of the ~ binary tree