Home › Forums › TWAIN Classic › Can I get the RAW-image from my scanner via TWAIN?
- This topic has 8 replies, 4 voices, and was last updated 16 years ago by monday2000.
- AuthorPosts
Hi,
I would like to ask – how to get a raw scanned data from my scanner under WinXP? I use the native TWAIN-driver – but I look through the settings in the TWAIN-driver scanning window and I don’t see this option.
Does TWAIN generally allow the capture of the original raw data from any scanner?
in alomst all cases you’re going to get a Dib from twain (or a pointer to a Dib but still). the only time you don’t get a DIb is when you have the device’s transfer mode set to File – then you pretty much just get a path back.
That said, you’re looking at the vendor’s Ui. Whatever you see was put there by them.
And what are you looking for when you say raw?@gabe wrote:
And what are you looking for when you say raw?
I am talking about that: http://en.wikipedia.org/wiki/Raw_image_format
Every scanner gets a scanned image primarily in a RAW-format. Then, a scanner makes the RAW->3-color-per-pixel (BMP, TIFF, JPG, …) transform. This is similar to the digital cameras operation.
The problem is that it is quite easy to get the raw image data from a digital camera – but how to get the raw image data from a scanner via TWAIN?
The RAW image is desirable to have – because it’s called “digital negative”.
As yet one can use the VueScan program to get the raw image data from a scanner – but VueScan does not use TWAIN, it does not support my scanner and at last it costs money.
Interesting wiki page. The native format of the image produced by a scanner available via twain is a Dib : http://twain.org/docs/TWAIN19.pdf
From there the twain driver from the vendor will typically make available a number of other formats, but as I said it starts with a Dib. So I guess the answer is you don’t get the raw image data from twain. You may find a method for converting the Dib to Raw but that seems rather pointless and seems to run against your ‘digital negative’ idea.
.
.
I wish that RAW-scanning feature would be added into the TWAIN 2.0 spec. Is it possible? Whom personally to ask about it?
I will bring up your suggestion at the next technical subcommittee meeting this week.
Thank you,
Hilary Minugh
AdministratorHowdy…
Raw image output from a device is a tricky concept. I’ll provide some examples…
1) real raw data, no phase correction, no dead pixel correction, no interleaving correction, etc; basically a dump of what the CCD or CIS device is reading. I doubt that many scanners provide this.
2) no color or gamma correction. I think this is what most folks mean by the term “raw”, that the dynamic range of the data hasn’t been substantially modified from what the device saw. But the output will still be packed RGB or grayscale or bitonal. Things like ICAP_GAMMA, DAT_GRAYRESPONSE and DAT_RGBRESPONSE should allow you to set up for an uncorrected image. But I suspect that you’ll have a hard time finding a driver that has implemented these options.
3) no meta data. DAT_IMAGEMEMXFER does this. When a driver outputs uncompressed data, it’s up to the application to check DAT_IMAGEINFO or DAT_EXTIMAGEINFO to discover the width, height, resolution and pixel type of the image.
Does one of those sound like what you’re looking for?
The VueScan program already offers the RAW-data from scanner – optionally as Adobe DNG files.
There’s also the SilverFast HDR program which offers RAW from a scanner.
These 2 programs do not use TWAIN – they provide their own scanner drivers which probably allow them the direct access to the scanner hardware.
I think this is what most folks mean by the term “raw”
Most likely. Ask Ed Hamrick, the VueScan author.
But the output will still be packed RGB or grayscale or bitonal.
No. The output in VueScan Pro-version can really be in the Adobe DNG format.
Does one of those sound like what you’re looking for?
My idea is quite simple and obvious: if some digital photocameras offer RAW – scanners should do also.
@Hilary Minugh wrote:
I will bring up your suggestion at the next technical subcommittee meeting this week.
Thank you,
Hilary Minugh
AdministratorHi again.
I suggested this idea for you to implement it in the TWAIN 2.0 spec (or some later version perhaps). What would you say about it?
- AuthorPosts