예제 #1
0
        static void Main(string[] args)
        {
            // Create ByteScout.ImageFilters.ImageFilters object instance.
            ImageFilters imageFilters = new ImageFilters();

            // Load document.
            imageFilters.LoadDocument(@".\fax.tif");

            // APPLY FILTERS:

            // Fix orientation of rotated and flipped pages by analyzing text orientation.
            imageFilters.FixRotation();
            // Unrotate skewed pages.
            imageFilters.Deskew();
            // Remove speckles and noise.
            imageFilters.RemoveNoise();
            // Remove lines. This can improve the quality of optical character recognition (OCR).
            imageFilters.RemoveHorizontalLines();
            imageFilters.RemoveVerticalLines();


            // You can get a preview image after each modification to display to a user.
            Image previewImage = imageFilters.GetPreview();

            // Save improved image.
            imageFilters.SaveDocument(@".\fax.png");

            // Cleanup.
            imageFilters.Dispose();
        }