EarthView
- class machinevisiontoolbox.Sources.EarthView(key=None, type='satellite', zoom=18, scale=1, shape=(500, 500), **kwargs)[source]
Iterate images from GoogleEarth
- Parameters:
key (str) – Google API key, defaults to None
type (str, optional) – type of map (API
maptype): ‘satellite’ [default], ‘map’, ‘roads’, ‘hybrid’, and ‘terrain’.zoom (int, optional) – map zoom, defaults to 18
scale (int, optional) – image scale factor: 1 [default] or 2
shape (tuple, optional) – image size (API
size), defaults to (500, 500)kwargs – options applied to image frames, see
convert
The resulting object has a
grabmethod that returnsImageobjects for a specified position on the planet.zoomvaries from 1 (whole world) to a maximum of 18.The
typeargument controls the type of map returned:typeReturned image
"satellite"satellite color image from space
"roadmap"a standard roadmap image as normally shown on the Google Maps website
"map"synonym for
"roadmap""hybrid"hybrid of the satellite with overlay of roadmap image
"terrain"specifies a physical relief map image, showing terrain and vegetation
"roads"a binary image which is an occupancy grid, roads are free space
Example:
>>> from machinevisiontoolbox import EarthView >>> earth = EarthView() # create an Earth viewer >>> image = earth(-27.475722, 153.0285, zoom=17 # make a view >>> # process image
Warning
You must have a Google account and a valid key, backed by a credit card, to access this service. Getting started
- Note:
- If the key is not passed in, a value is sought from the
environment variable
GOOGLE_KEY.
Uses the Google Maps Static API
- References:
Robotics, Vision & Control for Python, Section 11.1.6, P. Corke, Springer 2023.
- Seealso:
Methods
Google map view as an image