Discussion:
Experience with the v4l backend?
(too old to reply)
Torfinn Ingolfsen
2017-01-05 21:28:03 UTC
Permalink
Raw Message
Hello,
Does anyone here have experience with the v4l backend?
I recently got myself a CZUR ET16 scanner[1,2] and it shows up as a
video device, that is why I have to use the v4l backend. The scanner
has a 16Mpixel sensor, according to the company.
The company has (working) software for Windows, with software for Mac
OS X in beta. No plans for Linux support at this time.
But this device is a USB video class device, so it should work with
sane, provided that the v4l backend is good enough (the man page still
claims that it is alpha...).

Anyway, how do you convince the v4l backend to scan in a different
resolution than 640x480?
[***@kg-u35jc ~]$ scanimage -V
scanimage (sane-backends) 1.0.25; backend version 1.0.25


[***@kg-u35jc ~]$ scanimage -L
device `v4l:/dev/video1' is a Noname CZUR virtual device
device `v4l:/dev/video0' is a Noname USB 2.0 UVC 0.3M Webcam virtual device

[***@kg-u35jc ~]$ scanimage --help --device-name v4l:/dev/video1
Usage: scanimage [OPTION]...

Start image acquisition on a scanner device and write image data to
standard output.

Parameters are separated by a blank from single-character options (e.g.
-d epson) and by a "=" from multi-character options (e.g. --device-name=epson).
-d, --device-name=DEVICE use a given scanner device (e.g. hp:/dev/scanner)
--format=pnm|tiff|png|jpeg file format of output file
-i, --icc-profile=PROFILE include this ICC profile into TIFF file
-L, --list-devices show available scanner devices
-f, --formatted-device-list=FORMAT similar to -L, but the FORMAT of the output
can be specified: %d (device name), %v (vendor),
%m (model), %t (type), %i (index number), and
%n (newline)
-b, --batch[=FORMAT] working in batch mode, FORMAT is
`out%d.pnm' `out%d.tif'
`out%d.png' or `out%d.jpg' by default
depending on --format
--batch-start=# page number to start naming files with
--batch-count=# how many pages to scan in batch mode
--batch-increment=# increase page number in filename by #
--batch-double increment page number by two, same as
--batch-increment=2
--batch-print print image filenames to stdout
--batch-prompt ask for pressing a key before scanning a page
--accept-md5-only only accept authorization requests using md5
-p, --progress print progress messages
-n, --dont-scan only set options, don't actually scan
-T, --test test backend thoroughly
-A, --all-options list all available backend options
-h, --help display this help message and exit
-v, --verbose give even more status messages
-B, --buffer-size=# change input buffer size (in kB, default 32)
-V, --version print version information

