-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting up documentation pages #521
Changes from all commits
df79a35
c008d08
73c2baf
384c6e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Preprocessing | ||
IFT operates on optical satellite imagery. The main functions are designed with "true color" and "false color" imagery in mind, and have thus far primarily been tested on imagery from the Moderate Resolution Imaging Spectroradiometer (MODIS) from the NASA _Aqua_ and _Terra_ satellites. The preprocessing routines mask land and cloud features, and aim to adjust and sharpen the remainder of the images to amplify the contrast along the edges of sea ice floes. The functions use three different images: a land mask, a true color image, and a false color image. Examples are based on the NASA MODIS dataset. | ||
|
||
## Land masks | ||
Landmask generation and dilation is handled by the function `create_landmask`. Landmask images from file are loaded as RGB matrices. This example uses an image from NASA EarthData landmask for Beaufort Sea. | ||
|
||
``` | ||
using IceFloeTracker | ||
|
||
rgb_landmask = IceFloeTracker.load(<landmask_path>); | ||
landmask_imgs = IceFloeTracker.create_landmask(rgb_landmask); | ||
``` | ||
The landmask_imgs object includes a binary version of the original landmask and a dilated version, which helps to cover the complicated near-coastal regions. | ||
|
||
```@raw html | ||
<img align="right" src="assets/landmask_example.png" width="300"> | ||
``` | ||
|
||
At the top, we have the original landmask TIFF, which has black and gray values. The middle image is the binary image, with land set to 0. At the bottom, we can see the dilated image using the default value of the structuring element. The default has radius 50, which results in a coastal mask of 12.5 km based on the 250 m pixel size of default MODIS imagery. | ||
|
||
## Cloud masks | ||
Setting thresholds for cloud mask | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this is a placeholder. Consider adding a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this is - there's an item for issue #522 for this |
||
## Image regularization |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Segmentation | ||
The segmentation functions are intended for use on the preprocessed imagery. | ||
|
||
## Ice/Water Discrimination | ||
|
||
## Feature Identification |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Tracking | ||
Ice floe tracking links objects in images pairwise. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
""" | ||
create_landmask(landmask_image, struct_elem, fill_value_lower, fill_value_upper) | ||
|
||
Convert a 3-channel RGB land mask image to a 1-channel binary matrix, including a buffer to extend the land over any soft ice regions; land = 0, water/ice = 1. Returns a named tuple with the dilated and non-dilated landmask. | ||
Convert a 3-channel RGB land mask image to a 1-channel binary matrix, and use a structuring element to extend a buffer to mask complex coastal features. In the resulting mask, land = 0 and ocean = 1. Returns a named tuple with the dilated and non-dilated landmask. | ||
|
||
# Arguments | ||
- `landmask_image`: RGB land mask image from `fetchdata` | ||
|
@@ -31,7 +31,7 @@ end | |
""" | ||
binarize_landmask(landmask_image) | ||
|
||
Convert a 3-channel RGB land mask image to a 1-channel binary matrix; land = 0, water/ice = 1. | ||
Convert a 3-channel RGB land mask image to a 1-channel binary matrix; land = 0, ocean = 1. | ||
|
||
# Arguments | ||
- `landmask_image`: RGB land mask image from `fetchdata` | ||
|
@@ -47,7 +47,7 @@ end | |
""" | ||
apply_landmask(input_image, landmask_binary) | ||
|
||
Zero out pixels in land and soft ice regions on truecolor image, return RGB image with zero for all three channels on land/soft ice. | ||
Zero out pixels in all channels of the input image using the binary landmask. | ||
|
||
|
||
# Arguments | ||
|
@@ -69,14 +69,16 @@ end | |
""" | ||
remove_landmask(landmask, ice_mask) | ||
|
||
Find the pixel indexes that are floating ice rather than soft or land ice. Returns an array of pixel indexes. | ||
Apply the landmask to the ice mask to remove labeled ice pixels that overlap with the landmask. Returns | ||
a list of indices of pixels that are likely containing sea ice. | ||
|
||
# Arguments | ||
- `landmask`: bitmatrix landmask for region of interest | ||
- `ice_mask`: bitmatrix with ones equal to ice, zeros otherwise | ||
|
||
""" | ||
## NOTE(tjd): This function is called in `find_ice_labels.jl` | ||
## NOTE(dmw): For consistency, it would make sense to reverse the order of inputs to match landmask | ||
function remove_landmask(landmask::BitMatrix, ice_mask::BitMatrix)::Array{Int64} | ||
Comment on lines
+81
to
82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Consider adding an issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good idea! |
||
land = IceFloeTracker.apply_landmask(ice_mask, landmask) | ||
return [i for i in 1:length(land) if land[i]] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool logo!