!b8^y      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                          !"#$%&'()*+,-./01234567 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q rstuvwx((c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNoneX7hipA class with a set of convenient functions that allow for changing precision of channels within pixels, while scaling the values to keep them in an appropriate range.2let rgb = PixelRGB 0.0 0.5 1.0 :: Pixel RGB DoubletoWord8 <$> rgb<RGB:(0|128|255)>toWord16 <$> rgb<RGB:(0|32768|65535)>hipValues are scaled to [0, 255] range.hipValues are scaled to  [0, 65535] range.hipValues are scaled to [0, 4294967295] range.hipValues are scaled to [0, 18446744073709551615] range.hipValues are scaled to  [0.0, 1.0] range.hipValues are scaled to  [0.0, 1.0] range.hipValues are scaled from  [0.0, 1.0] range.yhipLower the precisionzhipIncrease the precision{hip9Convert to fractional with value less than or equal to 1.|hip@Convert to integral streaching it's value up to a maximum value.}hipClamp a value to [0, 1] range.~hip;Discards imaginary part and changes precision of real part.hipValues between  [0.0, 1.0]hipValues between  [0.0, 1.0]hipValues between [0, 9223372036854775807] on 64bithipValues between [0, 9223372036854775807]hipValues between [0, 2147483647]hipValues between  [0, 32767]hipValues between [0, 127]hipValues between [0, 18446744073709551615] on 64bithipValues between [0, 18446744073709551615]hipValues between [0, 4294967295]hipValues between  [0, 65535]]hipValues between  [0, 255]] }(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone%,=>?@AHSVXqIhip'Approach to be used near the borders during various transformations. Whenever a function needs information not only about a pixel of interest, but also about it's neighbours, it will go out of bounds around the image edges, hence is this set of approaches that can be used in such situtation.hipFill in a constant pixel. ( outside | Image | outside (" 0) : 0 0 0 0 | 1 2 3 4 | 0 0 0 0 hip2Wrap around from the opposite border of the image. ' outside | Image | outside # : 1 2 3 4 | 1 2 3 4 | 1 2 3 4 hip Replicate the pixel at the edge. ' outside | Image | outside # : 1 1 1 1 | 1 2 3 4 | 4 4 4 4 hipMirror like reflection. ' outside | Image | outside  : 4 3 2 1 | 1 2 3 4 | 4 3 2 1 hipBAlso mirror like reflection, but without repeating the edge pixel. ' outside | Image | outside   : 1 4 3 2 | 1 2 3 4 | 3 2 1 4 !hipArray representation that is actually has real data stored in memory, hence allowing for image indexing, forcing pixels into computed state etc.#hipGet a pixel at (i, j)$ location without any bounds checks.$hip+Make sure that an image is fully evaluated.%hip1Fold an image from the left in a row major order.&hip2Fold an image from the right in a row major order.'hipTCreate an Image by supplying it's dimensions and a monadic pixel generating action.(hipMonading mapping over an image.)hip4Monading mapping over an image. Result is discarded.*hipMonadic folding.+hip%Monadic folding. Result is discarded.,hip"Get dimensions of a mutable image.-hip!Yield a mutable copy of an image..hip$Yield an immutable copy of an image./hipNCreate a mutable image with given dimensions. Pixels are likely uninitialized.0hip$Yield the pixel at a given location.1hip Set a pixel at a given location.2hipSwap pixels at given locations.6hipNCreate an Image by supplying it's dimensions and a pixel generating function.8hipPCreate a scalar image, required for various operations on images with a scalar.9hipRetrieves a pixel at (0, 0) index. Useful together with 3*, when arbitrary initial pixel is needed.:hipMap a function over a an image.;hip8Map an index aware function over each pixel in an image.<hipZip two images with a function=hip+Zip two images with an index aware function>hipTraverse an image?hipTraverse two images.@hipTranspose an imageAhip"Backwards permutation of an image.BhipmConstruct an image from a nested rectangular shaped list of pixels. Length of an outer list will constitute m* rows, while the length of inner lists - nJ columns. All of the inner lists must be the same length and greater than 0.QfromLists [[PixelY (fromIntegral (i*j) / 60000) | j <- [1..300]] | i <- [1..200]])<Image VectorUnboxed Y (Double): 200x300> images/grad_fromLists.pngChipIPerform matrix multiplication on two images. Inner dimensions must agree.Dhip!Undirected reduction of an image.Ehip>Undirected reduction of an image with an index aware function.FhipPixelwise equality function of two images. Images are considered distinct if either images' dimensions or at least one pair of corresponding pixels are not the same. Used in defining an in instance for the  typeclass.Ghip3 class does not enforce an image to be represented as concrete array of pixels in memory, but if at any time it is desired for the image to be brought to a computed state, this function can be used.HhipEach array has a sibling 4 array representation, whichIhip Convert an image to a flattened 5+. For all current representations it is a O(1) opeartion.DtoVector $ makeImage (3, 2) (\(i, j) -> PixelY $ fromIntegral (i+j))XfromList [<Luma:(0.0)>,<Luma:(1.0)>,<Luma:(1.0)>,<Luma:(2.0)>,<Luma:(2.0)>,<Luma:(3.0)>]Jhip'Construct a two dimensional image with m rows and n columns from a flat 5 of length k,. For all current representations it is a O(1) opeartion. Make sure that  m * n = k.NfromVector (200, 300) $ generate 60000 (\i -> PixelY $ fromIntegral i / 60000)<Image Vector Luma: 200x300> images/grad_fromVector.pngKhip,Base array like representation for an image.Lhip9Required array specific constraints for an array element.Mhip Underlying image representation.NhipGet dimensions of an image.)frog <- readImageRGB VU "images/frog.jpg"frog+<Image VectorUnboxed RGB (Double): 200x320> dims frog (200,320)Ohip)A color space that supports transparency.Phip3A corresponding opaque version of this color space.Qhip,Get an alpha channel of a transparant pixel.Rhip(Add an alpha channel to an opaque pixel. 1 addAlpha 0 (PixelHSI 1 2 3) == PixelHSIA 1 2 3 0ShipLConvert a transparent pixel to an opaque one by dropping the alpha channel. 0 dropAlpha (PixelRGBA 1 2 3 4) == PixelRGB 1 2 3VhipmConvert a Pixel to a representation suitable for storage as an unboxed element, usually a tuple of channels.Whip6Convert from an elemnt representation back to a Pixel.XhipLConstrut a Pixel by replicating the same value across all of the components.Yhip Retrieve Pixel's component valueZhipSet Pixel's component value[hip9Map a channel aware function over all Pixel's components.\hip,Map a function over all Pixel's componenets.]hipZip two Pixels with a function.^hip(Left fold on two pixels a the same time._hip'Right fold over all Pixel's components.`hip-Left strict fold over all Pixel's components.chip>A Pixel family with a color space and a precision of elements.dhip;Run a stateful monadic computation that generates an image.ehip9Exchange the underlying array representation of an image.fhipBorder handling function. If (i, j) location is within bounds, then supplied lookup function will be used, otherwise it will be handled according to a supplied border strategy.ghipGet a pixel at i-th and j -th location.Ylet grad_gray = makeImage (200, 200) (\(i, j) -> PixelY $ fromIntegral (i*j)) / (200*200)8index grad_gray (20, 30) == PixelY ((20*30) / (200*200))TruehhipOImage indexing function that returns a default pixel if index is out of bounds.ihipbImage indexing function that uses a special border resolutions strategy for out of bounds pixels.jhip%Image indexing function that returns  if index is out of bounds,  px otherwise.khip%2D to a flat vector index conversion.Note': There is an implicit assumption that j < nlhip#Flat vector to 2D index conversion.'hip(m rows, n& columns) - dimensions of a new image.hipA function that takes (i -th row, and jD-th column) as an argument and generates a pixel for that location.6hip(m rows, n& columns) - dimensions of a new image.hipA function that takes (i -th row, and jB-th column) as an argument and returns a pixel for that location.7hip(m rows, n& columns) - dimensions of a new image.hipStarting indexhipSize of the windowhip%Function that generates inner pixels.hip%Function that generates border pixels:hipnA function that takes a pixel of a source image and returns a pixel for the result image a the same location.hip Source image.hip Result image.;hipA function that takes an index (i, j)^, a pixel at that location and returns a new pixel at the same location for the result image.hip Source image.hip Result image.>hip Source image.hipXFunction that takes dimensions of a source image and returns dimensions of a new image.hipSFunction that receives a pixel getter (a source image index function), a location (i, j)7 in a new image and returns a pixel for that location.?hipFirst source image.hipSecond source image.hip4Function that produces dimensions for the new image.hip0Function that produces pixels for the new image.AhipDimensions of a result image.hipMFunction that maps an index of a result image to an index of a source image.hip Source image.hip Result image.Dhip An associative folding function.hipFInitial element, that is neutral with respect to the folding function.hip Source image.EhipfFunction that takes an accumulator, index, a pixel at that index and returns a new accumulator pixel.hipFInitial element, that is neutral with respect to the folding function.hip Source image.ehipNew representation of an image.hip Source image.fhipBorder handling strategy.hipImage dimensionshipImage's indexing function.hip(i, j) location of a pixel lookup.khipn columnship(i, j) row, column indexhipFlat vector indexlhipn columnshipFlat vector indexhip(i, j) row, column index[ !"&-.#0(/)2%1*+$',354>;:D<@FIJ?A=6BC789EGHKMLNOPQRSTUXVWYZ[\]^_`abcdefghijklm[cTUXVWYZ[\]^_`abOPQRSKMLN354>;:D<@FIJ?A=6BC789EGH!"&-.#0(/)2%1*+$',deghij fklm(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 2=>?@AHVXl {hip%YCbCr color space with Alpha channel.|hip$Luma component (commonly denoted as Y')}hip Blue difference chroma component~hipRed difference chroma componenthipAlpha component.hipNColor space is used to encode RGB information and is used in JPEG compression.hip$Luma component (commonly denoted as Y')hip Blue difference chroma componenthipRed difference chroma component c{|}~(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 2=>?@AHVXhipLuma with Alpha channel.hipLumahip Alpha channelhip0Luma or brightness, which is usually denoted as Y'.c(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 2=>?@AHVX+hip3Red, Green and Blue color space with Alpha channel.hip Red, Green and Blue color space. c(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 2=>?@AHVX֕ hip=Hue, Saturation and Intensity color space with Alpha channel.hipHuehip Saturationhip IntensityhipAlphahip*Hue, Saturation and Intensity color space.hipHuehip Saturationhip Intensity c(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone> hipPConstrcut a complex pixel from two pixels representing real and imaginary parts.  PixelRGB 4 8 6  PixelRGB 7 1 1 == PixelRGB (4  7) (8  1) (6  1)hip*Extracts the real part of a complex pixel.hip/Extracts the imaginary part of a complex pixel.hipBForm a complex pixel from polar components of magnitude and phase.hip t9 is a complex pixel with magnitude 1 and phase t (modulo 2*).hip The function  takes a complex pixel and returns a (magnitude, phase) pair of pixels in canonical form: the magnitude is nonnegative, and the phase in the range (-, ]1; if the magnitude is zero, then so is the phase.hip-The nonnegative magnitude of a complex pixel.hip+The phase of a complex pixel, in the range (-, ]2. If the magnitude is zero, then so is the phase.hip!The conjugate of a complex pixel. 6(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 2=>?@AHVX~ hip?Cyan, Magenta, Yellow and Black color space with Alpha channel.hipCyanhipMagentahipYellowhip Key (Black)hipAlphahip,Cyan, Magenta, Yellow and Black color space.hipCyanhipMagentahipYellowhip Key (Black)c(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone >@AHVhipUnboxing of a c.(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone%>hipPBicubic interpolation method. The parameter is usually set from -0.5 to -1.0.hipBilinear interpolation method.hip&Nearest Neighbor interpolation method.hip+Implementation for an interpolation method.hipCConstruct a new pixel by using information from neighboring pixels.hipInterpolation methodhipBorder resolution strategyhipImage dimensions m rows and n columns.hip(Lookup function that returns a pixel at ith and j th location.hipReal values of i and j index(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone%@AMhipDownsample an image. Drop all rows and colums that satisfy the predicates. For example, in order to discard every 5th row and keep every even indexed column:*frog <- readImageRGB RPU "images/frog.jpg"7displayImage $ downsample ((0 ==) . (`mod` 5)) odd frog images/frog.jpg images/frog_downsampled.jpghipUpsample an image by inserting rows and columns with zero valued pixels into an image. Supplied functions specify how many rows/columns shoud be inserted (before, after) a particular row/column. Returning a negative value in a tuple will result in an error. E.g. insert 2 columns before and 4 columns after every 10th column, while leaving rows count unchanged:*frog <- readImageRGB RPU "images/frog.jpg"_displayImage $ upsample (const (0, 0)) (\ k -> if k `mod` 10 == 0 then (2, 4) else (0, 0)) frog images/frog.jpg images/frog_upsampled.jpghip0Downsample an image by discarding every odd row.hip3Downsample an image by discarding every odd column.hipVUpsample an image by inserting a row of back pixels after each row of a source image.hip\Upsample an image by inserting a column of back pixels after each column of a source image.hip_Concatenate two images together into one. Both input images must have the same number of rows.hipbConcatenate two images together into one. Both input images must have the same number of columns.hip2Shift an image towards its bottom right corner by (delatM, deltaN)B rows and columns, while specifying a border resolution strategy.)frog <- readImageRGB VU "images/frog.jpg"KwriteImage "images/frog_translate_wrap.jpg" $ translate Wrap (50, 100) frogKwriteImage "images/frog_translate_edge.jpg" $ translate Edge (50, 100) frog images/frog.jpg  images/frog_translate_wrap.jpg images/frog_translate_edge.jpghipChange the size of an image. Pixel values and positions will not change, except the ones outside the border, which are handled according to supplied resolution strategy. images/logo_40.pngvFor example, it can be used to make a tile from the image above, or simply scale the canvas and place it in a middle:-logo <- readImageRGBA VU "images/logo_40.png"5let incBy (fm, fn) = (rows logo * fm, cols logo * fn)HwriteImage "images/logo_tile.png" $ canvasSize Wrap (incBy (6, 10)) logoqwriteImage "images/logo_center.png" $ translate (Fill 0) (incBy (2, 3)) $ canvasSize (Fill 0) (incBy (5, 7)) logo images/logo_tile.png images/logo_center.pnghip5Crop an image, i.e. retrieves a sub-image image with m rows and n columns. Make sure (i + m, j + n)Y is not greater than dimensions of a source image, otherwise it will result in an error.hipcPlace one image on top of a source image, starting at a particular location within a source image.hipFlip an image vertically.)frog <- readImageRGB VU "images/frog.jpg"/writeImage "images/frog_flipV.jpg" $ flipV frog images/frog.jpg images/frog_flipV.jpghipFlip an image horizontally.)frog <- readImageRGB VU "images/frog.jpg"/writeImage "images/frog_flipH.jpg" $ flipH frog images/frog.jpg images/frog_flipH.jpghip!Rotate an image clockwise by 90.)frog <- readImageRGB VU "images/frog.jpg"5writeImage "images/frog_rotate90.jpg" $ rotate90 frog images/frog.jpg images/frog_rotate90.jpghipRotate an image by 180.)frog <- readImageRGB VU "images/frog.jpg"7writeImage "images/frog_rotate180.jpg" $ rotate180 frog images/frog.jpg images/frog_rotate180.jpghip"Rotate an image clockwise by 270.)frog <- readImageRGB VU "images/frog.jpg"7writeImage "images/frog_rotate270.jpg" $ rotate270 frog images/frog.jpg images/frog_rotate270.jpghip3Rotate an image clockwise by an angle  in radians.*frog <- readImageRGBA VU "images/frog.jpg"PwriteImage "images/frog_rotate330.png" $ rotate Bilinear (Fill 0) (11*pi/6) frog images/frog.jpg images/frog_rotate330.pnghip.Resize an image using an interpolation method.)frog <- readImageRGB VU "images/frog.jpg"JwriteImage "images/frog_resize.jpg" $ resize Bilinear Edge (100, 640) frog images/frog_resize.jpghip_Scale an image. Same as resize, except scaling factors are supplied instead of new dimensions.  scale   (0.5, 2) frog == resize   (100, 640) froghipPut an angle into  [0, 2*pi) range.hip Make sure  sin' pi == 0 instead of  sin pi == 1.2246467991473532e-16hip Make sure cos' (pi/2) == 0 instead of #cos (pi/2) == 6.123233995736766e-17 and cos' (3*pi/2) == 0 instead of 'cos (3*pi/2) == -1.8369701987210297e-16hipRows predicatehipColumns predicatehip Source imagehipBorder resolution strategyhip4Number of rows and columns image will be shifted by.hipBorder resolution strategyhipNew dimensions of the imagehip Source imagehip(i, j)+ starting index from within a source image.hip(m, n) dimensions of a new image.hip Source image.hip(i, j)+ starting index from within a source image.hip.Image to be positioned above the source image.hip Source image.hipInterpolation method to be usedhipBorder handling strategyhipAngle in radianship Source imagehip Rotated imagehip/Interpolation method to be used during scaling.hipBorder handling strategyhipDimensions of a result image.hip Source image.hip Result image.hip/Interpolation method to be used during scaling.hipBorder handling strategyhipPositive scaling factors.hip Source image.(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone,>@AXRhipFast Fourier TransformhipInverse Fast Fourier Transformhip Check if  is a power of two.hipICompute the DFT of a matrix. Array dimensions must be powers of two else .(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone>b hipPConstruct a complex image from two images representing real and imaginary parts.)frog <- readImageRGB VU "images/frog.jpg" frog !+! 03<Image VectorUnboxed RGB (Complex Double): 200x320> frog !+! frog3<Image VectorUnboxed RGB (Complex Double): 200x320>hip*Extracts the real part of a complex image.hip/Extracts the imaginary part of a complex image.hipBForm a complex image from polar components of magnitude and phase.hip t9 is a complex image with magnitude 1 and phase t (modulo 2*).hip The function polar' takes a complex image and returns a (magnitude, phase) pair of images in canonical form: the magnitude is nonnegative, and the phase in the range (-, ]1; if the magnitude is zero, then so is the phase.hip-The nonnegative magnitude of a complex image.hip+The phase of a complex image, in the range (-, ]2. If the magnitude is zero, then so is the phase.hip!The conjugate of a complex image. 6(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableSafeg0hipBoob operator:  ((.).(.))hip!Strict version of boob operator:  ((.).(.))hipVery efficient loophipVery efficient monadic loop(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone=>?@AHSVXi`&(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone,2=>?@AHSVXlhipUnboxed 5 representation.M(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone,2=>?@AHSVXovhip Storable 5 representation.M(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone>@Aw$hipFilter out Pixels from an image that do not satisfy the predicate and convert a result into a flat unboxed vector with indexed Pixels.hipFilter out Pixels from an image that do not satisfy the index aware predicate and convert a result into a flat unboxed vector with indexed Pixels.hip The predicatehip Source imagehip The predicatehip Source imagekllk(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone 2=>?@AHVXrhipThis is a single channel colorspace, that is designed to separate Gray level values from other types of colorspace, hence it is not convertible to or from, but rather is here to allow operation on arbirtary single channel images. If you are looking for a true grayscale colorspace  ! should be used instead.hip0Separate a Pixel into a list of components with 3 pixels containing every component from the pixel.toPixelsX (PixelRGB 4 5 6)[<X:(4)>,<X:(5)>,<X:(6)>]hipCombine a list of  pixels into a Pixel with a specified channel order. Not the most efficient way to construct a pixel, but might prove useful to someone.6fromPixelsX [(RedRGB, 3), (BlueRGB, 5), (GreenRGB, 4)]<RGB:(3.0|4.0|5.0)>@fromPixelsX $ zip (enumFrom RedRGB) (toPixelsX $ PixelRGB 4 5 6)<RGB:(4.0|5.0|6.0)>hip5Apply a left fold to each of the pixels in the image.hipQCombination of zipWith and simultanious left fold on two pixels at the same time.hip-Separate an image into a list of images with 8 pixels containing every channel from the source image.&frog <- readImageRGB "images/frog.jpg"6let [frog_red, frog_green, frog_blue] = toImagesX frog4writeImage "images/frog_red.png" $ toImageY frog_red8writeImage "images/frog_green.jpg" $ toImageY frog_green6writeImage "images/frog_blue.jpg" $ toImageY frog_blue images/frog_red.jpg  images/frog_green.jpg images/frog_blue.jpghipCombine a list of images with Y pixels into an image of any color space, by supplying an order of color space channels.(For example here is a frog with swapped BlueRGB and GreenRGB channels.qwriteImage "images/frog_rbg.jpg" $ fromImagesX [(RedRGB, frog_red), (BlueRGB, frog_green), (GreenRGB, frog_blue)] images/frog.jpg images/frog_rbg.jpgIt is worth noting though, despite that separating image channels can be sometimes pretty useful, exactly the same effect as in example above can be achieved in a much simpler and a more efficient way:  :+ (\(PixelRGB r g b) -> PixelRGB r b g) frog c"(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone2=>?@AHVXhip1Under the hood, binary pixels are represented as , but can only take values of 0 or 1. Use / to construct a bit and / to construct a binary pixel.hipRepresents value  or 1? in binary. Often also called a foreground pixel of an object.hipRepresents value  or 02 in binary. Often also called a background pixel.hip Convert a  to a binary pixel.isOn (fromBool True)TruehipTest if Pixel's value is .hipTest if Pixel's value is .hipUnboxing of a .hipValues: 0 and 1 #(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone,2=>?@AHVX]hipExtent of array.hipWindow starting indexhip Window size.hipArray for internal elements.hipArray for border elements. $(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone,2=>?@AHVXhipRRepa Array representation backed by Unboxed Vector, which is computed in parallel.hipSRepa Array representation backed by Unboxed Vector, which is computed sequentially.M%(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone,2=>?@AHVXhipSRepa Array representation backed by Storable Vector, which is computed in parallel.hipTRepa Array representation backed by Storable Vector, which is computed sequentially.M(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone>@Ahip?Create a sequential unboxed image from a 2D Repa delayed array.hip=Create a parallel unboxed image from a 2D Repa delayed array.hip.Convert into Repa Unboxed array from an image.  (c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone %=>?@AX*hipConversion to {- from another color space with Alpha channel. hipConvert to an { pixel. hipConversion to  color space. hipConvert to an  pixel. hipConversion to . hip Convert to a  pixel.hipConversion to  color space.hip Convert to a  pixel.hipConversion to - from another color space with Alpha channel.hipConvert to an  pixel.hipConversion to  color space.hipConvert to an  pixel.hipConversion to - from another color space with Alpha channel.hipConvert to an  pixel.hipConversion to  color space.hipConvert to an  pixel.hip,Conversion to Luma from another color space.hip)Convert a pixel to Luma pixel with Alpha.hipConversion to Luma color space.hipConvert a pixel to Luma pixel.hip Convert to a Binary pixel.hip$Convert a Binary pixel to Luma pixelhip Convert to a Binary image.hip$Convert a Binary image to Luma image hipYCheck weather two Pixels are equal within a tolerance. Useful for comparing pixels with  or  precision.!hipConvert an image to Luma image."hip*Convert an image to Luma image with Alpha.#hipConvert to an  image.$hipConvert to an  image.%hipConvert to an  image.&hipConvert to an  image.'hip Convert to a  image.(hip Convert to a  image.)hipConvert to an  image.*hipConvert to an { image.+hipChange image precision to .,hipChange image precision to .-hipChange image precision to ..hipChange image precision to ./hipChange image precision to .0hipChange pixel precision to .5hipComputes Luma: + Y' = 0.299 * R' + 0.587 * G' + 0.114 * B' c{|}~      !"#$%&'()*+,-./0c!"#$%&' ( ) *  {|}~ +,-./0&(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone>@AXYhipJCorrelate an image with a kernel. Border resolution technique is required.hipPConvolution of an image using a kernel. Border resolution technique is required.Example using  ,https://en.wikipedia.org/wiki/Sobel_operatorSobel operator:(frog <- readImageY RPU "images/frog.jpg"Olet frogX = convolve Edge (fromLists [[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]) frogOlet frogY = convolve Edge (fromLists [[-1,-2,-1], [ 0, 0, 0], [ 1, 2, 1]]) frog7displayImage $ normalize $ sqrt (frogX ^ 2 + frogY ^ 2) images/frogY.jpg images/frog_sobel.jpghipKConvolve image's rows with a vector kernel represented by a list of pixels.hipNConvolve image's columns with a vector kernel represented by a list of pixels.hip%Approach to be used near the borders.hip Kernel image.hip Source image.(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone =>?@AHV hip+Used to specify direction for some filters.hip-Filter that can be applied to an image using .hipApply a filter to an imagehipCreate a Gaussian Filter.hipPCreate a Gaussian Blur filter. Radius will be derived from standard deviation: ceiling (2*sigma) and ] border resolution will be utilized. If custom radius and/or border resolution is desired,  can be used instead.hip:The Laplacian of an image highlights regions of rapid intensity change and is therefore often used for edge detection. It is often applied to an image that has first been smoothed with something approximating a Gaussian smoothing filter in order to reduce its sensitivity to noise. More info about the algo at 0https://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm images/yield.jpg images/yield_laplacian.pnghip'Laplacian of Gaussian' (LOG) filter is a two step process of smoothing an image before applying some derivative filter on it. This comes in need for reducing the noise sensitivity while working with noisy datasets or in case of approximating second derivative measurements.The LoG operator takes the second derivative of the image. Where the image is basically uniform, the LoG will give zero. Wherever a change occurs, the LoG will give a positive response on the darker side and a negative response on the lighter side. More info about the algo at 0https://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm images/yield.jpg images/yield_log.pnghipOThe Gaussian smoothing operator is a 2-D convolution operator that is used to blurj images and remove detail and noise. The idea of Gaussian smoothing is to use this 2-D distribution as a `point-spread' function, and this is achieved by convolution. Since the image is stored as a collection of discrete pixels we need to produce a discrete approximation to the Gaussian function before we can perform the convolution. More info about the algo at 4https://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm images/GSM_gsn_yield_IP.jpg images/GSM_gsn_yield_OP.pnghip$The mean filter is a simple sliding-window spatial filter that replaces the center value in the window with the average (mean) of all the pixel values in the window. The window, or kernel, can be any shape, but this one uses the most common 3x3 square kernel. More info about the algo at 0http://homepages.inf.ed.ac.uk/rbf/HIPR2/mean.htm images/yield.jpg images/yield_mean.pnghipThe unsharp-masking filter is a sharpening operator which derives its name from the fact that it enhances edges (and other high frequency components in an image) via a procedure which subtracts an unsharp, or smoothed, version of an image from the original image. It is commonly used in the photographic and printing industries for crispening edges. More info about the algo at 4https://homepages.inf.ed.ac.uk/rbf/HIPR2/unsharp.htm images/yield_gray.png images/yield_unsharpMasking.pnghipRadiushipSigmahipBorder resolution technique.hipSigma(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone%hipThis function magnifies an image by a positive factor and draws a grid around the original pixels. It is here simply as useful inspection tool.)frog <- readImageRGB VU "images/frog.jpg"SwriteImage "images/frog_eye_grid.png" $ pixelGrid 10 $ crop (51, 112) (20, 20) frog images/frog.jpg images/frog_eye_grid.pnghipMagnification factor.hip Source image.8 '  (c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone =>?@ACPVhip contains a convenient set of functions for binary image construction, which is done by comparing either a single pixel with every pixel in an image or two same size images pointwise. For example:'frog <- readImageY VU "images/frog.jpg"1frog .==. PixelY 0 -- (or: PixelY 0 .==. frog)2frog .<. flipH frog -- (or: flipH frog .>. frog)hip Pixel wise AND# operator on binary images. Unlike  this operator will also AND pixel componenets.hip Pixel wise OR# operator on binary images. Unlike  this operator will also OR pixel componenets.hip Pixel wise AND operator on binary images.hip Pixel wise OR operator on binary images.hip'Complement each pixel in a binary imagehip?Construct a binary image using a predicate from a source image.hipBConstruct a binary image using a predicate from two source images.hip3Threshold a source image with an applicative pixel.+yield <- readImageRGB VU "images/yield.jpg"dwriteImageExact PNG [] "images/yield_bin.png" $ thresholdWith (PixelRGB (>0.55) (<0.6) (<0.5)) yield images/yield.jpg images/yield_bin.pnghip?Compare two images with an applicative pixel. Works just like , but on two images.hip?Compare two images with an applicative pixel. Works just like , but on two images.hip-Join each component of a pixel with a binary  operator.hip-Join each component of a pixel with a binary  operator.hip+Disjunction of all pixels in a Binary imagehip+Conjunction of all pixels in a Binary imagehipErosion is defined as: {E = B " S = {m,n|S "B}gwriteImageExact PNG [] "images/figure_erode.png" $ pixelGrid 10 $ fromImageBinary $ erode struct figure images/figure.png eroded with  images/struct.png is images/figure_erode.pnghipDialation is defined as: {D = B " S = {m,n|S ")B"`"}kwriteImageExact PNG [] "images/figure_dialate.png" $ pixelGrid 10 $ fromImageBinary $ dialate struct figure images/figure.png dialated with  images/struct.png is images/figure_dialate.pnghipOpening is defined as: {B % S = (B " S) " S}ewriteImageExact PNG [] "images/figure_open.png" $ pixelGrid 10 $ fromImageBinary $ open struct figure images/figure.png opened with  images/struct.png is images/figure_open.pnghipClosing is defined as: {B % S = (B " S) " S}gwriteImageExact PNG [] "images/figure_close.png" $ pixelGrid 10 $ fromImageBinary $ close struct figure images/figure.png closed with  images/struct.png is images/figure_close.png hip Predicatehip Source image.hip PredicatehipFirst source image.hipSecond source image.hip5Pixel containing a thresholding function per channel.hip Source image.hip2Pixel containing a comparing function per channel.hip First image.hip second image.hip2Pixel containing a comparing function per channel.hip First image.hip second image.hipStructuring element.hipBinary source image.hipStructuring element.hipBinary source image.hipStructuring element.hipBinary source image.hipStructuring element.hipBinary source image.!!4444444444443232'(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone ,=>?@AHVb hip5Constraint type synonym for encoding a Complex image.hip*Image formats that can be written to file.hipEncode an image into .hip)Image formats that can be read from file.hipDecode an image from .hipImage file format. Helps in guessing image format using a file extension, as well as supplying format specific options during saving an image.hip@Options that can be used during writing an image in this format.hip-Default file extension for this image format.hipeKnown file extensions for this image format, if more than one is commonly used, eg. ".jpeg", ".jpg".hip;Checks if a file extension corresponds to the format, eg. isFormat ".png" PNG == TruehipNSpecial wrapper for formats that support encoding/decoding sequence of images.hip0Used during converting pixels between libraries.hipLWriting Complex images: places real part on the left side of imaginary part.((c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone =>?@AHVgxhip#Netpbm: portable pixmap image with .ppm extension.hip$Netpbm: portable graymap image with .pgm extension.hip#Netpbm: portable bitmap image with .pbm extension.)(c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone =>?@AHVt hip$Tagged Image File Format image with .tif or .tiff extension.hip6Truevision Graphics Adapter image with .tga extension.hip%Portable Network Graphics image with .png extension.hip,Joint Photographic Experts Group image with .jpg or .jpeg extension.hipHigh-dynamic-range image with .hdr or .pic extension.hip0Graphics Interchange Format animated image with .gif extension.hip'Graphics Interchange Format image with .gif extension.hipBitmap image with .bmp extension.hipImage is converted  color space prior to encoding.hipImage is converted  color space prior to encoding.hipImage is converted  color space prior to encoding.hipImage is converted  color space prior to encoding.?        (c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone ,=>?@AHV|ship1Constraint type synonym for all writable formats.hipQA collection of all image formats that can be written to file using images with  precision pixels.!hip1Constraint type synonym for all readable formats."hipCA collection of all image formats that can be read into HIP images.e         !"#$%&'()*f       "#$%&'()* !*(c) Alexey Kuleshevich 2016BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNoneJ    !"3Mc{|}~      !"#$%&'()*+,-./0      !"#$%&'()*3M!"  (c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone>X7hip:External viewing application to use for displaying images.8hip*Any custom viewer, which can be specified:FilePath# - to the actual viewer executable.[String]@ - command line arguments that will be passed to the executable.Int* - position index in the above list where  to an image should be injected9hip This function will try to guess an image format from file's extension, then it will attempt to decode it as such. It will fall back onto the rest of the supported formats and will try to read them regarless of file's extension. Whenever image cannot be decoded, H containing all errors for each attempted format will be returned, and T containing an image otherwise. Image will be read with a type signature specified:Nfrog <- readImage "images/frog.jpg" :: IO (Either String (Image VS RGB Word8))displayImage frog:hip Just like 9?, but will throw an exception if incorrect format is detected.;hipdThis function allows for reading all supported image in their exact colorspace and precision. Only 1 image representation can be read natively, but  +r can be use later to switch to a different representation. For instance, "frog.jpg" image can be read into it's  colorspace with  precision:QreadImageExact JPG "images/frog.jpg" :: IO (Either String (Image VS YCbCr Word8))'Right <Image VS YCbCr (Word8): 200x320>lThe drawback here is that colorspace and precision has to match exactly, otherwise it will return an error:OreadImageExact JPG "images/frog.jpg" :: IO (Either String (Image VS RGB Word8))Left "JuicyPixel decoding error: Input image is in YCbCr8 (Pixel YCbCr Word8), cannot convert it to RGB8 (Pixel RGB Word8) colorspace."Any attempt to read an image in a color space, which is not supported by supplied format, will result in a compile error. Refer to + class for all images that can be decoded.<hip Just like ;?, but will throw an exception if incorrect format is detected.=hip Just like 9s, this function will guess an output file format from the extension and write to file any image that is in one of , ,  or  color spaces with  precision. While doing necessary conversions the choice will be given to the most suited color space supported by the format. For instance, in case of a  format, an (M arr  ) would be written as RGBA16G, hence preserving transparency and using highest supported precision +. At the same time, writing that image in  format would save it in RGB8, since  is the highest precision  supports.>hip3Write an image in a specific format, while supplying any format specific options. Precision and color space, that an image will be written as, is decided from image's type. Attempt to write image file in a format that does not support color space and precision combination will result in a compile error.?hipAn image is written as a .tiffo file into an operating system's temporary directory and passed as an argument to the external viewer program.@hip;Displays an image file by calling an external image viewer.AhipMakes a call to an external viewer that is set as a default image viewer by the OS. This is a non-blocking function call, so it might take some time before an image will appear.Bhip5Default viewer is inferred from the operating system.Chip eog /tmp/hip/img.tiff (https://help.gnome.org/users/eog/stable/ Eye of GNOMEDhip .feh --fullscreen --auto-zoom /tmp/hip/img.tiff https://feh.finalrewind.org/FEHEhip gpicview /tmp/hip/img.tiff %http://lxde.sourceforge.net/gpicview/GPicViewFhip gimp /tmp/hip/img.tiff https://www.gimp.org/GIMP9hipFile path for an image;hip4A file format that an image should be read as. See #g:4Supported Image FormatshipLocation of an image.=hip*Location where an image should be written.hipAn image to write.>hip5A file format that an image should be saved in. See #g:4Supported Image Formatship"A list of format specific options.hip*Location where an image should be written.hipTAn image to write. Can be a list of images in case of formats supporting animation.?hipExternal viewer to usehipShould the call be blockinghipImage to displayAhipImage to be displayedu         !"#$%&'()*789:;<=>?@ABCDEF9:;<=>78A?@BCEDF (c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone>X HhipFor 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.Ihip'A single channel histogram of an image.KhipUVector containing pixel counts. Index of a vector serves as an original pixel value.Lhip:Name of the channel that will be displayed in the legend.MhipColor of a plotted line.Ohip.Get a pure colour representation of a channel.Phip2Create a histogram per channel with 256 bins each.QhipCGenerate a histogram with 256 bins for a single channel Gray image.Rhip*Discrete cumulative distribution function.Ship>Converts an image to Luma and performs histogram equalization.Thip'Write histograms into a PNG image file.)frog <- readImageRGB VU "images/frog.jpg"@writeHistograms "images/frog_histogram.svg" $ getHistograms frog images/frog_histogram.svgUhipODisplay image histograms using an external program. Works in a similar way as A.)frog <- readImageRGB VU "images/frog.jpg"&displayHistograms $ getHistograms froghipODisplay image histograms using an external program. Works in a similar way as ?.HIJKLMNOPQRSTUIJKLMHNOPQSRUT (c) Alexey Kuleshevich 2017BSD3%Alexey Kuleshevich <lehins@yandex.ru> experimental non-portableNone>ahip>Create an image with a specified representation and pixels of , precision. Note, that it is essential for 4 precision pixels to keep values normalized in the [0, 1]= range in order for an image to be written to file properly.llet grad_gray = makeImageR VU (200, 200) (\(i, j) -> PixelY (fromIntegral i) / 200 * (fromIntegral j) / 200) Because all cs and Ms are installed into , above is equivalent to:^let grad_gray = makeImageR RPU (200, 200) (\(i, j) -> PixelY $ fromIntegral (i*j)) / (200*200)CwriteImage "images/grad_gray.png" (grad_gray :: Image RPU Y Double)&Creating color images is just as easy.~let grad_color = makeImageR VU (200, 200) (\(i, j) -> PixelRGB (fromIntegral i) (fromIntegral j) (fromIntegral (i + j))) / 400-writeImage "images/grad_color.png" grad_color images/grad_gray.png images/grad_color.pngbhip Read image as luma (brightness).chipRead image as luma with Alpha channel.dhipRead image in RGB colorspace.ehip"Read image in RGB colorspace with Alpha channel.fhip#Get the number of rows in an image.)frog <- readImageRGB VU "images/frog.jpg"frog+<Image VectorUnboxed RGB (Double): 200x320> rows frog200ghip&Get the number of columns in an image.)frog <- readImageRGB VU "images/frog.jpg"frog+<Image VectorUnboxed RGB (Double): 200x320> cols frog320hhipSum all pixels in the image.ihip!Multiply all pixels in the image.jhip(Retrieve the biggest pixel from an imagekhip)Retrieve the smallest pixel from an imagelhip,Scales all of the pixels to be in the range [0, 1].mhipYCheck weather two images are equal within a tolerance. Useful for comparing images with  or  precision.nhipType restricted version of B9 that constructs an image using supplied representation.ohip0Generates a nested list of pixels from an image.  img == fromLists (toLists img)ahip Underlying image representation.hip(m rows, n& columns) - dimensions of a new image.hipA function that takes (i -th row, and jB-th column) as an argument and returns a pixel for that location.    !"3DCA@?>=<;:B6MNceghij{|}~      !"#$%&'()*+,-./0      !"#$%&'()*789:;<=>?@ABCDEFHIJKLMNOPQRSTUabcdefghijklmno7a6nBobcde=AfgNgjhi:;<=>?@ACDhijklme None>SXphip=Helper function for generating a list of random co-ordinates.qhipSalt and pepper noise or impulse noise is a form of noise seen on images. It is mainly caused by sharp and sudden disturbances in the image signal. q+ generates this particular type of noise by introducing a sparse distribution of white and black pixels in the input image. The level or intensity of the noise to be introduced is a parameter of this method and is scaled between 0 and 1, that is the input Noise Intensity has a domain : (0, 1). images/yield.jpg images/yield_snp.pngUsage :'img <- readImageY VU "images/yield.jpg"input1 <- getLineg <- newStdGen)let noiseLevel = (P.read input1 :: Float)!let snpImage :: Image VU Y Double)snpImage = saltAndPepper img noiseLevel g*writeImage "images/yield_snp.png" snpImageqhip"Noise Intensity -> Domain : (0, 1)hipInstance of RandomGenpqpqNone>SX&rhipMSome helper functions : | Trivial function for subtracting co-ordinate pairsshipICompute the sum of squares or dot product of a given pair of co-ordinatesthipConversion of pair fromIntegraluhipCompute magnitudevhipv computes the Linear Hough Transform and maps each point in the target image, (, ) to the average color of the pixels on the corresponding line of the source image (x,y) - space, where the line corresponds to points of the form (xcos + ysin = (rho))..The idea is that where there is a straight line in the original image, it corresponds to a bright (or dark, depending on the color of the background field) spot; by applying a suitable filter to the results of the transform, it is possible to extract the locations of the lines in the original image. images/yield.jpg images/yield_hough.pngUsage :$yield <- readImageRGB VU "yield.jpg"input1 <- getLineinput2 <- getLine$let thetaSz = (P.read input1 :: Int)#let distSz = (P.read input2 :: Int)%let houghImage :: Image VU RGB Double'houghImage = hough yield thetaSz distSz writeImage "test.png" houghImagerstuvrstuvNone>SX8JwhipISupplementary function for applying border resolution and a general mask.xhipx operates on small  contextual regions of the image. It enhances the contrast of each region and this technique works well when the distribution of pixel values is similar throughout the image.]The idea is to perform contrast enhancement in 'neighborhood region' of each pixel and the size of the region is a parameter of the method. It constitutes a characteristic length scale: contrast at smaller scales is enhanced, while contrast at larger scales is reduced (For general purposes, a size factor of 5 tends to give pretty good results). images/yield.jpg images/yield_ahe.pngUsage :'img <- readImageY VU "images/yield.jpg"input1 <- getLineinput2 <- getLine$let thetaSz = (P.read input1 :: Int)#let distSz = (P.read input2 :: Int)/let neighborhoodFactor = (P.read input2 :: Int)Olet aheImage = ahe img thetaSz distSz neighborhoodFactor :: Image VU RGB Double7writeImage "images/yield_ahe.png" (toImageRGB aheImage)xhipwidth of output imagehipheight of output imagehipneighborhood size factorwxwx,-.,-/,-0,-123423523623723823923:23:2;<2;=2;>2;?2;@,AB,ACDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~+!       """"""""" "!"""#"$$%$%$&$&%'%'%(%()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~&&&&                                    ''''''''''''''(((((())))))) ) ) ) ) ) ) ) ) ) ))))))))))))))))))) )!)")#)$)%)&)')()))*)+),)-)./0123456789:;<=>?@ABCDEFGHIJKLM N N O P Q R S T U V W X Y Z [ \ ] ^ _ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~        ,,,f,""#########v########################$ $ % %  ,,')))),,, , !""hip-1.5.6.0-LOXu1cTkIlw9Dfau2aJSHtGraphics.Image.ColorSpaceGraphics.Image.IO.FormatsGraphics.Image.InterfaceGraphics.Image.Processing!Graphics.Image.Processing.ComplexGraphics.Image.Interface.VectorGraphics.Image.Interface.Repa Graphics.Image.Processing.Filter Graphics.Image.Processing.BinaryGraphics.Image.IOGraphics.Image.IO.HistogramGraphics.ImageGraphics.Image.Processing.NoiseGraphics.Image.Processing.HoughGraphics.Image.Processing.Ahe!Graphics.Image.Interface.ElevatorGraphics.Image.ColorSpace.YCbCrGraphics.Image.ColorSpace.YGraphics.Image.ColorSpace.RGBGraphics.Image.ColorSpace.HSI!Graphics.Image.ColorSpace.ComplexGraphics.Image.ColorSpace.CMYK(Graphics.Image.Interface.Vector.Unboxing'Graphics.Image.Processing.Interpolation#Graphics.Image.Processing.Geometric)Graphics.Image.Processing.Complex.FourierGraphics.Image.Utils'Graphics.Image.Interface.Vector.Generic'Graphics.Image.Interface.Vector.Unboxed(Graphics.Image.Interface.Vector.StorableGraphics.Image.ColorSpace.XGraphics.Image.ColorSpace.LumaY Graphics.Image.ColorSpace.Binary%Graphics.Image.Interface.Repa.Generic%Graphics.Image.Interface.Repa.Unboxed&Graphics.Image.Interface.Repa.Storable%Graphics.Image.Processing.ConvolutionGraphics.Image.IO.Base Graphics.Image.IO.Formats.Netpbm%Graphics.Image.IO.Formats.JuicyPixelsGraphics.Image.TypesexchangebaseGHC.WordWord8Word16Word32Word64(JuicyPixels-3.3.5-3dchi3y0twKCr5nQV2tS2QCodec.Picture.ColorQuantUniform MedianMeanCutPaletteCreationMethodpaletteColorCountenableImageDitheringpaletteCreationMethodPaletteOptionsCodec.Picture.GifGifDelay LoopingRepeatLoopingForever LoopingNever GifLooping Data.Complex:+ComplexElevatortoWord8toWord16toWord32toWord64toFloattoDouble fromDoubleBorderFillWrapEdgeReflectContinueMArrayMImage unsafeIndex deepSeqImagefoldlfoldr makeImageMmapMmapM_foldMfoldM_mdimsthawfreezenewreadwriteswapArrayManifestVector makeImagemakeImageWindowedscalarindex00mapimapzipWithizipWithtraverse traverse2 transpose backpermute fromLists|*|foldfoldIxeqcompute toManifesttoVector fromVector BaseArray SuperClassImagedims AlphaSpaceOpaquegetAlphaaddAlpha dropAlpha ColorSpace Components toComponentsfromComponentspromotegetPxCsetPxCmapPxCliftPxliftPx2foldlPx2foldrPxfoldlPxfoldl1PxtoListPxPixel createImagehandleBorderIndexindex defaultIndex borderIndex maybeIndexfromIxtoIx checkDims $fNFDataPixel$fBoundedPixel$fFloatingPixel$fFractionalPixel $fNumPixel $fShowImage $fShowMImage $fNFDataImage$fFloatingImage$fFractionalImage $fNumImage $fEqImage $fShowBorderYCbCrA LumaYCbCrA CBlueYCbCrA CRedYCbCrA AlphaYCbCrAYCbCr LumaYCbCr CBlueYCbCr CRedYCbCr PixelYCbCrA PixelYCbCrYALumaYAAlphaYALumaYPixelYAPixelYRGBARedRGBA GreenRGBABlueRGBA AlphaRGBARGBRedRGBGreenRGBBlueRGB PixelRGBAPixelRGBHSIAHueHSIASatHSIAIntHSIA AlphaHSIAHSIHueHSISatHSIIntHSI PixelHSIAPixelHSI+:realPartimagPartmkPolarcispolar magnitudephase conjugateCMYKA CyanCMYKAMagCMYKAYelCMYKAKeyCMYKA AlphaCMYKACMYKCyanCMYKMagCMYKYelCMYKKeyCMYK PixelCMYKA PixelCMYKBicubicBilinearNearest Interpolation interpolate downsampleupsampledownsampleRowsdownsampleCols upsampleRows upsampleCols leftToRight topToBottom translate canvasSizecrop superimposeflipVflipHrotate90 rotate180 rotate270rotateresizescalefftifft!+! realPartI imagPartImkPolarIcisIpolarI magnitudeIphaseI conjugateIVUVSfilterifilterXPixelXgetX toPixelsX fromPixelsX squashWith squashWith2 toImagesX fromImagesXBittoNumfromNumzeroonebool2bitbit2boolonofffromBoolisOnisOffRPURSURPSRSSfromRepaArraySfromRepaArrayP toRepaArrayToYCbCrA toPixelYCbCrAToYCbCr toPixelYCbCrToCMYKA toPixelCMYKAToCMYK toPixelCMYKToHSIA toPixelHSIAToHSI toPixelHSIToRGBA toPixelRGBAToRGB toPixelRGBToYA toPixelYAToYtoPixelY toPixelBinaryfromPixelBinary toImageBinaryfromImageBinaryeqTolPxtoImageY toImageYA toImageRGB toImageRGBA toImageHSI toImageHSIA toImageCMYK toImageCMYKA toImageYCbCr toImageYCbCrAtoWord8I toWord16I toWord32ItoFloatI toDoubleI toWord8Px $fToYYCbCrAe $fToYYCbCre $fToYHSIAe $fToYRGBAe $fToYRGBe$fToYYAe$fToYYe$fToYXe $fToYAYCbCrAe $fToYAYCbCre $fToYACMYKAe $fToYACMYKe $fToYAHSIAe $fToYAHSIe $fToYARGBAe $fToYARGBe $fToYAYAe$fToYAYe $fToYAXBit $fToRGBCMYKAe $fToRGBCMYKe$fToRGBYCbCrAe $fToRGBYCbCre $fToRGBHSIAe $fToRGBHSIe $fToRGBRGBAe $fToRGBRGBe $fToRGBYAe $fToRGBYe $fToRGBXBit $fToYCMYKAe $fToYCMYKe $fToYHSIe$fToRGBAYCbCrAe$fToRGBAYCbCre$fToRGBACMYKAe $fToRGBACMYKe $fToRGBAHSIAe $fToRGBAHSIe $fToRGBARGBAe $fToRGBARGBe $fToRGBAYAe $fToRGBAYe $fToRGBAXBit $fToHSICMYKAe $fToHSICMYKe$fToHSIYCbCrAe $fToHSIYCbCre $fToHSIHSIAe $fToHSIHSIe $fToHSIRGBAe $fToHSIRGBe $fToHSIYAe $fToHSIYe$fToHSIAYCbCrAe$fToHSIAYCbCre$fToHSIACMYKAe $fToHSIACMYKe $fToHSIAHSIAe $fToHSIAHSIe $fToHSIARGBAe $fToHSIARGBe $fToHSIAYAe $fToHSIAYe$fToCMYKYCbCrAe$fToCMYKYCbCre$fToCMYKCMYKAe $fToCMYKCMYKe $fToCMYKHSIAe $fToCMYKHSIe $fToCMYKRGBAe $fToCMYKRGBe $fToCMYKYAe $fToCMYKYe$fToCMYKAYCbCrAe$fToCMYKAYCbCre$fToCMYKACMYKAe$fToCMYKACMYKe$fToCMYKAHSIAe $fToCMYKAHSIe$fToCMYKARGBAe $fToCMYKARGBe $fToCMYKAYAe $fToCMYKAYe$fToYCbCrCMYKAe$fToYCbCrCMYKe$fToYCbCrYCbCrAe$fToYCbCrYCbCre$fToYCbCrHSIAe $fToYCbCrHSIe$fToYCbCrRGBAe $fToYCbCrRGBe $fToYCbCrYAe $fToYCbCrYe$fToYCbCrAYCbCrAe$fToYCbCrAYCbCre$fToYCbCrACMYKAe$fToYCbCrACMYKe$fToYCbCrARGBAe$fToYCbCrAHSIAe$fToYCbCrAHSIe$fToYCbCrARGBe $fToYCbCrAYAe $fToYCbCrAYe correlateconvolve convolveRows convolveCols DirectionVertical HorizontalFilter applyFiltergaussianLowPass gaussianBlur sobelFilter sobelOperator prewittFilterprewittOperatorlaplacianFilter logFiltergaussianSmoothingFilter meanFilterunsharpMaskingFilter pixelGrid Thresholding!==!!/=!!!!>=!.==../=..<..<=..>..>=..&&..||.!&&!!||!inverttoImageBinaryUsingtoImageBinaryUsing2 threshold threshold2 thresholdWiththresholdWith2 compareWith disjunction conjunctionoranderodedialateopenclose$fThresholdingImagePixelarr$fThresholdingPixelImagearr$fThresholdingImageImagearrComplexWritableWritableencodeReadabledecode ImageFormat SaveOptionextextsisFormatSeq ConvertibleconvertPPMPGMPBMTIFTGAPNGJPGHDRGIFAGIFBMP JPGQuality GIFSeqPalette GIFSeqLoopingGIFSeqDisposal GIFAPalette GIFALooping GIFPalette toJPImageY8 toJPImageY16 toJPImageYA8 toJPImageYA16 toJPImageYF toJPImageRGB8toJPImageRGBA8toJPImageRGB16toJPImageRGBA16 toJPImageRGBFtoJPImageYCbCr8toJPImageCMYK8toJPImageCMYK16 fromJPImageY8fromJPImageY16fromJPImageYA8fromJPImageYA16fromJPImageRGB8 fromJPImageYFfromJPImageRGBA8fromJPImageRGB16fromJPImageRGBA16fromJPImageRGBFfromJPImageYCbCr8fromJPImageCMYK8fromJPImageCMYK16 AllWritable OutputFormat OutputBMP OutputGIF OutputHDR OutputJPG OutputPNG OutputTIF OutputTGA AllReadable InputFormatInputBMPInputGIFInputHDRInputJPGInputPNGInputTIFInputPNMInputTGA$fImageFormatInputFormat$fReadableImageInputFormat$fImageFormatOutputFormat$fWritableImageOutputFormat$fEqInputFormat$fShowInputFormat$fEnumInputFormat$fBoundedInputFormat$fEqOutputFormat$fShowOutputFormat$fEnumOutputFormat$fBoundedOutputFormatExternalViewer readImage readImage'readImageExactreadImageExact' writeImagewriteImageExactdisplayImageUsingdisplayImageFile displayImage defaultViewer eogViewer fehViewergpicviewViewer gimpViewer$fShowExternalViewer Histograms HistogramhBinshNamehColour ChannelColourcsColour getHistograms getHistogramcdfequalizeHistogramwriteHistogramsdisplayHistograms$fChannelColourYCbCrA$fChannelColourYCbCr$fChannelColourCMYKA$fChannelColourCMYK$fChannelColourHSIA$fChannelColourHSI$fChannelColourRGBA$fChannelColourRGB$fChannelColourYA$fChannelColourY$fChannelColourX makeImageR readImageY readImageYA readImageRGB readImageRGBArowscolssumproductmaximumminimum normalizeeqTol fromListsRtoLists randomCoords saltAndPeppersub dotProduct fromIntegralPmaghough simpleFilterahedropDownraiseUp squashTo1stretchclamp01$fElevatorComplex$fElevatorDouble$fElevatorFloat $fElevatorInt$fElevatorInt64$fElevatorInt32$fElevatorInt16$fElevatorInt8$fElevatorWord$fElevatorWord64$fElevatorWord32$fElevatorWord16$fElevatorWord8ghc-prim GHC.ClassesEq GHC.MaybeNothingJust GHC.Floatpi $fUnboxPixel&vector-0.12.1.2-E9YBdJZ4ywF23gc9L8wAxpData.Vector.Unboxed.BaseMVectorMV_PixelV_Pixel angle0to2pisin'cos' isPowerOfTwo GHC.TypesIntfft2dGHC.Errerror.:.:!looploopM_swapIxMVGImageVGImage makeImageVGdimsVGscalarVG index00VGmakeImageWindowedVGmapVGimapVG zipWithVG izipWithVGunsafeTraverseVG traverseVGunsafeTraverse2VG traverse2VG transposeVGunsafeBackpermuteVG backpermuteVG fromListsVGfoldlVGfoldrVGifoldlVG toVectorVG fromVectorVGmultVG unsafeIndexVG makeImageMVGmapMVGmapM_VGfoldMVGfoldM_VGmdimsVGthawVGfreezeVGnewVGreadVGwriteVGswapVGUnboxVUImageVSImageTrueFalseBool $fUnboxBit $fElevatorBit makeWindowedRImageStrategyParallel Sequentialsh2ixix2shdimsRmakeImageWindowedRfromRepaArrayRscalarRindex00RmapRimapRzipWithR izipWithR traverseRunsafeTraverseR traverse2RunsafeTraverse2R transposeR backpermuteRmultRcomputeRfoldRfoldIxReqRfromVectorUnboxedRtoVectorUnboxedRtoVectorStorableRfromVectorStorableRSUImagePUImageSSImagePSImageFloatDouble Data.Bits.|..&.bytestring-0.10.8.2Data.ByteString.Lazy.Internal ByteString$fWritableImageformat$fWritableImageJPG$fWritableImageJPG0$fWritableImageJPG1$fWritableImageJPG2GHC.IOFilePath Data.EitherLeftRightdisplayHistogramsUsingGHC.NumNum