16 bit grayscale image aquisition problem

Discussions about TWAIN scanning in GdPicture.NET using GdPictureImaging.
Post Reply
RSWE
Posts: 2
Joined: Fri May 22, 2015 10:14 am

16 bit grayscale image aquisition problem

Post by RSWE » Fri May 22, 2015 10:26 am

Talking to a special 16 bit grayscale capable twain ds we do face some image distortion problems.

Our analysis leads to following result:

1. The data source (ds) reports an ICAP_BITDEPTH of 8 (only)
2. During aquisition (in Twain system state image ready) we do see an DAT_IMAGEINFO as follows:
XResolution = 254 pixels/inch
YResolution = 254 pixels/inch
ImageWidth = 1607 pixels
ImageLength = 1250 pixels
SamplesPerPixel = 1
BitsPerSample[] = [16, 0, 0]
BitsPerPixel = 16
Planar = False
PixelType = TWPT_GRAY
Compression = TWCP_NONE

3. GdPicture twain does not recognize/use this image info. The captured image (using TwainAcquireToGdPictureImage) has a 45 degree distortion, which is typical for 16/8 bit misinterpretations), see attached test.tif

4. We do see no option to handle the given (correct) imageinfo using gdpicture...
Attachments
test.tif
distorted image
test.tif (1.91 MiB) Viewed 1853 times

User avatar
Loïc
Site Admin
Posts: 5581
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: 16 bit grayscale image aquisition problem

Post by Loïc » Sat May 23, 2015 1:26 pm

Hello,

GdPicture is supposed to perfectly handle 16 bpc acquired bitmap. That said there is nothing that I can suggest with the provided information, I need that you follow all the instructions listed on the following link to investigate: viewtopic.php?t=1486
You can share any private material with our team by creating a support ticket on our helpdesk: http://support.gdpicture.com

With best regards,

Loïc

RSWE
Posts: 2
Joined: Fri May 22, 2015 10:14 am

Re: 16 bit grayscale image aquisition problem

Post by RSWE » Mon Jun 22, 2015 4:21 pm

Here is the corresponding GDPicture Twain.log:


#GdPicture.NET.twain.client Log Start. Version: 705

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
GetValidHwnd: Creating Proxy window.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
Start: OpenSourceManager.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
standard DSM 32-bit library loaded: C:\Windows\SysWow64\TWAINDSM.DLL
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
Entry point of the standard DSM found.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
End: OpenSourceManager.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: Start Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: End Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: Start Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: End Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: Start Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: End Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: Start Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: End Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: Start Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: End Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: Start Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
GDTWAIN_Mgr: End Getting DAT_STATUS
RC: TWRC_ENDOFLIST
CC: TWCC_SUCCESS
State: 3
-------------------
#GdPicture.NET.twain.client Log Start. Version: 705

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
#GdPicture.NET.twain.client Log Start. Version: 705

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
#GdPicture.NET.twain.client Log Start. Version: 705

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
-------------------
#GdPicture.NET.twain.client Log Start. Version: 705

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
#GdPicture.NET.twain.client Log Start. Version: 705

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------

>>>>>>>>>> NOW the new image aquisition will be triggered <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


#GdPicture.NET.twain.client Log Start. Version: 705

RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
GetValidHwnd: Creating Proxy window.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
Start: OpenSourceManager.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
standard DSM 32-bit library loaded: C:\Windows\SysWow64\TWAINDSM.DLL
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
Entry point of the standard DSM found.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------
End: OpenSourceManager.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
-------------------
Start: OpenSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS
-------------------
Start: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS
-------------------
End: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
End: OpenSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
Start: SetAutoFeed.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_FAILURE CC: TWCC_CAPUNSUPPORTED
-------------------
CAP_AUTOFEED. Result for Set False.
RC: TWRC_FAILURE
CC: TWCC_CAPUNSUPPORTED
State: 4
-------------------
End: SetAutoFeed.
RC: TWRC_FAILURE
CC: TWCC_CAPUNSUPPORTED
State: 4
-------------------
Start: SetAutoScan.
RC: TWRC_FAILURE
CC: TWCC_CAPUNSUPPORTED
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_FAILURE CC: TWCC_CAPUNSUPPORTED
-------------------
End: SetAutoScan False.
RC: TWRC_FAILURE
CC: TWCC_CAPUNSUPPORTED
State: 4
-------------------
Start: Set Duplex False.
RC: TWRC_FAILURE
CC: TWCC_CAPUNSUPPORTED
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_FAILURE CC: TWCC_CAPUNSUPPORTED
-------------------
End Set Duplex.
RC: TWRC_FAILURE
CC: TWCC_CAPUNSUPPORTED
State: 4
-------------------
Start: AcquireNative.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
Source: Virtual Device
Manufacturer: Dürr Dental
-------------------
Start: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_SET ->RC: TWRC_SUCCESS
-------------------
End: SetXferMech.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
AcquireNative: Retrieving current device transfer configuration - Start.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_FAILURE CC: TWCC_BADCAP
-------------------
AcquireNative Info - CAP_DUPLEXENABLED is false
AcquireNative: Retrieving current device transfer configuration - End.
RC: TWRC_FAILURE
CC: TWCC_BADCAP
State: 4
-------------------
Start: WaitForXfer.
RC: TWRC_FAILURE
CC: TWCC_BADCAP
State: 4
-------------------
Start: EnableSource.
RC: TWRC_FAILURE
CC: TWCC_BADCAP
State: 4
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_USERINTERFACE - MSG: MSG_ENABLEDS ->RC: TWRC_SUCCESS
-------------------
End: EnableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_NOTDSEVENT CC: TWCC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_EVENT - MSG: MSG_PROCESSEVENT ->RC: TWRC_DSEVENT CC: TWCC_SUCCESS
-------------------
processTwainMSG: MSG_XFERREADY (from hook). Initializing transfer.
RC: TWRC_DSEVENT
CC: TWCC_SUCCESS
State: 6
-------------------
Start: DoOneTransfer.
RC: TWRC_DSEVENT
CC: TWCC_SUCCESS
State: 6
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
-------------------
Start: MemoryXferHandler.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 6
-------------------
::DS operation. DG: DG_IMAGE - DAT: DAT_IMAGEINFO - MSG: MSG_GET ->RC: TWRC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_SETUPMEMXFER - MSG: MSG_GET ->RC: TWRC_SUCCESS
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_CAPABILITY - MSG: MSG_GETCURRENT ->RC: TWRC_SUCCESS
-------------------
::DS operation. DG: DG_IMAGE - DAT: DAT_IMAGEMEMXFER - MSG: MSG_GET ->RC: TWRC_SUCCESS
-------------------
::DS operation. DG: DG_IMAGE - DAT: DAT_IMAGEMEMXFER - MSG: MSG_GET ->RC: TWRC_XFERDONE CC: TWCC_SUCCESS
-------------------
End: MemoryXferHandler.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 7
-------------------
Start: EndXfer.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 7
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_PENDINGXFERS - MSG: MSG_ENDXFER ->RC: TWRC_SUCCESS
-------------------
End: EndXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
End: DoOneTransfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
processTwainMSG: MSG_XFERREADY. Transfer done.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
End: ModalEventLoop.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
End: WaitForXfer.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
AcquireNative: Multi transfer mode -> closing source.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
Start: DisableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 5
-------------------
::DS operation. DG: DG_CONTROL - DAT: DAT_USERINTERFACE - MSG: MSG_DISABLEDS ->RC: TWRC_SUCCESS
-------------------
End: DisableSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
-------------------
Start: CloseSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 4
Source: Virtual Device
Manufacturer: Dürr Dental
-------------------
End: CloseSource.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 3
-------------------
End: AcquireNative.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 3
-------------------
Start: CloseSourceManager.
RC: TWRC_XFERDONE
CC: TWCC_SUCCESS
State: 3
-------------------
End: CloseSourceManager.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 2
-------------------
Window Proxy Destroyed !
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 2
-------------------
Start: UnloadSourceManager.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 2
-------------------
End: UnloadSourceManager.
RC: TWRC_SUCCESS
CC: TWCC_SUCCESS
State: 1
-------------------

Looks fine. The problem is "inside" the single line TWAIN aquisition using:

var imageId = _gdPictureImaging.TwainAcquireToGdPictureImage(windowHandle);

Is there any option to tell the aquisition to strictly use 16 bit greyscale?

User avatar
Loïc
Site Admin
Posts: 5581
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: 16 bit grayscale image aquisition problem

Post by Loïc » Thu Jun 25, 2015 4:39 pm

Hi,

Could you give me the exact acquisition device reference?

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest