Last modified: February 14, 2023
Contents
[object] cc_analysis ()
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom and Karl MacMillan |
Performs connected component analysis on the image.
This algorithm assumes 8-connected components, meaning any two pixels are considered "connected" if they are adjacent in any direction, including diagonally.
The original image will have all of its pixels "labeled" with a number representing each connected component. This is so the connected components can share data with their source image and makes things much more efficient.
Returns a list of ccs found in the image. Since all the CC's share the same data with the original image, changing the CC's will affect the original. If you do not want this behavior, use the image_copy function on each of the CCs:
ccs = [x.image_copy() for x in ccs]
Example 1: cc_analysis()
[object] cc_and_cluster (float ratio = 1.00, int distance = 2)
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom and Karl MacMillan |
Performs connected component analysis using cc_analysis and then clusters the CC's according to their similarity.
TODO: We need some more detailed documentation here.
Example 1: cc_and_cluster()
[object] splitx (FloatVector center = [0.5])
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom, Karl MacMillan and Christoph Dalitz |
Splits an image vertically.
The split point is determined automatically by finding a valley in the projections near center.
This function is overloaded to work both with a single value and a list of splitting point candidates as input.
Example 1: splitx()
[object] splitx_left ()
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom and Karl MacMillan |
Splits an image vertically.
The split point is determined automatically by finding a valley in the projections near the left of the image.
Example 1: splitx_left()
[object] splitx_max (FloatVector center = [0.5])
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom, Karl MacMillan and Christoph Dalitz |
Splits an image vertically.
The split point is determined automatically by finding a peak in the projections near center.
This function is overloaded to work both with a single value and a list of splitting point candidates as input.
Example 1: splitx_max()
[object] splitx_right ()
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom and Karl MacMillan |
Splits an image vertically.
The split point is determined automatically by finding a valley in the projections near the right of the image.
Example 1: splitx_right()
[object] splity (FloatVector center = [0.5])
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom, Karl MacMillan and Christoph Dalitz |
Splits an image horizontally.
The split point is determined automatically by finding a valley in the projections near center.
This function is overloaded to work both with a single value and a list of splitting point candidates as input.
Example 1: splity()
[object] splity_bottom ()
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom and Karl MacMillan |
Splits an image horizontally.
The split point is determined automatically by finding a valley in the projections near the bottom of the image.
Example 1: splity_bottom()
[object] splity_top ()
Operates on: | Image [OneBit] |
---|---|
Returns: | [object] |
Category: | Segmentation |
Defined in: | segmentation.py |
Author: | Michael Droettboom and Karl MacMillan |
Splits an image horizontally.
The split point is determined automatically by finding a valley in the projections near the top of the image.
Example 1: splity_top()