Options specific to device `v4l:/dev/video1':
Scan Mode:
--mode Gray|Color [Gray]
Selects the scan mode (e.g., lineart, monochrome, or color).
--channel Camera 1 [inactive]
Selects the channel of the v4l device (e.g. television or video-in.
Geometry:
-l 0..447pel (in steps of 1) [inactive]
Top-left x position of scan area.
-t 0..271pel (in steps of 1) [inactive]
Top-left y position of scan area.
-x 320..767pel (in steps of 1) [inactive]
Width of scan-area.
-y 240..511pel (in steps of 1) [inactive]
Height of scan-area.
Enhancement:
--brightness 0..255 [0]
Controls the brightness of the acquired image.
--hue 0..255 [0]
Controls the "hue" (blue-level) of the acquired image.
--color 0..255 [0]
Sets the picture's color.
--contrast 0..255 [0]
Controls the contrast of the acquired image.
--white-level 0..255 [0]
Selects what radiance level should be considered "white".

Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

List of available devices:
v4l:/dev/video1 v4l:/dev/video0

[***@kg-u35jc ~]$ scanimage -d v4l:/dev/video1 --mode Color -T
scanimage: scanning image of size 640x480 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 1920 bytes... PASS
scanimage: reading one byte... PASS
scanimage: stepped read, 2 bytes... PASS
scanimage: stepped read, 4 bytes... PASS
scanimage: stepped read, 8 bytes... PASS
scanimage: stepped read, 16 bytes... PASS
scanimage: stepped read, 32 bytes... PASS
scanimage: stepped read, 64 bytes... PASS
scanimage: stepped read, 128 bytes... PASS
scanimage: stepped read, 256 bytes... PASS
scanimage: stepped read, 512 bytes... PASS
scanimage: stepped read, 1024 bytes... PASS
scanimage: stepped read, 2048 bytes... PASS
scanimage: stepped read, 2047 bytes... PASS
scanimage: stepped read, 1023 bytes... PASS
scanimage: stepped read, 511 bytes... PASS
scanimage: stepped read, 255 bytes... PASS
scanimage: stepped read, 127 bytes... PASS
scanimage: stepped read, 63 bytes... PASS
scanimage: stepped read, 31 bytes... PASS
scanimage: stepped read, 15 bytes... PASS
scanimage: stepped read, 7 bytes... PASS
scanimage: stepped read, 3 bytes... PASS

Gray doesn't work:
[***@kg-u35jc ~]$ scanimage -d v4l:/dev/video1 --mode Gray -T
scanimage: sane_start: Invalid argument

More info can be found at my Fedora page[3] for this scanner.
If more info / testing / debugging is needed, I can do it.

References:
1) http://www.czur.com/product/ET16
2) https://www.indiegogo.com/projects/czur-scanner-build-your-own-digital-library--2/
3) https://sites.google.com/site/tingox/ig_czurtek_czur_scanner_fedora
--
Regards,
Torfinn Ingolfsen
Oslo, Norway
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Torfinn Ingolfsen
2017-01-06 19:39:00 UTC
Permalink
Raw Message
Did you check if device is working with for example the program
"cheese" works with UVC devices
Yes, I did (sorry for not mentioning it) and yes - it works. Here is
one example of a picture taken with cheese:
[***@kg-u35jc ~]$ file ~/Pictures/Webcam/*
/home/tingo/Pictures/Webcam/2017-01-06-203204.jpg: JPEG image data,
JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, Exif
Standard: [TIFF image data, little-endian, direntries=4, model=CZUR,
software=Cheese 3.16.1, datetime=2017:01:06 20:32:04], baseline,
precision 8, 2304x1728, frames 3

As you can see, cheese can do 2304x1728 for resolution with this scanner.
For this program maybe you have to disable the v4l backend in
It worked without disabling anything.

HTH
--
Regards,
Torfinn Ingolfsen
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Torfinn Ingolfsen
2017-01-25 18:37:06 UTC
Permalink
Raw Message
FWIW, ucview also can create still pictures with 2304x1728 resolution:
[***@kg-u35jc ~]$ file Pictures/czur/*jpg
Pictures/czur/Image_00000.jpg: JPEG image data, JFIF standard 1.01,
aspect ratio, density 1x1, segment length 16, baseline, precision 8,
2304x1728, frames 3
Pictures/czur/Image_00001.jpg: JPEG image data, JFIF standard 1.01,
aspect ratio, density 1x1, segment length 16, baseline, precision 8,
2304x1728, frames 3

HTH
--
Regards,
Torfinn Ingolfsen
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
d***@mail.com
2017-02-01 14:56:32 UTC
Permalink
Raw Message
On Fri, 6 Jan 2017 20:39:00 +0100
Post by Torfinn Ingolfsen
Did you check if device is working with for example the program
"cheese" works with UVC devices
Yes, I did (sorry for not mentioning it) and yes - it works. Here is
/home/tingo/Pictures/Webcam/2017-01-06-203204.jpg: JPEG image data,
JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, Exif
Standard: [TIFF image data, little-endian, direntries=4, model=CZUR,
software=Cheese 3.16.1, datetime=2017:01:06 20:32:04], baseline,
precision 8, 2304x1728, frames 3
As you can see, cheese can do 2304x1728 for resolution with this scanner.
For this program maybe you have to disable the v4l backend in
It worked without disabling anything.
HTH
I can't take a gray scale image with my usb cam either.
I'd guess that this is a bug.
I fact, I can only take one image and then the second generates an error.

Sincerely,
David
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Torfinn Ingolfsen
2017-02-04 12:10:05 UTC
Permalink
Raw Message
Post by d***@mail.com
I can't take a gray scale image with my usb cam either.
I'd guess that this is a bug.
Possibly, yes.
Post by d***@mail.com
I fact, I can only take one image and then the second generates an error.
Ok, that is a bug. The question is if it is a bug with sane or with
the device itself.
Does the device (usb cam) worh with other programs after taking an
image with sane first?
--
Regards,
Torfinn
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Loading...