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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 threshold

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pierrotsc Posted - Oct 11 2017 : 20:29:43
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 16 2017 : 01:28:31
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