Overview
ALIBVector is a simplified version of the raster-vector conversion library supplied by Artlogic Co., Ltd. (released in 1999), which was released in August 2006.
While it omits vector editing features such as vertex and edge selection, deletion, addition, and movement from the full library,
it retains all the functions related to transformations such as contour vector conversion and centerline vector conversion.
There is no vector editing functionality, but for users who handle editing functions on their own CAD editing software, there are no inconveniences at all.
The transformation functionality has been improved to achieve the same level of functionality as the conventional API with a more concise API.
ALIBVector supports the following features.
- Outline Vector Conversion Function
This function converts the outline of a shape to a vector. It is called for planar shapes such as patterns or molds. The number of vertices can be controlled by parameters. Reducing the number of vertices reduces the data size but decreases the conversion accuracy. On the other hand, increasing the number of vertices improves the conversion accuracy. With the 2007 version upgrade, the accuracy has significantly improved.
- Centerline Vector Conversion Function
This function converts the centerline of a shape to a vector. It is called for line shapes. The number of vertices can be controlled by parameters.
- Merging Nearby Vertices
This function merges nearby vertices into one. It reduces the number of vertices without significantly affecting the accuracy.
- Removal of Unnecessary Vertices on Straight Lines
This function removes vertices that are unnecessary on straight lines. It reduces the number of vertices without significantly affecting the accuracy.
- Corner Sharpening
This function sharpens corners. When there are multiple vertices close to a corner, it rearranges the vertices to form a sharp corner.
- Circle Correction
This function searches for sets of vertices that are nearly circular and repositions them on a perfect circle.
- Intersection Correction
This function corrects intersections at crossroads or T-junctions to make the lines intersect at a single vertex.
- Spline Transformation
This function transforms polygons or polylines into splines.
- Arc Approximation
This function approximates the edges of polygons or polylines with arcs. The minimum and maximum radii control the arcs to be approximated. The straight portions become arcs with infinite radii, but they remain straight as they are due to the maximum radius. The results of the arc approximation can be obtained by the start and end points of the edge and the center coordinates and radius corresponding to the arc.
- Coordinate Access
It allows access to the vertex coordinates of polygons and polylines. Access at the edge level is also possible. If arc approximation is performed, the access at the edge level allows obtaining the centers and radii of each arc corresponding to the edges.
- Save as DXF File
It saves all the polygons as a DXF file. It can output POLYLINE, LINE, and ARC entities. However, it does not support SPLINE entities. If a spline transformation is performed, it outputs the coordinate sequence along the spline curve as POLYLINE entities.
Version 2
The ALIBVector library was significantly upgraded in August 2007, improving the conversion accuracy and adding new features. It allows for higher quality conversion with significantly fewer vertices and performs at least five times faster than before.
- New feature: dashed line conversion
Dashed lines can now be recognized as a single dashed line object instead of separate short lines.
→After improvement![](alibvectorimage/dotline1.gif)
- New feature: point conversion
Isolated points can now be recognized as points.
→After improvement![](alibvectorimage/point1.gif)
- Speed improvement: Conversion speed increased by approximately 5 times
Measurement was conducted on topographic maps containing contour lines and map symbols larger than A0 size (25000x20000 pixels). The previous conversion time for line conversion was 150 seconds, but it has been improved to 27 seconds, which is 5 times faster. Conversion for maps with an area similar to A3 size can be done in 2-3 seconds.
- Accuracy improvement: Enhanced unnecessary vertex removal function on continuous line segments
Along with the improvement of the previous algorithm, a new algorithm has been introduced which removes unnecessary vertices if it does not affect the accuracy.
- Accuracy improvement: Improved conversion accuracy at T-junctions and crossings
→After improvement![](alibvectorimage/Tcross1.gif)
The occurrence of extra vertices near T-junctions and crossings has been dramatically reduced.
- Accuracy improvement: Improved coordinate accuracy
The coordinates now have better accuracy as they align closer to the endpoints, turning points, and intersections of line segments. This is achieved by moving them to the optimal position at the pixel level, resulting in a more faithful conversion.
- Accuracy improvement: Improved approximation accuracy of parallel lines running close to each other
The conversion accuracy near parallel lines that run close to each other has been improved through the enhancement of the emphasis processing for parallel lines and the improvement of processing for intersection points before and after the parallel lines.
→After improvement![](alibvectorimage/para1.gif)
- It is now possible to specify the conversion with an error of "within 1 pixel from the contour or centerline," surpassing the previous highest level of accuracy. Combined with the significant reduction of unnecessary vertices mentioned earlier, an overall improvement in conversion accuracy has been achieved.
→After improvement![](alibvectorimage/acc1.gif)
Additional features planned for Version 2 (not implemented as of January 11, 2008)
The following features are planned to be added in Version 2:
- Separation function for character shapes, line shapes, and fill shapes (Before automatic trace option)
Add a separation function for character shapes, line shapes, and fill shapes, similar to the raster editing library.
- Partial shape conversion function (After automatic trace option)
Add a function that converts only the shapes that are hooked to the specified rectangle (frame + interior) or the shapes inside the specified rectangle.
- Undo and redo support
Create APIs to store the current state of the library in a buffer and reflect the state of the buffer back to the library, in order to support undo and redo in the application. The buffer content is in a relocatable format that does not include address information, so it can be used for undo and redo using files or saving files in a proprietary format without any issues.
Automatic trace options
In the first quarter of 2008, the automatic trace function was added as an optional feature.
The automatic trace conversion generates polylines (lines joined together) automatically, connecting endpoints, intersections, and intersections along the coordinates specified by the user.
The parameters to control the behavior of automatic trace are the same as those used for contour vector conversion and backbone vector conversion.
user's manual