This module contains functions for extracting features from connected components of black and white images as well as extracting other shape related features.
- fillConnectedComponents :: Image GrayScale D8 -> (Image GrayScale D8, Int)
- maskConnectedComponent :: Image GrayScale D8 -> Int -> Image GrayScale D8
- selectSizedComponents :: Double -> Double -> Image GrayScale D8 -> Image GrayScale D8
- countBlobs :: Image GrayScale D8 -> Int
- spatialMoments :: Image GrayScale D32 -> Bool -> [Double]
- centralMoments :: Image GrayScale D32 -> Bool -> [Double]
- normalizedCentralMoments :: Image GrayScale D32 -> Bool -> [Double]
- huMoments :: Image GrayScale D32 -> Bool -> [Double]
- data Contours
- getContours :: Image GrayScale D8 -> Contours
- contourArea :: ContourFunctionUS Double
- contourPerimeter :: ContourFunctionUS Double
- contourPoints :: ContourFunctionUS [(Double, Double)]
- mapContours :: ContourFunctionUS a -> Contours -> [a]
- contourHuMoments :: ContourFunctionUS [Double]
Working with connected components
Remove all connected components that fall outside of given size range from the image.
Working with Image moments
Note that these functions should probably go to a different module, since they deal with entire moments of entire images.
Extract raw spatial moments of the image.
Extract central moments of the image. These are useful for describing the object shape for a classifier system.
Extract normalized central moments of the image.
Extract Hu-moments of the image. These features are rotation invariant.
Working with component contours aka. object boundaries.
This part is really old code and probably could be improved a lot.
Extract contours of connected components of the image.
This function maps an opencv contour calculation over all contours of the image.