5/18/2016

Czur scanner, Still Image Method #2

USBPcap and hand decoding the last bytes from the [Still Image Frame (3)] subtype:

frame.protocols == "usb:usbvideo"

usbvideo.streaming.descriptorSubType == 3

00: if still method 2 this field is set to zero
04: number of Image Size patterns of this format: n

80:02: wWidth  (1)  32770 or 640
e0:01: wHeight (1)  57345 or 480

00:09: wWidth  (2)   9    or 2304
c0:06: wHeight (2)  49158 or 1728

40:06: wWidth  (3)  16390 or 1600
b0:04: wHeight (3)  45060 or 1200

20:0a: wWidth  (4)  8202  or 2592
98:07: wHeight (4) 38919  or 1944

00: number of Compression patter of this format 0

Which to me is in agreement with the UVC Spec on Page 15

Universal Serial Bus
Device Class Definition
for
Video Devices
Revision 1.1
June 1, 2005

Method 2 – 

If the device supports higher-quality still images, it has the option of streaming still-image-specific packets across the active video pipe. 

In this case, the host software will temporarily suspend video streaming, select the optimal bandwidth alternate setting based on the still probe/commit negotiation (subject to bandwidth availability), send a VS_STILL_IMAGE_TRIGGER_CONTROL Set request with the "Transmit still image" option (see section 4.3.1.4, "Still Image Trigger Control"), and prepare to receive the still image data. 

The device transmits the still image data marked as such in the payload header (see section 2.4.3.2.2, "Sample Isochronous Transfers"). Once the complete still image is received, the host software will then revert back to the original alternate setting, and resume video streaming. 

The resolutions are less than final images, but I "guess" this is due to using OpenCV mat functions to remap the pixels into a slightly larger final matrix as JPEG images.

Windows 7 no longer has support for WIA access to UVC video sources, however XP still did.. so it might make sense to see if WIA on XP can access a still image function exposed by the native UVC interface.

Update - while XP did identify the scanner as a USB device with Video and Audio, the Scanner app in XP would not take a picture.

I don't actually know of any Windows software that will make use of the STI capture feature in Windows 7

Possibly the Camera app in Windows 8/8.1 will looking forward.. something to test later today or tomorrow.