Comments (3)
Hey Jeeah!
I think you're understanding this right but just to be clear: you will not need to access the tile information directly to get the function working function. The function should be stand alone and accept any image, such as the google sat tiles as an argument:
So! To run the function you will need some image data as an input. You should be able to call the getTile() function to get some google sat images for example, and feed that into the new function. The getTile() function returns tiles as 3-D numpy arrays (rasters with height, width, and 'depth' - which represents the various bands or image colors).
So,
IMG_RGB = core.getTile([-63.5752,44.6488,2],source='google_sat')
then
ND = core.norm_diff(IMG_RGB, B1=1, B2=2)
So (I think this is your real question) to get access to the individual bands inside the function we can use the following type of numpy syntax:
In numpy this is called slicing . Slicing allows us to grab and modify certain parts of the numpy array by their index. So in terms of numpy, think of our images as 3-D cubes of pixels :
Now, yes unfortunately the order of our slices in our case, thinking about the image, is Y,X,Z. The magical : character slices all values of a given index. So if we place that for the Y and X axis of the array, our slice will return all Y and X values. Then if we set our third index Z as the index of our band number (for example band 1 is the index 0), our slice will return that band as a greyscale image.
So again, to grab a given band from an image represented as a numpy array, Arr, we use the following syntax:
from aestheta.
I have a question. I know I need to make a function in core.py to do the math on the img bands but I am not sure how to access the bands from the google sat tiles.
from aestheta.
good work @Jeeah this function is working I'm going to close this issue
from aestheta.
Related Issues (20)
- Model Loading is now broken. HOT 6
- Setup repo as a proper Python package HOT 2
- Test pip install on package HOT 2
- swap lat and lon in getTile() HOT 1
- pytest is commented out in action workflow
- Make sure experiments and tutorials use new way of importing library
- Explore available Eelgrass Presence Datasets
- Investigate what HoloViews can do for us
- Generate a custom mapbox tile layer for Aestheta HOT 1
- Experiment with geoJson and Mapbox Static Tile API
- Investigate/perform a semantic segmentation of our data using linkNet HOT 1
- Move Functions found in Project_Zostera.ipynb into code base HOT 1
- Investigate and report back on GeoJson
- Replicate a computer vision model from the keras tutorials
- Implement General Satellite Derived Bathymetry Function
- Create and Begin to populate new "Tutorials" Section HOT 1
- Create new "/Projects/Zostera" Section
- calculate lat/lon extents of getTile()
- Merge shpreader to main branch HOT 4
- Implement "Points of Interest" table HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aestheta.