I am developing a web based java application. My requirement is to crop the image produced by a scanner into the size of the actual scanned document. I am using Asprise JTwain as the sdk to interface the scanner with the program.
Auto Crop after scanning an image
1.8k views Asked by Nishad K Ahamed At
2
There are 2 answers
0
On
https://www.dynamsoft.com/docs/dwt/API/WebTwain.Acquire.html#ifautomaticborderdetection
The same will work with dynamsoft also if hardware is supported.
You may first check if your TWAIN driver supports automatic border detection by checking the user interface of your scanner or using TWAIN sample application.
If so, you can negotiate the ICAP_AUTOMATICBORDERDETECTION TWAIN capapbility or use the corresponding method/property of JTwain to turn on the feature.
TWAIN sample app and TWAIN specification can be got here: http://www.twain.org/scannerdriverdevelopers/specification-and-tools.html
If your driver doesn't support the feature, you can use OCR to achieve auto crop.