-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Described edge detection and median subtract
- Loading branch information
Showing
8 changed files
with
138 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
(command-edge-detection)= | ||
# Edge detection | ||
|
||
:::{sidebar} Edge detection | ||
|
||
Edge detection is the process of finding edges in an image and converting them to a gradient representation. | ||
Sharper changes in the intensity values lead to a higher gradient. | ||
|
||
```{figure} images/edge_detection.drawio.svg | ||
:class: full-image | ||
``` | ||
|
||
::: | ||
|
||
```{figure} images/edge_detection_screenshot.png | ||
:class: tiny-image | ||
``` | ||
|
||
Edge detection is a function used to highlight the edges within an image. | ||
An edge is defined as a change in grey level. | ||
Larger rates of change in the values lead to a larger output value in the algorithm. | ||
|
||
ImageC provides {guilabel}`Sobel` and {guilabel}`Canny` edge detection. | ||
|
||
|
||
The main advantages of the Sobel operator are that it is simple and time efficient but produces rough edges. | ||
On the other hand, the Canny technique produces smoother edges due to the implementation of non-maxima suppression and thresholding. | ||
The disadvantage of the Canny algorithm is that it is more complex and less time efficient than Sobel. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
(command-image-math)= | ||
# Image math | ||
|
||
:::{sidebar} Edge detection | ||
|
||
Edge detection is the process of finding edges in an image and converting them to a gradient representation. | ||
Sharper changes in the intensity values lead to a higher gradient. | ||
|
||
```{figure} images/edge_detection.drawio.svg | ||
:class: full-image | ||
``` | ||
|
||
::: | ||
|
||
```{figure} images/image_math_screenshot.png | ||
:class: tiny-image | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
(command-median-subtract)= | ||
# Median subtract | ||
|
||
:::{sidebar} Rank filter | ||
|
||
Rank-order filters belong to the class of non-linear filters in digital image processing. | ||
These are filters that cannot be described by a convolution. | ||
|
||
With ranking filters, the gray values of the pixels in a defined area around a pixel are collected, sorted by size and ranked. | ||
A gray value is then selected from this sorted list to replace the gray value of the current pixel. | ||
|
||
The choice of position determines the type of ranking filter. With ascending sorting, you get the: | ||
|
||
- Minimum filter, for the minimum gray value, first position in the list | ||
- Median filter, for the gray value in the middle of the list | ||
- Maximum filter, for the maximum gray value, last position in the list. | ||
|
||
::: | ||
|
||
```{figure} images/median_subtract_screenshot.png | ||
:class: tiny-image | ||
``` | ||
|
||
Median subtraction is a sort of noise filtering which can be used to reduce background noise similar to the [rolling ball]() algorithm. | ||
Behind the scenes a rank filter is used to calculate the median of the image intensity, which is subtracted afterwards from the original image. | ||
|
||
The kernel size defines the window size used for the rank filter to calculate the median. | ||
Bigger kernels reduces more details from the image than smaller ones. | ||
|
||
:::{hint} | ||
Bigger filter kernels removes more noise and details from the image. | ||
::: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters