newsletter archives - June, 2004

Volume 9. Issue 6.

Previous

[page 1][page 2][page 3]

Next
Passing a Custom Parameter with the Black Ice Printer Drivers

The Black Ice printer driver can launch an application before or after printing. When the application is launched after printing, the driver can pass several command line parameters to the application. The 3rd party application can parse the command line and process the information passed in the command line parameters. Until now the following available command line parameters were:

  • · Document Name

  • · Group file name

  • · Printer name

  • · Number of pages printed

  • · Multipage image or not

  • · Page orientation (Portrait or Landscape)

As a new option in addition to the existing parameters now it is possible to pass a custom parameter. The parameter is ‘custom’ because it can contain any value or string, up to 260 characters in length.

The order in which the parameter will be passed to the application can be changed.

Also, if some parameters are not necessary, checking the Remove Parameters option can disable them. 

The value of the custom parameter can be set manually through the user interface, programmatically through the BlackIceDEVMODE.OCX and BlackIceDEVMODE.DLL controls or at install time using the INI file (I.e.: BiCIiniNT.ini in the case or the Black Ice Color Printer Driver).

The custom parameter option creates great flexibility for developers who may need to process the output images based on different criteria. For example, passing the name of the department which generated the images will enable the application to process the images differently from one department to another.

Document Imaging SDK Image Processing

Filtering a noisy scanned hand written image

 

The original image

The original image is a scanned, hand written image with a strong additive noise due to the scanning process and the poor quality of the original paper. Images such as the one used in this example can be filtered in order to remove the noise from it.

It is important to note that simple filtering alone cannot create wonders, and it’s also important to bear in mind that none of the filtering methods are able to make a new image containing more information than the original. After filtering we always lose some information, but if the filtering is chosen well then the information that we need stays on the image, and we lose the noise. A filtering method is only able to create a new image where the information important to us appears stronger than before the filtering.

One of the best filters (in these special cases like this example) for removing additive, salt and pepper noise is a very simple filtering method called the Median filter.

Median filtered image with 2x2 sized matrix

Using the Median filter, the additive salt and pepper noise is removed, but we also lost some information from the handwriting itself. In this case a 2x2 sized matrix was used for the Median filtering due to the small size of the noise regions. The larger the matrix size, the more noise is removed, but also more information is lost from the important parts of the image. So the best solution is to find a middle ground that removes the most noise while preserving the most image integrity.

In the next step, the errors in the hand writing generated by the Median filter should be fixed. This image contains only black and white pixels. There are many excelent filtering methods for these binary images as they are called, but unfortunately the original images are not always binary. So the image should be binarized now.

Binarized image with Floyd-Steinberg error diffusion dithering

For binarization, the Floyd-Steinberg error diffusion dithering method was used. On the already binarized image the holes in the hand writing due to the Median filter could be filled up with a binary Dilation filter. Dilation filter makes the lines stronger, fills up the small holes and make the lines continuous. In this example a 3x3 sized full one matrix was used for dilation.

The final filtered image after dilation (above) and the original image (below)

The Black Ice Document Imaging SDK/ActiveX includes many powerful filters and effects to perform a wide range of image correction and processing, including the functionality listed in the above article.

Next

 
 © Black Ice Software, LLC 1989-2005   Contact Us: 603-673-1019 or Sales@BlackIce.com