-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Compose a collage from overlapping image parts. In contrast to Hugin,
-- this is not intended for creating panoramas from multiple
-- photographies, but instead is specialised to creating highly accurate
-- reconstructions of flat but big image sources, like record covers,
-- posters or newspapers. It solves the problem that your scanner may be
-- too small to capture a certain image as a whole.
--
-- Restrictions:
--
--
-- - Only supports JPEG format.
-- - Images must be approximately correctly oriented.
-- - May have problems with unstructured areas in the image.
--
@package patch-image-llvm
module Option.Utility
parseNumber :: Read a => String -> (a -> Bool) -> String -> String -> IO a
exitFailureMsg :: String -> IO a
fmapArgDescr :: (a -> b) -> (ArgDescr a -> ArgDescr b)
fmapOptDescr :: (a -> b) -> (OptDescr a -> OptDescr b)
module KneadShape
-- | I choose a bit complicated Dim2 definition to make it distinct from
-- size pairs with width and height swapped. Alternatives would be
-- Index.Linear or intentionally complicated Shape types like:
--
-- type Dim0 = () type Dim1 = ((), Size) type Dim2 = ((), Size, Size)
--
-- Problems with Index.Linear is that it is fixed to Word32 dimensions
-- which causes trouble with negative coordinates that we encounter on
-- rotations.
--
-- The custom shape type requires lots of new definitions but it is
-- certainly the cleanest solution.
type Size = Int64
type Dim0 = ()
type Dim1 = Size
type Dim2 = Shape2 Size
type Ix2 = Index2 Size
data Vec2 tag i
Vec2 :: i -> i -> Vec2 tag i
vertical :: Vec2 tag i -> i
horizontal :: Vec2 tag i -> i
data ShapeTag
data IndexTag
type Shape2 = Vec2 ShapeTag
type Index2 = Vec2 IndexTag
squareShape :: n -> Vec2 tag n
castToElemPtr :: Ptr (Vec2 tag a) -> Ptr a
unzipShape :: T (Vec2 tag n) -> Vec2 tag (T n)
zipShape :: T n -> T n -> T (Vec2 tag n)
verticalVal :: Value val => val (Vec2 tag n) -> val n
horizontalVal :: Value val => val (Vec2 tag n) -> val n
instance Decompose p => Decompose (Vec2 tag p)
instance Compose n => Compose (Vec2 tag n)
instance (tag ~ ShapeTag, C i) => C (Vec2 tag i)
instance C i => C (Vec2 tag i)
instance Decompose pn => Decompose (Vec2 tag pn)
instance Compose n => Compose (Vec2 tag n)
instance C n => C (Vec2 tag n)
instance Storable n => Storable (Vec2 tag n)
module LinearAlgebra
absolutePositionsFromPairDisplacements :: Int -> [((Int, Int), (Float, Float))] -> ([(Double, Double)], [(Double, Double)])
leastSquaresSelected :: Matrix Double -> [Maybe Double] -> ([Double], [Double])
layoutFromPairDisplacements :: Int -> [((Int, (Float, Float)), (Int, (Float, Float)))] -> ([((Double, Double), Complex Double)], [(Double, Double)])
-- | This is an approach for stitching images at narrow bands along lines
-- of small image differences. We start with rotated and placed
-- rectangular image masks and then start to remove pixels from the
-- borders of the image masks in the order of decreasing pixel value
-- differences. For the sake of simplicity we calculate the difference of
-- a pixel value to the average of all pixel values at a certain
-- position. We do not recalculate the average if a pixel is removed from
-- the priority queue.
module MatchImageBorders
arrayCFromKnead :: Array Dim2 a -> IO (CArray (Int, Int) a)
arrayKneadFromC :: Storable a => CArray (Int, Int) a -> Array Dim2 a
findBorder :: (Ix i, Enum i, Ix j, Enum j) => CArray (i, j) Bool -> Set (i, j)
pqueueFromBorder :: Ix ix => CArray ix Float -> Set ix -> MaxPQueue Float ix
type Location = Word8
locOutside :: Location
locInside :: Location
locBorder :: Location
prepareLocations :: Ix ix => CArray ix Bool -> Set ix -> CArray ix Location
prepareShaping :: (Ix i, Enum i, Ix j, Enum j) => [(CArray (i, j) Bool, CArray (i, j) Float)] -> IO ([IOCArray (i, j) Location], MaxPQueue Float ((IOCArray (i, j) Location, CArray (i, j) Float), (i, j)))
shapeParts :: IOCArray (Int, Int) Int -> [IOCArray (Int, Int) Location] -> MaxPQueue Float ((IOCArray (Int, Int) Location, CArray (Int, Int) Float), (Int, Int)) -> IO [CArray (Int, Int) Bool]
module Arithmetic
inBox :: (Ord a, Num a) => (a, a) -> (a, a) -> Bool
rotatePoint :: Num a => (a, a) -> (a, a) -> (a, a)
rotateStretchMovePoint :: Fractional a => (a, a) -> (a, a) -> (a, a) -> (a, a)
rotateStretchMoveBackPoint :: Fractional a => (a, a) -> (a, a) -> (a, a) -> (a, a)
boundingBoxOfRotated :: (Num a, Ord a) => (a, a) -> (a, a) -> ((a, a), (a, a))
boundingBoxOfRotatedGen :: Num a => (a -> a -> a, a -> a -> a) -> (a, a) -> (a, a) -> ((a, a), (a, a))
canvasShape :: (RealFrac a, Integral i, PrintfArg a, PrintfArg i) => (image -> (i, i)) -> [Point2 a] -> [((a, a), image)] -> ((i, i), [((a, a), (a, a), image)], [String])
linearIp :: Num a => (a, a) -> a -> a
cubicIp :: Fractional a => (a, a, a, a) -> a -> a
data Vec a v
Vec :: v -> (v -> v -> v) -> (a -> v -> v) -> Vec a v
vecZero :: Vec a v -> v
vecAdd :: Vec a v -> v -> v -> v
vecScale :: Vec a v -> a -> v -> v
vecScalar :: Num a => Vec a a
linearIpVec :: Num a => Vec a v -> (v, v) -> a -> v
cubicIpVec :: Fractional a => Vec a v -> (v, v, v, v) -> a -> v
smooth3 :: Fractional a => (a, a, a) -> a
type Point2 a = (a, a)
type Line2 a = (Point2 a, Point2 a)
intersect :: (Ord a, Fractional a) => Line2 a -> Line2 a -> Maybe (Point2 a)
intersections :: (Fractional a, Ord a) => [Line2 a] -> [Line2 a] -> [Point2 a]
type Geometry i a = ((a, a), (a, a), (i, i))
geometryFeatures :: (Fractional a, Integral i) => Geometry i a -> (Geometry i a, [Point2 a], [Line2 a])
geometryRelations :: (RealFrac a, Integral i) => [(Geometry i a, [Point2 a], [Line2 a])] -> [(Geometry i a, [Geometry i a], [Point2 a])]
projectPerp :: Fractional a => Point2 a -> (Point2 a, Point2 a) -> (a, Point2 a)
distanceSqr :: Num a => Point2 a -> Point2 a -> a
distance :: Floating a => Point2 a -> Point2 a -> a
linearScale :: Fractional a => Int -> (a, a) -> [a]
minimumOverlapAbsFromPortion :: Integral i => Float -> (i, i) -> i
ceilingPow2 :: (Bits i, Integral i) => i -> i
ceilingSmooth7 :: (Bits i, Integral i) => i -> i
ceilingSmooth7_100 :: (Bits i, Integral i) => i -> i
-- | Rounds to the smallest number of the form 2^k*j, with k>=0 and
-- 1<=j<=10 that is at least as large as n.
ceilingSmooth7_10 :: (Bits i, Integral i) => i -> i
divideByMaximumPower :: Integral i => i -> i -> i
(^!) :: Num a => a -> Int -> a
isSmooth7NumberReduce :: Integral i => i -> Bool
isSmooth7NumberDiv :: Integral i => i -> Bool
propIsSmooth7Number :: Bool
correlationSize :: (Bits i, Integral i) => Float -> [(i, i)] -> (i, i)
divUp :: Integral a => a -> a -> a
pairFromComplex :: RealFloat a => Complex a -> (a, a)
mapComplex :: (a -> b) -> Complex a -> Complex b
mulConj :: RealFloat a => Complex a -> Complex a -> Complex a
module Option
data Args
Args :: Option -> [(Image, FilePath)] -> Args
option :: Args -> Option
inputs :: Args -> [(Image, FilePath)]
defltArgs :: Args
data Option
Option :: Verbosity -> Maybe FilePath -> Maybe FilePath -> Maybe FilePath -> Maybe FilePath -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Int -> Float -> Int -> Bool -> Int -> Int -> Float -> Float -> Bool -> Int -> Int -> Float -> Int -> Option
verbosity :: Option -> Verbosity
output :: Option -> Maybe FilePath
outputHard :: Option -> Maybe FilePath
outputShaped :: Option -> Maybe FilePath
outputShapedHard :: Option -> Maybe FilePath
outputOverlap :: Option -> Maybe String
outputDistanceMap :: Option -> Maybe String
outputShape :: Option -> Maybe String
outputShapeHard :: Option -> Maybe String
quality :: Option -> Int
maximumAbsoluteAngle :: Option -> Float
numberAngleSteps :: Option -> Int
radonTransform :: Option -> Bool
smooth :: Option -> Int
padSize :: Option -> Int
minimumOverlap :: Option -> Float
maximumDifference :: Option -> Float
finetuneRotate :: Option -> Bool
numberStamps :: Option -> Int
stampSize :: Option -> Int
distanceGamma :: Option -> Float
shapeSmooth :: Option -> Int
defltOption :: Option
data Image
Image :: Maybe Float -> Image
angle :: Image -> Maybe Float
defltImage :: Image
data Engine
Knead :: Engine
Accelerate :: Engine
type EngineSet = T Word8 Engine
knead :: EngineSet
generic :: EngineSet
accelerate :: EngineSet
type Description a = [OptDescr (a -> IO a)]
type EngineDescription a = [(EngineSet, OptDescr (a -> IO a))]
opt :: EngineSet -> [Char] -> [String] -> ArgDescr a -> String -> (EngineSet, OptDescr a)
optionDescription :: Description a -> EngineDescription Option
description :: Description (Image, Args) -> EngineDescription (Image, Args)
addFile :: FilePath -> ((Image, Args) -> IO (Image, Args))
get :: Engine -> IO Args
instance Eq Image
instance Eq Engine
instance Ord Engine
instance Enum Engine
module Main
type SmallSize = Word32
type Plane = Array Dim2
type SymbPlane = Array Dim2
type ColorImage a = Array Dim2 (YUV a)
type ColorImage8 = ColorImage Word8
type YUV a = (a, a, a)
shape2 :: Integral i => i -> i -> Dim2
readImage :: Verbosity -> FilePath -> IO ColorImage8
vectorStorableFrom :: (C sh, Storable a) => (ForeignPtr c -> ForeignPtr a) -> Array sh c -> Vector a
imageFromArray :: (PixelBaseComponent c ~ a, Storable a) => (ForeignPtr b -> ForeignPtr a) -> Array Dim2 b -> Image c
writeImage :: Int -> FilePath -> ColorImage8 -> IO ()
writeGrey :: Int -> FilePath -> Plane Word8 -> IO ()
colorImageExtent :: ColorImage8 -> (Size, Size)
fromInt :: (NativeInteger i ir, NativeFloating a ar) => Exp i -> Exp a
floatFromByte :: (NativeFloating a ar, PseudoRing a, Real a, RationalConstant a) => Exp Word8 -> Exp a
byteFromFloat :: (NativeFloating a ar, Field a, Real a, RationalConstant a) => Exp a -> Exp Word8
imageFloatFromByte :: (C array, C sh, NativeFloating a ar, PseudoRing a, Real a, RationalConstant a) => array sh Word8 -> array sh a
imageByteFromFloat :: (C array, C sh, NativeFloating a ar, Field a, Real a, RationalConstant a) => array sh a -> array sh Word8
yuvByteFromFloat :: (NativeFloating a ar, Field a, Real a, RationalConstant a) => Exp (YUV a) -> Exp (YUV Word8)
colorImageFloatFromByte :: (C array, C sh, NativeFloating a ar, PseudoRing a, Real a, RationalConstant a) => array sh (YUV Word8) -> array sh (YUV a)
colorImageByteFromFloat :: (C array, C sh, NativeFloating a ar, Field a, Real a, RationalConstant a) => array sh (YUV a) -> array sh (YUV Word8)
fastRound :: (NativeInteger i ir, NativeFloating a ar) => Exp a -> Exp i
splitFraction :: NativeFloating a ar => Exp a -> (Exp Size, Exp a)
ceilingToInt :: NativeFloating a ar => Exp a -> Exp Size
atomDim2 :: Shape2 (Atom i)
atomIx2 :: Index2 (Atom i)
dim2 :: Exp i -> Exp i -> Exp (Shape2 i)
ix2 :: Exp i -> Exp i -> Exp (Index2 i)
fromSize2 :: NativeFloating a ar => (Exp Size, Exp Size) -> (Exp a, Exp a)
indexLimit :: SymbPlane a -> Index2 (Exp Size) -> Exp a
limitIndices :: (C array, C sh) => Exp Dim2 -> array sh Ix2 -> array sh Ix2
shiftIndicesHoriz :: (C array, C sh) => Exp Size -> array sh Ix2 -> array sh Ix2
shiftIndicesVert :: (C array, C sh) => Exp Size -> array sh Ix2 -> array sh Ix2
type VecExp a v = Vec (Exp a) (Exp v)
vecYUV :: PseudoRing a => VecExp a (YUV a)
indexFrac :: (NativeFloating a ar, Real a, Field a, RationalConstant a) => VecExp a v -> SymbPlane v -> Index2 (Exp a) -> Exp v
indexFrac1 :: (NativeFloating a ar, Real a, Field a, RationalConstant a) => VecExp a v -> SymbPlane v -> Index2 (Exp a) -> Exp v
gatherFrac :: (NativeFloating a ar, Real a, Field a, RationalConstant a, C v) => VecExp a v -> SymbPlane v -> SymbPlane (Index2 a) -> SymbPlane v
gatherFrac_ :: (NativeFloating a ar, Real a, Field a, RationalConstant a, C v) => VecExp a v -> SymbPlane v -> SymbPlane (Index2 a) -> SymbPlane v
rotateStretchMoveCoords :: (Storable a, C a, Real a, Field a, RationalConstant a, NativeFloating a ar) => Exp (a, a) -> Exp (a, a) -> Exp Dim2 -> SymbPlane (a, a)
inRange :: Comparison a => Exp a -> Exp a -> Exp Bool
inBox :: Comparison a => (Exp a, Exp a) -> (Exp a, Exp a) -> Exp Bool
validCoords :: (NativeFloating a ar, Field a, Real a, RationalConstant a) => (Exp Size, Exp Size) -> SymbPlane (a, a) -> SymbPlane MaskBool
-- | rotateStretchMove rot mov first rotate and stretches the
-- image according to rot and then moves the picture.
rotateStretchMove :: (Storable a, C a, Real a, Field a, RationalConstant a, NativeFloating a ar, C v) => VecExp a v -> Exp (a, a) -> Exp (a, a) -> Exp Dim2 -> SymbPlane v -> SymbPlane (MaskBool, v)
rotate :: (Storable a, C a, Real a, Field a, RationalConstant a, NativeFloating a ar, C v) => VecExp a v -> Exp (a, a) -> SymbPlane v -> SymbPlane v
runRotate :: IO (Float -> ColorImage8 -> IO ColorImage8)
brightnessValue :: Exp (YUV a) -> Exp a
brightnessPlane :: (C array, C size) => array size (YUV a) -> array size a
rowHistogram :: (C array, Additive a) => array Dim2 (YUV a) -> array Dim1 a
tailArr :: C array => array Dim1 a -> array Dim1 a
differentiate :: (C array, Additive a) => array Dim1 a -> array Dim1 a
the :: Array () a -> Exp a
fold1All :: (C sh, C a) => (Exp a -> Exp a -> Exp a) -> Array sh a -> Exp a
scoreHistogram :: PseudoRing a => Array Dim1 a -> Exp a
runScoreRotation :: IO (Float -> ColorImage8 -> IO Float)
findOptimalRotation :: IO ([Float] -> ColorImage8 -> IO Float)
transpose :: SymbPlane a -> SymbPlane a
lowpassVert :: (Field a, Real a, RationalConstant a) => SymbPlane a -> SymbPlane a
lowpass :: (Field a, Real a, RationalConstant a) => SymbPlane a -> SymbPlane a
nestM :: Monad m => Int -> (a -> m a) -> a -> m a
lowpassMulti :: IO (Int -> Plane Float -> IO (Plane Float))
highpassMulti :: IO (Int -> Plane Float -> IO (Plane Float))
pad :: C a => Exp a -> Exp Dim2 -> SymbPlane a -> SymbPlane a
padCArray :: Storable a => a -> (Int, Int) -> CArray (Int, Int) a -> CArray (Int, Int) a
clipCArray :: Storable a => (Int, Int) -> CArray (Int, Int) a -> CArray (Int, Int) a
mapPairInt :: (Integral i, Integral j) => (i, i) -> (j, j)
correlatePaddedSimpleCArray :: FFTWReal a => (Int, Int) -> CArray (Int, Int) a -> CArray (Int, Int) a -> CArray (Int, Int) a
cyclicReverse2d :: Storable a => CArray (Int, Int) a -> CArray (Int, Int) a
untangleCoefficient :: RealFloat a => Complex a -> Complex a -> (Complex a, Complex a)
untangleSpectra2d :: (RealFloat a, Storable a) => CArray (Int, Int) (Complex a) -> CArray (Int, Int) (Complex a, Complex a)
correlatePaddedComplexCArray :: FFTWReal a => (Int, Int) -> CArray (Int, Int) a -> CArray (Int, Int) a -> CArray (Int, Int) a
-- | Should be yet a little bit more efficient than
-- correlatePaddedComplexCArray since it uses a real back
-- transform.
correlatePaddedCArray :: FFTWReal a => (Int, Int) -> CArray (Int, Int) a -> CArray (Int, Int) a -> CArray (Int, Int) a
liftCArray2 :: Storable a => (CArray (Int, Int) a -> CArray (Int, Int) a -> CArray (Int, Int) a) -> Plane a -> Plane a -> IO (Plane a)
type Id a = a -> a
fixArray :: Id (Array sh a)
prepareOverlapMatching :: IO (Int -> (Float, ColorImage8) -> IO ((Float, Float), Plane Float))
wrap :: Exp Size -> Exp Size -> Exp Size -> Exp Size
displacementMap :: Exp Size -> Exp Size -> Exp Dim2 -> SymbPlane (Size, Size)
attachDisplacements :: Exp Size -> Exp Size -> SymbPlane a -> SymbPlane (a, (Size, Size))
-- | Set all scores to zero within a certain border. Otherwise the matching
-- algorithm will try to match strong bars at the borders that are
-- actually digitalization artifacts.
minimumOverlapScores :: (Select a, PseudoRing a, IntegerConstant a, Real a) => ((Exp Size, Exp Size) -> Exp a -> Exp a) -> Exp Size -> (Exp Size, Exp Size) -> (Exp Size, Exp Size) -> SymbPlane (a, (Size, Size)) -> SymbPlane (a, (Size, Size))
allOverlapsFromCorrelation :: Dim2 -> Exp Float -> Exp Dim2 -> Exp Dim2 -> SymbPlane Float -> SymbPlane (Float, (Size, Size))
allOverlapsRun :: Dim2 -> IO (Float -> Plane Float -> Plane Float -> IO (Plane Word8))
argmax :: (Comparison a, Select a, Select b) => Exp (a, b) -> Exp (a, b) -> Exp (a, b)
argmaximum :: (C sh, Comparison a, Select a, Select b) => Array sh (a, b) -> Exp (a, b)
optimalOverlap :: Dim2 -> IO (Float -> Plane Float -> Plane Float -> IO (Float, (Size, Size)))
shrink :: (Field a, RationalConstant a, Real a, NativeFloating a ar) => Shape2 (Exp Size) -> SymbPlane a -> SymbPlane a
shrinkFactors :: Integral a => Dim2 -> Shape2 a -> Shape2 a -> Shape2 a
optimalOverlapBig :: Dim2 -> IO (Float -> Plane Float -> Plane Float -> IO (Float, (Size, Size)))
clip :: C a => (Exp Size, Exp Size) -> (Exp Size, Exp Size) -> SymbPlane a -> SymbPlane a
overlappingArea :: (Ord a, Num a) => Shape2 a -> Shape2 a -> (a, a) -> ((a, a), (a, a), (a, a))
optimalOverlapBigFine :: Dim2 -> IO (Float -> Plane Float -> Plane Float -> IO (Float, (Size, Size)))
optimalOverlapBigMulti :: Dim2 -> Dim2 -> Int -> IO (Float -> Float -> Plane Float -> Plane Float -> IO [(Float, (Size, Size), (Size, Size))])
overlapDifference :: (Algebraic a, RationalConstant a, Real a, NativeFloating a ar) => (Exp Size, Exp Size) -> SymbPlane a -> SymbPlane a -> Exp a
overlapDifferenceRun :: IO ((Size, Size) -> Plane Float -> Plane Float -> IO Float)
overlap2 :: (Field a, Real a, RationalConstant a, C v) => VecExp a v -> (Exp Size, Exp Size) -> (SymbPlane v, SymbPlane v) -> SymbPlane v
composeOverlap :: IO ((Size, Size) -> ((Float, ColorImage8), (Float, ColorImage8)) -> IO ColorImage8)
emptyCountCanvas :: IO (Dim2 -> IO (Plane (Word32, YUV Float)))
type MaskBool = Word8
maskFromBool :: Exp Bool -> Exp MaskBool
boolFromMask :: Exp MaskBool -> Exp Bool
intFromBool :: Exp MaskBool -> Exp Word32
type RotatedImage = ((Float, Float), (Float, Float), ColorImage8)
addToCountCanvas :: (PseudoRing a, NativeFloating a ar) => VecExp a v -> SymbPlane (MaskBool, v) -> SymbPlane (Word32, v) -> SymbPlane (Word32, v)
updateCountCanvas :: IO (RotatedImage -> Plane (Word32, YUV Float) -> IO (Plane (Word32, YUV Float)))
finalizeCountCanvas :: IO ((Plane (Word32, YUV Float)) -> IO ColorImage8)
diffAbs :: Real a => Exp a -> Exp a -> Exp a
diffWithCanvas :: IO (RotatedImage -> Plane (YUV Float) -> IO (Plane (MaskBool, Float)))
finalizeCountCanvasFloat :: IO ((Plane (Word32, YUV Float)) -> IO (Plane (YUV Float)))
emptyCanvas :: IO (Dim2 -> IO ColorImage8)
addMaskedToCanvas :: IO (RotatedImage -> Plane MaskBool -> Plane (YUV Word8) -> IO (Plane (YUV Word8)))
updateShapedCanvas :: IO (RotatedImage -> Plane Float -> Plane (Float, YUV Float) -> IO (Plane (Float, YUV Float)))
maybePlus :: C a => (Exp a -> Exp a -> Exp a) -> Exp (Bool, a) -> Exp (Bool, a) -> Exp (Bool, a)
maskedMinimum :: (C sh, C array, Real a) => array (sh, SmallSize) (Bool, a) -> array sh (Bool, a)
generate :: C sh => Exp sh -> (Exp (Index sh) -> Exp b) -> Array sh b
type Geometry a = Geometry Size a
distanceMapBox :: (Field a, NativeFloating a ar, Real a, RationalConstant a) => Exp Dim2 -> Exp (Geometry a) -> SymbPlane (Bool, (((a, (a, a)), (a, (a, a))), ((a, (a, a)), (a, (a, a)))))
distance :: (Algebraic a, Real a, IntegerConstant a) => Point2 (Exp a) -> Point2 (Exp a) -> Exp a
outerProduct :: (C sha, C shb, C array) => (Exp a -> Exp b -> Exp c) -> array sha a -> array shb b -> array (sha, shb) c
isZero :: (Comparison i, Integral i, IntegerConstant i) => Exp i -> Exp Bool
expEven :: (Comparison i, Integral i, IntegerConstant i) => Exp i -> Exp Bool
separateDistanceMap :: (C array, C sh, C a) => array sh (bool, ((a, a), (a, a))) -> array (sh, SmallSize) (bool, a)
containedAnywhere :: (C array, C sh, Field a, NativeFloating a ar, Real a, RationalConstant a) => array SmallSize (Geometry a) -> array sh (a, a) -> array sh Bool
distanceMapContained :: (RationalConstant a, NativeFloating a ar, PseudoRing a, Field a, Real a) => Exp Dim2 -> Exp (Geometry a) -> Array SmallSize (Geometry a) -> SymbPlane a
pixelCoordinates :: NativeFloating a ar => Exp Dim2 -> SymbPlane (a, a)
distanceMapPoints :: (C sh, C array, Real a, Algebraic a, IntegerConstant a) => array sh (a, a) -> array SmallSize (a, a) -> array sh a
-- | For every pixel it computes the distance to the closest point on the
-- image part boundary which lies in any other image. The rationale is
-- that we want to fade an image out, wherever is another image that can
-- take over. Such a closest point can either be a perpendicular point at
-- one of the image edges, or it can be an image corner or an
-- intersection between this image border and another image border. The
-- first kind of points is computed by distanceMapContained and
-- the second kind by distanceMapPoints. We simply compute the
-- distances to all special points and chose the minimal distance.
distanceMap :: (Algebraic a, Real a, RationalConstant a, NativeFloating a ar) => Exp Dim2 -> Exp (Geometry a) -> Array SmallSize (Geometry a) -> Array SmallSize (a, a) -> SymbPlane a
pow :: (Repr Value a ~ Value ar, IsFloating ar, TranscendentalConstant ar) => Exp a -> Exp a -> Exp a
distanceMapGamma :: (Algebraic a, Real a, RationalConstant a, NativeFloating a ar, TranscendentalConstant ar) => Exp a -> Exp Dim2 -> Exp (Geometry a) -> Array SmallSize (Geometry a) -> Array SmallSize (a, a) -> SymbPlane a
emptyWeightedCanvas :: IO (Dim2 -> IO (Plane (Float, YUV Float)))
addToWeightedCanvas :: (PseudoRing a, NativeFloating a ar) => VecExp a v -> SymbPlane (a, v) -> SymbPlane (a, v) -> SymbPlane (a, v)
updateWeightedCanvas :: IO (Float -> Geometry Float -> [Geometry Float] -> [Point2 Float] -> ColorImage8 -> Plane (Float, YUV Float) -> IO (Plane (Float, YUV Float)))
finalizeWeightedCanvas :: IO ((Plane (Float, YUV Float)) -> IO ColorImage8)
processOverlap :: Args -> [(Float, ColorImage8)] -> [((Int, (FilePath, ((Float, Float), Plane Float))), (Int, (FilePath, ((Float, Float), Plane Float))))] -> IO ([(Float, Float)], [((Float, Float), ColorImage8)])
processOverlapRotate :: Args -> [(Float, ColorImage8)] -> [((Int, (FilePath, ((Float, Float), Plane Float))), (Int, (FilePath, ((Float, Float), Plane Float))))] -> IO ([(Float, Float)], [((Float, Float), ColorImage8)])
process :: Args -> IO ()
rotateTest :: IO ()
scoreTest :: IO ()
main :: IO ()