ImageDocument

  • 29 Views
  • Last Post 3 weeks ago
Shiva Reddy posted this 3 weeks ago

I load a image as FR document now I want to apply operations like reduce motion blur etc which are part of ImageDoumnet object . how do I achieve that.

Oksana Serdyuk posted this 3 weeks ago

Hi,

Sometimes source images may need to be preprocessed before recognition, and FREngine allows to do it by using different methods of the ImageDocument object. For example, you can use the ImageDocument::RemoveMotionBlur method to remove motion blur from the specified region of the image. The method is primarily designed for preprocessing the images obtained by a digital camera. The usage code snippet may be the following:

...
// Create document
FREngine.FRDocument document = engineLoader.Engine.CreateFRDocument();

try {
// Add image file to document
  displayMessage( "Loading image..." );
  document.AddImageFile( imagePath, null, null );

// Add image file to document
  document.AddImageFile(imagePath, null, null);

  int pagesCount = document.Pages.Count;
  for (int i = 0; i < pagesCount; i++)
   {
      FREngine.FRPage page = document.Pages.Item( i );
        page.ImageDocument.RemoveMotionBlur( null );
     }
...

Please read more in the Developer’s Help file → Guided Tour  → Working with Images.

Close