LEADTOOLS Support
Imaging
Imaging SDK Questions
Detecting document position within a larger image (sourced from microfilm)
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, December 18, 2011 10:58:48 AM(UTC)
Groups: Registered
Posts: 10
Hi,
I Have a large number of Microfilmed documents I'd like to scan and capture to a modern storage media.
The image scanning results essentially return a photo of the document within a much larger area (the platen that the original paper document was placed on). Because of this the image file & physical sizes are larger than necessary and show a lot of unnecessary surrounding space.
I'd like to be able to detect the position of the scanned document within the larger image so that I can eventually crop the image.
I've tried auto crop, to no avail, and edge detection routines seem to update the image rather than returning a bounding rectangle.
Can you assist me by providing an approach?
(I've attached a sample image. The microfilm scanning system can also return bitonal images, but a sample was to large to post).
Thanks,
MartinT
#2
Posted
:
Sunday, December 18, 2011 6:06:11 PM(UTC)
Groups: Registered
Posts: 10
I should have said - I'm using Leadtools V17.5 and C#
#3
Posted
:
Monday, December 19, 2011 7:43:11 AM(UTC)
Groups: Registered
Posts: 256
The best approach depends on what properties are similar among all images. For example, do they all have the same type and level of noise? Do they all have dark edges (straight lines) at the border of rthe required rectangle?
Can you send us more samples to see the common properties for different images? If you want FTP upload instructions, please send an email to
support@leadtools.com and mention this forum post.
Also specify which LEADTOOLS product (Imaging Pro, Document, etc.) you own.
#4
Posted
:
Tuesday, December 20, 2011 3:28:05 PM(UTC)
Groups: Registered
Posts: 10
I've FTP'd a sample set of 11 Images in both Bitonal and Greyscale. The file is called 'Image Processing Form Post 40131 - Samples.zip'.
We are currently purchasing the Document Imaging Suite and OCR Pro.
Thanks,
MartinT
#5
Posted
:
Wednesday, December 21, 2011 7:59:49 AM(UTC)
Groups: Registered
Posts: 256
Martin,
The easiest approach is to use CropCommand class and hard-code the coordinates to the area in the middle for both Grayscal and Bitonal images. However, this does not correct for the variations in image locations, so I'm assuming this is not the solution you're looking for.
If you want a more accurate way, try these steps for grayscale images, for which I got good results:
1. Take a copy of the image then fill top and bottom middle area with black to get rid of extra bright parts (see ScreenshotB)
2. Use the Average function with a dimension of 8.
3. Use Intensity Detect function with values (235, 255)
4. Use the Minimum function with a dimension of 8.
5. Use the Auto Trim function to find the crop rectangle.
6. Use the rectangle from step 5 with the original image to trim the extra parts using the CropCommand.
For bitonal images, I have some ideas but please tell me first if the above steps are good enough for grayscale before I try them.
#6
Posted
:
Thursday, December 22, 2011 7:45:37 PM(UTC)
Groups: Registered
Posts: 10
Approach looks like it has promise.
Thanks,
MartinT
LEADTOOLS Support
Imaging
Imaging SDK Questions
Detecting document position within a larger image (sourced from microfilm)
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.