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
 threshold
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pierrotsc

USA
499 Posts

Posted - Oct 11 2017 :  20:29:43  Show Profile  Reply
i am trying to understand the threshold parameter in scanning. it has value from 0 to 255. i want to scan with neutral value. should i use a threshold value of 128 ?
Thanks for any advice. I am scanning in grayscale 8 bits.
Pierre

xequte

39142 Posts

Posted - Oct 16 2017 :  01:28:31  Show Profile  Reply
Hi Pierre

From the Twain documentation:

ICAP_THRESHOLD

Description
Specifies the dividing line between black and white. This is the value the Source will use to threshold, if needed, when ICAP_PIXELTYPE = TWPT_BW.
The value is normalized so there are no units of measure associated with this ICAP.

Application
Application will typically set ICAP_BITDEPTHREDUCTION to TWBR_THRESHOLD to use this capability.

Source
Source should fit available values linearly into the defined range such that the lowest available value equals 0 and the highest equals 255. If not supported, return TWRC_FAILURE / TWCC_CAPUNSUPPORTED.

Values

Type:TW_FIX32
Default Value:128
Allowed Values:0 to 255
Container for MSG_GET:TW_ENUMERATION
TW_ONEVALUE
TW_RANGE
Container for MSG_SET:
TW_ENUMERATION
TW_ONEVALUE
TW_RANGE
Container for MSG_QUERYSUPPORT:
TW_ONEVALUE

Required By
None

Source Required Operations

None

See Also
ICAP_BITDEPTHREDUCTION

Source: http://www.twain.org/wp-content/uploads/2016/03/TWAIN-2.1-Spec.pdf

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: