Skip to main content Crate visioncortex Copy item path Source pub use bound::Bound ;pub use bound::BoundingRect ;pub use bound::BoundingRectF64 ;pub use bound::BoundStat ;pub use disjoint_sets::Forests ;pub use tile_map::TileMap ;bound Functions to compute and manipulate bounding rectangles clusters Algorithm to cluster a binary image color_clusters Algorithm to cluster a color image and build a tree of clusters disjoint_sets Contains functions and data structures for partitioning items into groups. polypartition Polygon triangulation (ear-clipping, monotone, optimal dynamic programming)
and hole removal. rasterizer reduce Path simplification algorithms adapted from https://github.com/mourner/simplify-js tile_map A 2D spatial index for collision detection. AverageShape Morphologically transforms a shape into another BinaryImage Image with 1 bit per pixel BinaryImageSampler For sampling and resizing binary images BitVec The bitvector type. Color RGBA; each channel is 8 bit unsigned ColorF64 RGB; each channel is 64 bit float ColorHsv HSV; each channel is 64 bit float ColorI32 RGB; each channel is 32 bit signed ColorImage Image with 4 bytes per pixel ColorImageIter Iterate over each pixel of ColorImage ColorStat Simple statistics of color samples ColorStatBuilder Compute simple statistics from color samples ColorSum RGBA; each channel is 32 bit unsigned CompoundPath A collection of Path and Spline that represents a shape with holes Field Vec<T> that represents a 2D fieldGrayscaleSampler Sampler for grayscale images via the red channel of a ColorImage . ImageEmbedding Intersection Matrix Matrix operations adapted from https://github.com/sloisel/numeric Path Path of generic points in 2D space PathSimplify PathWalker Walks the boundary of a BinaryImage with straight run optimization PerspectiveTransform A perspective transform can easily be used to map one 2D quadrilateral to another,
given the corner coordinates for the source and destination quadrilaterals. Point2 Generic point in 2D space Polar2 Polar coordinate in 2D space RectangularTransform Equivalent to a Homothetic transform SampleStat Sample statistics: (mean, mode, median and standard deviation) SampleStatBuilder Class to calculate SampleStat ScalarField Generalization of 2D array of pixels with any Item Shape A conceptual object represented by an image ShapeEncoding SimpleStat Simple statistics: (mean and standard deviation) SimpleStatBuilder Class to calculate SimpleStat Skeleton The skeleton of a binary image (aka medial axis) SpiralWalker Walks a square region in a spiral (clockwise; assuming top-left origin) manner,
starting from the center Spline Series of connecting 2D Bezier Curves SubdivideSmooth Handles Path Smoothing. SummedAreaTable A data structure to efficiently compute summed pixel values over regions in an image (repeatedly). ColorName Color names CompoundPathElement An element of a CompoundPath Dir PathSimplifyMode ShapeEncodingString ColorType NumberFormat PointType Sampler Common interface used by the shape encoding algorithm.
Returns a occupancy in [0, N], where N = region area (right-left) * (bottom-top). ToSvgString Transform Transformation of coordinate in space approximate_circle_with_spline bilinear_interpolate bilinear_interpolate_safe circular_arc note: the vector p_0 -> p_3 must be at 45 degrees
ap: the corner; to decide wich side to take from p_0 -> p_3
the center of the circular arc lies on the opposite side of ap find_intersection Given lines (p1, p2) and (p3, p4), returns their intersection.
If the two lines coincide, returns the mid-point of (p1, p2).
If the two lines are parallel, return None. MonoImage Image with grayscale values MonoImageItem Component of MonoImage PathF64 Path of 2D PointF64 PathI32 Path of 2D PointI32 PointF32 2D Point with f32 component PointF64 2D Point with f64 component PointI32 2D Point with i32 component PointU8 2D Point with u8 component PointUsize 2D Point with usize component PolarF64 2D Polar with f64 component