ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Scanning Documents
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mdgodfrey

USA
54 Posts

Posted - Jul 02 2019 :  18:36:41  Show Profile  Reply
Sometime ago I had to stop using Skyline Tools ImageLib to scan documents.

Since moving to ImageEn I enjoy many improvements but I have never been able to scan documents as cleanly.

I have tried many ways to use border detection and I have never been able to get that to work.
I have also tried cropping documents with some but not enough success.

I believe many others had to drop Skyline and seem to be having success. Please tell me how you have found scanning to do the job needed in Imageen.
I am trying to get multipage documents scanned cleanly.

Thanks much

xequte

38610 Posts

Posted - Jul 02 2019 :  19:41:57  Show Profile  Reply
Yes, we had a number of users comes to us from ImageLib

Regarding this border detection issue, we've not had other users raise it. Does it only happen with the one scanner?

What ImageEn version are you using now?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mdgodfrey

USA
54 Posts

Posted - Jul 02 2019 :  21:36:37  Show Profile  Reply
I have the same issue with multiple scanners. I feel like I am missing something but have tried to put together multiple code samples.
I am only on 4.3.1. I would be happy to upgrade but reviewing the history I don't see much on twain improvement. It also seems like the issue wasn't a problem for most users with that version.
Go to Top of Page

xequte

38610 Posts

Posted - Jul 03 2019 :  04:26:58  Show Profile  Reply
Hi

Did you have a look at full history:

https://www.imageen.com/info/HistoryFull.html

There have been many Twain improvements, but I don't believe anything that specifically addresses this, because we have not determined the issue. There is a trial version of ImageEn available on the download page, if you want to test it out.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mdgodfrey

USA
54 Posts

Posted - Jul 03 2019 :  08:40:18  Show Profile  Reply
Here is my code. Can you tell me what I am missing. Everything scans as Legal sized paper even though the scanner is set to letter and I believe I have it set to recognize the paper size and to crop the pages.

procedure TfrmDocArchiveScan.actScanExecute(Sender: TObject);
Var
  i : Integer;
  bmp : TIEBitmap;
begin
if ImageEnMView1.MIO.AcquireParams.SelectedSource.API = ieaNone {ieaTwain} then
   begin
   If not ImageENMView1.MIO.SetAcquireSource(ieaTwain, Default_Device) then
      begin
      ShowMessage('Could not acquire scanner.');
      Exit;
      end;
   end;
ImageENMView1.Clear;
SetTwainParams;
if ImageENMView1.MIO.Acquire then
   begin
   Screen.Cursor := crHourglass;
    try
   for i := 0 to ImageEnMView1.ImageCount - 1 do
     begin
     bmp := ImageEnMView1.GetTIEBitmap(i);
     ImageEnMView1.Proc.AttachedIEBitmap:=bmp;
     ImageEnMView1.Proc.SkewDetection( 0, 10, 0, true );
     ImageEnMView1.Proc.RotateAndCrop(0);
     ImageEnMView1.Proc.AutoCrop(100, RGB(0,0,0), True);  //Black
     //ImageEnMView1.Proc.SetTransparentColors(CreateRGB(255, 255, 255), CreateRGB(255, 255, 255), 0);
     //ImageEnMView1.Proc.CropTransparentBorder;
     ImageEnMView1.ReleaseBitmap(i);
     ImageEnMView1.UpdateImage(i);
     end;
   ImageENMView1.MIO.Params[0].TIFF_Compression := ioTIFF_G4FAX;
   ImageENMView1.MIO.Params[0].BitsPerSample := 1;
   ImageENMView1.MIO.Params[0].SamplesPerPixel := 1;
   ImageENMView1.MIO.DuplicateCompressionInfo();    //Duplicates for additional pages.
   if AllowMergeScan then
      begin
      frmDocArchive.MergeScanToDBDoc;
      end
   else
      begin
      SaveDocToDB;
      end;
    finally
   Screen.Cursor := crDefault;
    end;
   end;
end;


Procedure TfrmDocArchiveScan.SetTwainParams;
begin
Screen.Cursor := crHourGlass;
ImageEnMView1.MIO.TwainParams.PixelType.CurrentValue  := Twain_PixelType_BW;
ImageEnMView1.MIO.TwainParams.YResolution.CurrentValue := 200;
ImageEnMView1.MIO.TwainParams.XResolution.CurrentValue := 200;
ImageEnMView1.MIO.TwainParams.BufferedTransfer := True;
ImageEnMView1.MIO.TwainParams.VisibleDialog := cbShowDialog.Checked;
If ImageEnMView1.MIO.TwainParams.IsCapabilitySupported( ICAP_AUTOMATICBORDERDETECTION ) then
   begin
   ImageENMView1.MIO.TwainParams.AutoBorderDetection := True;
   end
else
   begin
   ShowMessage('Scan auto page size detection is not supported for this scanner');
   end;
ImageEnMView1.MIO.TwainParams.UndefinedImageSize := True;
ImageENMView1.MIO.TwainParams.AutoDeskew := True;
ImageENMView1.MIO.TwainParams.AutoRotate := True;
ImageEnMView1.MIO.TwainParams.Update; // verify here...
Screen.Cursor := crDefault;
end;
Go to Top of Page

mdgodfrey

USA
54 Posts

Posted - Jul 03 2019 :  09:42:28  Show Profile  Reply
One more note. I can still run versions using Skyline tools and border detection works.

Thanks
Go to Top of Page

xequte

38610 Posts

Posted - Jul 03 2019 :  18:07:17  Show Profile  Reply
Hi

I cannot see anything wrong with the code. I've compiled it in the latest version. Please download from:

http://www.imageen.com/files/other/scantest.zip

Also, try changing the other options to see if they affect it.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

mdgodfrey

USA
54 Posts

Posted - Jul 08 2019 :  12:41:06  Show Profile  Reply
Thanks for the reply.

When you say "other options" which ones are you referring to?

Thanks again
Go to Top of Page

mdgodfrey

USA
54 Posts

Posted - Jul 08 2019 :  15:31:50  Show Profile  Reply
The test application also does an unsatisfactory job of generating a well cropped document. I am getting black borders and gaps. I can send you copies we made using the test demo on a document if you would like me to. I am using a fuitsu fi-6130. Also, Skyline cleans up the edges perfectly.
Also, we are not using photos but documents for the scan application.
Go to Top of Page

zerob

161 Posts

Posted - Jul 11 2019 :  05:47:14  Show Profile  Reply
Maybe you can send Nigel the different scan results? One with the perfect scan, one with the not perfect and one with the unaltered original?
So he can see what the difference is and how to fix it?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: