Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
BlankPageDetectorCommand Class
See Also  Members   Example 
Leadtools.ImageProcessing.Core Namespace : BlankPageDetectorCommand Class




Detects whether an image is a blank page. This command is available in the Document\Medical Toolkits.

Syntax

Visual Basic (Declaration) 
Public Class BlankPageDetectorCommand 
   Inherits RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As BlankPageDetectorCommand
C# 
public class BlankPageDetectorCommand : RasterCommand, IRasterCommand  
Managed Extensions for C++ 
public __gc class BlankPageDetectorCommand : public RasterCommand, IRasterCommand  
C++/CLI 
public ref class BlankPageDetectorCommand : public RasterCommand, IRasterCommand  

Example

Visual BasicCopy Code
ImageProcessing.Core.BlankPageDetectorCommand
   Public Sub BlankPageDetectorCommandExample()
      RasterCodecs.Startup()
      Dim codecs As New RasterCodecs()
      codecs.ThrowExceptionsOnInvalidImages = True

      Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Clean.tif")

      ' Prepare the command
      Dim command As BlankPageDetectorCommand = New BlankPageDetectorCommand
        'Determine whether the image is blank.
      command.Flags = BlankPageDetectorCommandFlags.DetectNoisyPage

      command.Run(leadImage)
      MessageBox.Show(" Is Blank : " & command.IsBlank & "\n Accuracy : " & (command.Accuracy * 1.0 / 100) & "%", "Blank Page Detection Results")


      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Core.BlankPageDetectorCommand 
      public void BlankPageDetectorCommandExample() 
      { 
         // Load an image 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
         codecs.ThrowExceptionsOnInvalidImages = true; 
 
         RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Clean.tif"); 
 
         // Prepare the command 
         BlankPageDetectorCommand command = new BlankPageDetectorCommand(); 
         //Determine whether the image is a blank page 
         command.Flags = BlankPageDetectorCommandFlags.DetectNoisyPage; 
         command.Run(image); 
 
         MessageBox.Show(" Is Blank   : " + command.IsBlank + "\n Accuracy : " + (command.Accuracy * 1.0 / 100) + "%", "Blank Page Detection Results"); 
 
         RasterCodecs.Shutdown(); 
      }

Remarks

  • For various reasons, documents being scanned can contain a significant number of blank pages. Disk storage space for the scanned items can be reduced if such pages can be removed before the documents are stored. This command detects whether a page is blank and returns an accuracy value. It can detect blank pages (despite noise, bleed-through, or lines) with high precision and speed.
  • This command does not support 12- or 16-bit grayscale or 48- or 64-bit color images, but will not throw an exception.
  • This command does not support signed data images.
  • This command does not support 32-bit grayscale images.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Core.BlankPageDetectorCommand

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also