vd9      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop q r s t u v w x y z { | } ~   Safe-Inferred24JK 1Our index type, used for both shapes and indices.An index of dimension zero.<Class of types that can be used as array shapes and indices.)Gets the number of dimensions in a shape.<Gets the total number of elements in an array of this shape."Gives the first index of an array.>Gives the successor of an index, given the shape of the array.EConvert an index into its equivalent flat, linear, row-major version. Inverse of .9Return the ascending list of indexes for the given shape./Check whether an index is within a given shape.Helper for index construction./Use this instead of explicit constructors like (Z :. (x :: Int)). The this is sometimes needed to ensure that x is constrained to be in Int.% Shape of the array.Index.Shape of the array.Index into the array.Shape of the array.!Index into linear representation.Shape of the array.Index to check for. !"   !"    !"  !"  Safe-Inferred#-Rational coordinates used for interpolations.-Size of an object.Can be constructed using I. The first parameter is the height while the second is the width (i.e. ix2 h w)..Coordinates inside the image.Can be constructed using V. The first parameter is the y coordinate while the second is the x coordinate (i.e.  y x). Image origin ( 0 0') is located in the upper left corner. #$%&'()*+,-.,  !"#$%&'()*+,-. .-'()*+,#$%&#$%&'()*+,-.None36=K/\Defines a class for images on which a function can be applied. The class is different from S as there could be some constraints and transformations the pixel and image types.14Provides ways to construct an image from a function.3ZGenerates an image by calling the given function for each pixel of the constructed image.4YGenerates an image by calling the last function for each pixel of the constructed image.OThe first function is called for each line, generating a line invariant value.dThis function is faster for some image representations as some recurring computation can be cached.5YGenerates an image by calling the last function for each pixel of the constructed image.SThe first function is called for each column, generating a column invariant value.This function *can* be faster for some image representations as some recurring computations can be cached. However, it may requires a vector allocation for these values. If the column invariant is cheap to compute, prefer 3.6YGenerates an image by calling the last function for each pixel of the constructed image.The two first functions are called for each line and for each column, respectively, generating common line and column invariant values.This function is faster for some image representations as some recurring computation can be cached. However, it may requires a vector allocation for column values. If the column invariant is cheap to compute, prefer 4.7EProvides an abstraction over the internal representation of an image.1Image origin is located in the lower left corner.8)Returns the pixel value at 'Z :. y :. x'.9bReturns the pixel value as if the image was a single dimension vector (row-major representation).:eReturns every pixel values as if the image was a single dimension vector (row-major representation).<pProvides an abstraction for images which are not defined for each of their pixels. The interface is similar to 75 except that indexing functions don't always return.Image origin (ix2 0 0&) is located in the upper left corner.?,Returns the pixel's value at 'Z :. y, :. x'.@dReturns the pixel's value as if the image was a single dimension vector (row-major representation).A+Returns the non-masked values of the image.BjDetermines the number of channels and the type of each pixel of the image and how images are represented.D,Returns the number of channels of the pixel.Must not consume p (could be ).F Alias of ?.G Alias of 8.H+Returns the number of channels of an image.I Returns an h instance of a pixel of the image. This is sometime useful to satisfy the type checker as in a call to D : (nChannels img = pixNChannels (pixel img)%/0123456 Line functionColumn functionPixel function789:;<=>?@ABCDEFGHI/0123456789:;<=>?@ABCDEFGHIBCDE<=>?@A789:;123456/0GFHI/0123456789:;<=>?@ABCDEFGHINone3JHProvides a way to apply the interpolation to every component of a pixel.KGiven a function which interpolates two points over a single channel, returns a function which interpolates two points over every channel of two pixels.LZUses a bilinear interpolation to find the value of the pixel at the rational coordinates.(Estimates the value of a rational point p using a, b, c and d : h x1 x2 y1 a ------ b - - - p - - - y2 c ------ d JKL     JKLJKL JKL     None 2346=KQBA delayed image is an image which is constructed using a function.Usually, a delayed image maps each of its pixels over another image. Delayed images are useful by avoiding intermediate images in a transformation pipeline of images or by avoiding the computation of the whole resulting image when only a portion of its pixels will be accessed.UStores the image content in a .Y.Delays an image in its delayed representation.Z>Computes the value of an image into a manifest representation.[AForces an image to be in its delayed represenation. Does nothing.\BForces an image to be in its manifest represenation. Does nothing. MNOPQRSTUVWXYZ[\ !MNOPQRSTUVWXYZ[\UVWXQRSTMNOPYZ[\MNOPQRSTUVWXYZ[\ !None=BK]^_`"#]^_`^_`]]^_`"#None=JKb24 bits (3 * 8 bits) HSV image.KThe Hue value is in [0..179], Saturation in [0..255] and Value in [0..255].bThis image type is more respectful to human eye perception of colors and can be converted (using convert) from RGB images.Uses  (http://en.wikipedia.org/wiki/HSL_and_HSV' equations to convert from and to RGB. abcdefg$%&abcdefgbcdefgaabcdefg$%&None=JK hijklmno'()hijklmnoijklmnohhijklmno'() None=JK pqrstuv*+,pqrstuvqrstuvppqrstuv*+, None 234=?JKwjThis class defines how many dimensions a histogram will have and what will be the default number of bins.x@Gives the value space of a pixel. Single-channel pixels will be  ( whereas three-channels pixels will be  A. This is used to determine the rank of the generated histogram.yConverts a pixel to an index.zReturns the maximum number of different values an index can take for each dimension of the histogram (aka. the maximum index returned by y plus one).{ Subclass of P which defines how to resize a shape so it will fit inside a resized histogram.|XGiven a number of bins of an histogram, reduces an index so it will be mapped to a bin.+Values of the histogram in row-major order. Alias of .mReturns the value at the index as if the histogram was a single dimension vector (row-major representation).1Returns all index/value pairs from the histogram.[Given the number of bins of an histogram and a given pixel, returns the corresponding bin.<Computes an histogram from a (possibly) multi-channel image.If the size of the histogram is not given, there will be as many bins as the range of values of pixels of the original image (see z).xIf the size of the histogram is specified, every bin of a given dimension will be of the same size (uniform histogram). Similar to  but adds two dimensions for the y and x-coordinates of the sampled points. This way, the histogram will map different regions of the original image.For example, an RGB image will be mapped as    red channel   green channel   blue channel   y region   x region.uAs there is no reason to create an histogram as large as the number of pixels of the image, a size is always needed.9Reduces a 2D histogram to its linear representation. See 8 for a reduction of the number of bins of an histogram.  ==  . 1Resizes an histogram to another index shape. See > for a reduction of the number of dimensions of an histogram.HComputes the cumulative histogram of another single dimension histogram.C(i) = SUM H(j) for each j in [0..i] where C# is the cumulative histogram, and H the original histogram.rNormalizes the histogram so that the sum of the histogram bins is equal to the given value (normalisation by the L1 norm).qThis is useful to compare two histograms which have been computed from images with a different number of pixels.=Equalizes a single channel image by equalising its histogram.The algorithm equalizes the brightness and increases the contrast of the image by mapping each pixel values to the value at the index of the cumulative L1-normalized histogram :N(x, y) = H(I(x, y)) where N is the equalized image, I is the image and H4 the cumulative of the histogram normalized over an L1 norm.See  4https://en.wikipedia.org/wiki/Histogram_equalization. Computes the !Pearson's correlation coefficient8 between each corresponding bins of the two histograms.wA value of 1 implies a perfect correlation, a value of -1 a perfect opposition and a value of 0 no correlation at all.  = SUM [ (H1(i) - (H1)) (H1(2) - (H2)) ] / ( SQRT [ SUM [ (H1(i) - (H1))^2 ] ] * SQRT [ SUM [ (H2(i) - (H2))^2 ] ] )Where (H)' is the average value of the histogram H.See  <http://en.wikipedia.org/wiki/Pearson_correlation_coefficient.9Computes the Chi-squared distance between two histograms.'A value of 0 indicates a perfect match. = SUM (d(i)) for each indice i of the histograms where 0d(i) = 2 * ((H1(i) - H2(i))^2 / (H1(i) + H2(i))).0Computes the intersection of the two histograms./The higher the score is, the best the match is. = SUM (min(H1(i), H2(i)) for each indice i of the histograms. Computed the Earth mover's distance between two histograms.<Current algorithm only supports histograms of one dimension.See  4https://en.wikipedia.org/wiki/Earth_mover's_distance.$wxyz{|%The number of bins we are mapping to.4The number of possible values of the original index.The original index.&The index of the bin in the histogram.}~-./012345wxyz{|}~}~{|wxyzwxyz{|}~-./012345None66GConverts the colors to greyscale using the human eye colors perception. 6789:;<=>? 6789:;<=>?None6@ABCD@ABCDNone6EFGEFGNone6HIJKLMNHIJKLMN None3=HKM ?Class for images which can be constructed from a mutable image.7The type of the immutable version of the mutable image i.D doesn't run in a monad as the size of a mutable image is constant.]Creates a new mutable image of the given size. Pixels are initialized with an unknown value.PCreates a new mutable image of the given size and fill it with the given value.Returns the pixel value at  Z :. y :. x.bReturns the pixel value as if the image was a single dimension vector (row-major representation).$Overrides the value of the pixel at  Z :. y :. x.~Overrides the value of the pixel at the given index as if the image was a single dimension vector (row-major representation)./Returns an immutable copy of the mutable image.iReturns the immutable version of the mutable image. The mutable image should not be modified thereafter..Returns a mutable copy of the immutable image.#Creates an immutable image from an O! action creating a mutable image.P P None3=K uDefines the set of possible methods for pixel interpolations when looking for a pixel at floating point coordinates.LDoes a double linear interpolation over the four surrounding points (slow).!Selects the nearest pixel (fast).%Selects the top left pixel (fastest).9Maps the content of the image's rectangle in a new image. Resizes the 7& using the given interpolation method. Reverses the image horizontally.Reverses the image vertically.}Paints with a new value the pixels surrounding the given point of the image which have the same value as the starting point. QR QR None!"2346=EKM"@Defines how image boundaries are extrapolated by the algorithms.'|'* characters in examples are image borders.0Assigns a constant value to out of image pixels. 0iiiiii|abcdefgh|iiiiiii with some specified 'i'CConsiders that the last pixel of the image is before the first one. cdefgh|abcdefgh|abcdefg!Reflects the border of the image. fedcba|abcdefgh|hgfedcb2Replicates the first and last pixels of the image. aaaaaa|abcdefgh|hhhhhhhUses the first pixel in the kernel as initial value. The kernel must not be empty and the accumulator type must be the same as the source pixel type.?This kind of initialization is needed by morphological filters.Uses the result of the provided function as the initial value of the kernel's accumulator, depending on the center coordinates in the image.SFor most filters, the function will always return the same value (i.e. defined as const 0G), but this kind of initialization could be required for some filters.[Used to determine the type of the accumulator image used when computing separable filters.src and res? are respectively the source and the result image types while acc& is the pixel type of the accumulator.YSome kernels can be factorized in two uni-dimensional kernels (horizontal and vertical).lSeparable filters computational complexity grows linearly according to the size of the sides of the kernel.See  4http://http://en.wikipedia.org/wiki/Separable_filter.Vertical (column) kernel.Horizontal (row) kernel.A simple 2D kernel.iThe kernel function accepts the coordinates in the kernel, the value of the pixel at these coordinates (srcF), the current accumulated value and returns a new accumulated value.uNon-separable filters computational complexity grows quadratically according to the size of the sides of the kernel.8Defines how the center of the kernel will be determined.<Separable 2D filters which are not initialized with a value.8Separable 2D filters which are initialized with a value.22D filters which are not initialized with a value..2D filters which are initialized with a value.See  and .DComputes a constant value for each pixel before applying the kernel.This value will be passed to  functions and to the  function. For most filters, fInit will be  _ _ -> ().1Defines how the accumulated value is initialized.See  and .SThis function will be executed after the iteration of the kernel on a given point.<Can be used to normalize the accumulated value, for example.7Provides an implementation to execute a type of filter.src is the original image, res the resulting image and f the filter.,Applies the given filter on the given image.yGiven a method to compute the kernel anchor and the size of the kernel, returns the anchor of the kernel as coordinates.Given a method of interpolation, the number of pixel in the dimension and an index in this dimension, returns either the index of the interpolated pixel or a constant value.9Blurs the image by averaging the pixel inside the kernel.Considers using a type for acc with -maxBound acc >= maxBound src * (kernel size).TBlurs the image by averaging the pixel inside the kernel using a Gaussian function.See *http://en.wikipedia.org/wiki/Gaussian_blur=Estimates the first derivative using the Scharr's 3x3 kernel.4Convolves the following kernel for the X derivative: $ -3 0 3 -10 0 10 -3 0 3 %And this kernel for the Y derivative: $ -3 -10 -3 0 0 0 3 10 3 *Considers using a signed integer type for res with !maxBound res >= 16 * maxBound src.6Estimates the first derivative using a Sobel's kernel.Prefer  when radius equals 1@ as Scharr's kernel is more accurate and is implemented faster.*Considers using a signed integer type for res% which is significantly larger than src, especially for large kernels.3Computes the average of a kernel of the given size.This is similar to % but with a rectangular kernel and a S result.TBSeparable filters initialized using the first pixel of the kernel.U1Separable filters initialized with a given value.V<Box filters initialized using the first pixel of the kernel.W+Box filters initialized with a given value.;The size of the dimension.The index in the dimension. Blur radius. Blur radius.Sigma value of the Gaussian function. If not given, will be automatically computed from the radius so that the kernel fits 3 of the distribution.Kernel radius.XYTUVWZ[33#XYTUVWZ[None3=K9Blurs the image by averaging the pixel inside the kernel.Uses an \/ as accumulator during the averaging operation.TBlurs the image by averaging the pixel inside the kernel using a Gaussian function.See *http://en.wikipedia.org/wiki/Gaussian_blur=Estimates the first derivative using the Scharr's 3x3 kernel.4Convolves the following kernel for the X derivative: $ -3 0 3 -10 0 10 -3 0 3 %And this kernel for the Y derivative: $ -3 -10 -3 0 0 0 3 10 3 Uses an \* as accumulator during kernel application.6Estimates the first derivative using a Sobel's kernel.Prefer  when radius equals 1@ as Scharr's kernel is more accurate and is implemented faster.Uses an \* as accumulator during kernel application.3Computes the average of a kernel of the given size.This is similar to % but with a rectangular kernel and a S result.Uses an \/ as accumulator during the averaging operation.Kernel radius.Kernel radius. Blur radius. Blur radius.Sigma value of the Gaussian function. If not given, will be automatically computed from the radius so that the kernel fits 3 of the distribution.Kernel radius. None!"3 MDefines how pixels of the kernel of the adaptive threshold will be weighted.With ,, pixels of the kernel have the same weight.With  sigmav, pixels are weighted according to their distance from the thresholded pixel using a Gaussian function parametred by sigma. See  for details.BSpecifies what to do with pixels matching the threshold predicate. a b! will replace matching pixels by a and non-matchings pixels by b. a! will replace matching pixels by a. a% will replace non-matching pixels by a.Given the thresholding method, a boolean indicating if the pixel match the thresholding condition and the pixel, returns the new pixel value.>Applies the given predicate and threshold policy on the image.PCompares every pixel to its surrounding ones in the kernel of the given radius.8Creates an adaptive thresholding filter to be used with .Use 3 if you only want to apply the filter on the image.PCompares every pixel to its surrounding ones in the kernel of the given radius.FApplies a clustering-based image thresholding using the Otsu's method.See  +https://en.wikipedia.org/wiki/Otsu's_method.This is a sliding concentric window filter (SCW) that uses the ratio of the standard deviations of two sliding windows centered on a same point to detect regions of interest (ROI). .scw sizeWindowA sizeWindowB beta thresType imgLet A? be the standard deviation of a fist window around a pixel and Bq be the standard deviation of another window around the same pixel. Then the pixel will match the threshold if B / A >= beta2, and will be thresholded according to the given .See  @http://www.academypublisher.com/jcp/vol04/no08/jcp0408771777.pdf.]aGiven a mean image and an original image, computes the variance of the kernel of the given size.Eaverage [ (origPix - mean)^2 | origPix <- kernel pixels on original ].Kernel radius.[Minimum difference between the pixel and the kernel average. The pixel is thresholded if &pixel_value - kernel_mean > difference3 where difference is this number. Can be negative.Kernel radius.[Minimum difference between the pixel and the kernel average. The pixel is thresholded if &pixel_value - kernel_mean > difference3 where difference is this number. Can be negative.]^_ ]^_NoneNone]^_`NoneNoneabcdefgNoneNonehijklmnoNoneNonepqrstuvNone/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvNone3U`\a/b c|FDetects edges using the Canny's algorithm. Edges are given the value d% while non-edges are given the value e.This implementation doesn't perform any noise erasing (as blurring) before edge detection. Noisy images might need to be pre-processed using a Gaussian blur.CThe bidirectional derivative (gradient magnitude) is computed from x and y derivatives using sqrt(dx + dy).See  0http://en.wikipedia.org/wiki/Canny_edge_detector for details.!This function is specialized for ^ images but is declared  INLINABLE0 to be further specialized for new image types.f`abcRadius of the Sobel's filter.Low threshold. Pixels for which the bidirectional derivative is greater than this value and which are connected to another pixel which is part of an edge will be part of this edge.rHigh threshold. Pixels for which the bidirectional derivative is greater than this value will be part of an edge.ghfcba`ghi !"#$%&'()*+,--../0123456789:;<=>?@AABCDDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiijkllmnoopqrstuvwxxyz{{|}~          Z V T c U L                                               !"#$%&'()*+,- . / 0 1 2  3 4 5 6 7 89:;<2=>?@=ABCDEF=GHIJKLM N 2 OPQ R S T U 1 V WXYZ12[\]^_`_ab12cfriday-0.2.0.2Vision.Image.ClassVision.Primitive.ShapeVision.PrimitiveVision.Image.InterpolateVision.Image.TypeVision.Image.Grey.TypeVision.Image.HSV.TypeVision.Image.RGBA.TypeVision.Image.RGB.TypeVision.HistogramVision.Image.MutableVision.Image.TransformVision.Image.Filter.InternalVision.Image.FilterVision.Image.ThresholdVision.Detector.EdgeVision.Image.Grey.ConversionVision.Image.RGB.ConversionVision.Image.RGBA.ConversionVision.Image.HSV.ConversionVision.Image.Grey.SpecializeVision.Image.GreyVision.Image.HSV.SpecializeVision.Image.HSVVision.Image.RGBA.SpecializeVision.Image.RGBAVision.Image.RGB.SpecializeVision.Image.RGB Vision.Imageconvertible-1.1.0.0Data.Convertible.Baseconvert safeConvert ConvertibleDIM9DIM8DIM7DIM6DIM5DIM4DIM3DIM2DIM1DIM0:.ZShape shapeRank shapeLength shapeZero shapeSucc toLinearIndexfromLinearIndex shapeListinShapeix1ix2ix3ix4ix5ix6ix7ix8ix9RPointrpXrpYRectrXrYrWidthrHeightSizePoint FunctorImagemap FromFunctionFromFunctionPixel fromFunctionfromFunctionLinefromFunctionColfromFunctionCachedImageindex linearIndexvector ImageChannel MaskedImage ImagePixelshape maskedIndexmaskedLinearIndexvaluesPixel PixelChannel pixNChannelspixIndex!?! nChannelspixel InterpolableinterpolbilinearInterpol DelayedMaskdelayedMaskSizedelayedMaskFunDelayed delayedSize delayedFunManifest manifestSizemanifestVectordelaycomputedelayedmanifest GreyDelayedGrey GreyPixel HSVDelayedHSVHSVPixelhsvHuehsvSathsvValue RGBADelayedRGBA RGBAPixelrgbaRed rgbaGreenrgbaBlue rgbaAlpha RGBDelayedRGBRGBPixelrgbRedrgbGreenrgbBlue ToHistogramPixelValueSpace pixToIndex domainSizeHistogramShapetoBin HistogramassocspixToBin histogram histogram2Dreduceresize cumulative normalize equalizeImage compareCorrel compareChicompareIntersect compareEMDMutableManifestmmSizemmVector MutableImageFreezedmShapenewnew'read linearReadwrite linearWritefreeze unsafeFreezethawcreateInterpolMethodBilinearNearestNeighborTruncateIntegercrophorizontalFlip verticalFlip floodFillMeanDerivativeType DerivativeY DerivativeX DerivativeBlur MorphologicalBorderInterpolateBorderConstant BorderWrap BorderReflectBorderReplicate FilterFold1 FilterFoldSeparatelyFiltrableSeparableFilterAccumulatorSeparableKernel skVertical skHorizontalKernel KernelAnchorKernelAnchorCenterSeparableFilter1SeparableFilter BoxFilter1 BoxFilterFilter fKernelSize fKernelCenterfKernelfInitfFoldfPost fInterpol Filterableapply kernelAnchorborderInterpolatedilateerodeblur gaussianBlurscharrsobelmeanAdaptiveThresholdAdaptiveThresholdKernelGaussianKernel MeanKernel ThresholdType TruncateInvTruncateBinaryThreshold thresholdType thresholdadaptiveThresholdadaptiveThresholdFilterotsuscwcannyword $fStorable:. $fShape:. $fStorableZ$fShapeZbaseGHC.BaseFunctorGHC.Err undefined $fPixelBool $fPixelDouble $fPixelFloat $fPixelWord $fPixelWord32 $fPixelWord16 $fPixelWord8 $fPixelInt $fPixelInt32 $fPixelInt16int$fInterpolableBool$fInterpolableDouble$fInterpolableFloat$fInterpolableWord$fInterpolableWord32$fInterpolableWord16$fInterpolableWord8$fInterpolableInt$fInterpolableInt32$fInterpolableInt16vector-0.10.12.2Data.Vector.StorableVector$fConvertibleManifestDelayed$fConvertibleDelayedManifest$fConvertibleDelayedDelayed$fConvertibleManifestManifest$fFunctorImagesrcDelayedMask$fFromFunctionDelayedMask$fMaskedImageDelayedMask$fFunctorImagesrcDelayed$fFromFunctionDelayed$fImageDelayed$fMaskedImageDelayed$fFunctorImagesrcManifest$fFromFunctionManifest$fImageManifest$fMaskedImageManifest$fNFDataManifest$fInterpolableGreyPixel$fPixelGreyPixel$fInterpolableHSVPixel$fPixelHSVPixel$fStorableHSVPixel$fInterpolableRGBAPixel$fPixelRGBAPixel$fStorableRGBAPixel$fInterpolableRGBPixel$fPixelRGBPixel$fStorableRGBPixelsquaredouble$fToHistogramHSVPixel$fToHistogramRGBPixel$fToHistogramRGBAPixel$fToHistogramGreyPixel$fHistogramShape:.$fHistogramShapeZ rgbToGreyredLookupTablegreenLookupTableblueLookupTableword8$fConvertibleRGBPixelGreyPixel$fConvertibleRGBAPixelGreyPixel$fConvertibleGreyPixelGreyPixel$fConvertibleRGBAPixelRGBPixel$fConvertibleGreyPixelRGBPixel$fConvertibleRGBPixelRGBPixel$fConvertibleRGBPixelRGBAPixel$fConvertibleGreyPixelRGBAPixel$fConvertibleRGBAPixelRGBAPixel$fConvertibleHSVPixelRGBAPixel$fConvertibleRGBAPixelHSVPixel$fConvertibleHSVPixelRGBPixel$fConvertibleRGBPixelHSVPixel$fConvertibleHSVPixelHSVPixelGHC.STST$fMutableImageMutableManifestratioGHC.Real Fractional$fFilterablesrcresFilter$fFilterablesrcresFilter0$fFilterablesrcresFilter1$fFilterablesrcresFilter2"$fSeparatelyFiltrablesrcDelayedacc#$fSeparatelyFiltrablesrcManifestaccGHC.IntInt32varianceNorthWestSouthEastNorthEastSouthWestWestEast NorthSouthGHC.EnummaxBoundminBound EdgeDirection