| Copyright | (c) Alexey Kuleshevich 2016 |
|---|---|
| License | BSD3 |
| Maintainer | Alexey Kuleshevich <[email protected]> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Graphics.Image.IO.Histogram
Description
- data Histogram = Histogram {}
- type Histograms = [Histogram]
- getHistograms :: forall arr cs e. (MArray arr Gray e, Array arr Gray e, MArray arr cs e, Array arr cs e, Elevator e) => Image arr cs e -> Histograms
- getHistogram :: (MArray arr Gray e, Elevator e) => Image arr Gray e -> Histogram
- displayHistograms :: Histograms -> IO ()
- writeHistograms :: FilePath -> Histograms -> IO ()
Documentation
A single channel histogram of an image.
type Histograms = [Histogram] Source #
For now it is just a type synonym, but in the future it might become a custom data type with fields like title, width, heigth, etc.
getHistograms :: forall arr cs e. (MArray arr Gray e, Array arr Gray e, MArray arr cs e, Array arr cs e, Elevator e) => Image arr cs e -> Histograms Source #
Create a histogram per channel with 256 bins each.
getHistogram :: (MArray arr Gray e, Elevator e) => Image arr Gray e -> Histogram Source #
Generate a histogram with 256 bins for a single channel Gray image.
displayHistograms :: Histograms -> IO () Source #
Display image histograms using an external program. Works in a similar way as
displayImage.
>>>frog <- readImageRGB VU "images/frog.jpg">>>displayHistograms $ getHistograms frog
writeHistograms :: FilePath -> Histograms -> IO () Source #
Write histograms into a PNG image file.
>>>frog <- readImageRGB VU "images/frog.jpg">>>writeHistograms "images/frog_histogram.svg" $ getHistograms frog