Recogniform - Tecnologie di riconoscimento ottico

 

Go to the Italian website


Black Border Removal Library (royalties free)

 buy on-line     Image Processor    download demo    download evaluation version    info  

Prima della Rimozione del Bordo scuro This black border removal sdk allows the  automatic  black  border  detection  and  removal in monochrome or grayscale images. The black border is produced in the images acquired by scanners when paper size is smaller than scanning area or in images acquired from microfilm, microfiches and aperture-cards. Removing the border from the images is a very important pre-processing step that improves the compression rate, reducing file size, and the visualization aspect.

AFTER BLACK BORDER REMOVALOther libraries usually allow you to detect and remove black border only in monochrome images, while Recogniform library allows user to remove black border both in grayscales and in color images !

Black border removal can be carried out in two distinct ways: either cropping the images orwhite colouring the border area. In the first way the image size is reduced to the effective size of paper, in the second way the image size still remains the same and the image is surrounded by a white extra area. The operation is performed in two steps: the border detection and the border elimination using one of the two available strategies.

You can also set: 

  • Black Percentage, a parameter indicating the minimum percentage of black pixels a line has to contain to be considered dark and, potentially, part of the border.

You have to supply a DIB (Device Independent Bitmap) in input to the process obviously .

The border identification and the border removal procedures are fast and accurate.

For testing this library you can download a demo application (400 KB) that allows you to use this function on your TIF images: please give us your feedback and your comments after the test !

 

AFTER BLACK BORDER REMOVAL - AFTER BLACK BORDER REMOVAL

Here is source code in Microsoft Visual C++ of a sample application using the black border removal library:

#include "stdafx.h"
#include "stdio.h"
#include "recoautocrop.c"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{ 	

 // Load dynamically the library
 LoadAutoCropLibrary();

 // Init the AUTOCROP session
 int Session= AUTOCROP_Init("demo", "demo");

 long hBitmap = 0;

 // Check if a DIB is available in clipboard
 bool bAvail= IsClipboardFormatAvailable(CF_DIB);

 if (bAvail)
  {

   // Open the Clipboard
   ::OpenClipboard(NULL);
	
   // Retrieve the DIB from clipboard 
   hBitmap = (long) GetClipboardData(CF_DIB);

   RECT Page;
	
   // Detect the black border on the DIB
   AUTOCROP_FindBlackBorder(Session, (long) hBitmap, 99.5, &Page);

   // Remove the black border resizing the DIB
   AUTOCROP_Crop(Session, (long) hBitmap, Page);

   // or you could remove the black border blanking it
   //AUTOCROP_Clean(Session, (long) hBitmap, Page);
 
   ::EmptyClipboard();

   // Set the cropped DIB to clipboard
   SetClipboardData(CF_DIB, (void*)hBitmap);

   // Close the Clipboard	
   ::CloseClipboard();

   char  buffer[200];

   sprintf( buffer, "Black Border Removed !
     You can paste the processed image in your application...");

   // Show the result
   MessageBox(NULL, buffer, "RESULT", MB_OK);
	

  }
  // Show an error message
  else MessageBox(NULL, "Unable to paste DIB", "ERROR", MB_OK);

 // Close the session
 AUTOCROP_Done(Session);

 // Unload the library	
 FreeAutoCropLibrary();

return 0;
}

Pricing & Ordering Info
The price of this library is EUR 599,00. The library is royalties free till 1000 runtimes, so it can be distributed with any end-user application without paying licenses fee: if you need to distribute a larger number of runtimes you need to buy further licenses of the product.

You can order on-line in our e-commerce store or using our contacts page.

Evaluation Version
You can download an evaluation version of this product for
 Visual Basic, Visual C++ or Delphi

More Info
If you need further information about this product please use the
 contacts page.

 


© 2000-2022 Recogniform Technologies SpA - All rights reserved