T O P I C R E V I E W |
jccruz |
Posted - Jan 29 2013 : 06:53:00 Hello, I am developing a software where part of the process is the user acquire an image from a scanner.
As my future users will have differents scanners (Canon/HP/Epson/etc), I have to set my software to be able for all of them.
I am using TIETwainParams to set the scanner. Basically the setting that I need is 600DPI/GrayScale.
When I acquire from my Canon Scanner and compare (same image) it from an acquired from my HP Scanner, both connected in my computer, the results are differents. The resolution is not the same. I dont know why.
So I got a third scanner, an old Canon model, and the result is different from other two.
So, how can I do to set TIETwainParams to get the same (or similar) result from different scanners types (or branchs)?
Thanks Jose Carlos
JCC |
7 L A T E S T R E P L I E S (Newest First) |
fab |
Posted - Feb 07 2013 : 00:39:42 You should look at range of allowed threshold values, using:
ImageEnView1.IO.TwainParams.Threshold.RangeMin -> minimum threshold value ImageEnView1.IO.TwainParams.Threshold.RangeMax -> maximum threshold value ImageEnView1.IO.TwainParams.Threshold.RangeStep -> step between values
Other devices may specify a list of values. In this case the list is in Threshold.Items (counted by Threshold.Count).
Then set Threshold.CurrentValue with the accepted value. |
ehkhalid |
Posted - Feb 06 2013 : 02:12:12 Hi, in the both configuration , you use the same color mode ?, gray or black&white !!? the threshold paramter is used only for black and white, but in the first image it's a gray image !!.
|
jccruz |
Posted - Feb 05 2013 : 04:00:35 Hi!
Both scanners has the same brightness and contrast but diffent threshold value.
I made same changes at Twain Scanner demo (http://www.imageen.com/demos/index.html) to read the parameters like brightness, contrast and threshold.
Canon (the darker image) - Brightness = 0 - Contrast = 0 - Threshold = 128
HP - Brightness = 0 - Contrast = 0 - Threshold = 0 <<<-- Why it is reading zero?
When I select HP as scanner source and set the threshold to 128 I got a runtime error.
ImageEnView1.IO.TwainParams.Threshold.CurrentValue := 128;
Do I have to use ImageEnView1.IO.TwainParams.Threshold.add(128) instead?
If I use this demo to scan the same document in both scanners I have different qualities.
Thanks
JCC |
ehkhalid |
Posted - Feb 04 2013 : 03:55:21 Hi, I don't think it's an imageen problem, you have to verify that the both scanners has the same brightness and contrast parameters, if you scan using driver dialog of each scanner, you find the same quality ? |
jccruz |
Posted - Feb 02 2013 : 11:48:08 Here is the result of the same document scanned by Canon and HP. Look at the difference in the results. I croped part of the document because the size (more than 2mb).
JCC |
jccruz |
Posted - Feb 02 2013 : 11:11:26 Fabrizio, I set the parameters using TwainParams. Is it correct?
ImageEnView1.IO.TwainParams.VisibleDialog := false;
// Gray scale (8 bit) ImageEnView1.IO.TwainParams.PixelType.CurrentValue := 1;
ImageEnView1.IO.TwainParams.YResolution.CurrentValue := 600; ImageEnView1.IO.TwainParams.XResolution.CurrentValue := 600; ImageEnView1.IO.TwainParams.Brightness.CurrentValue := 0; ImageEnView1.IO.TwainParams.Contrast.CurrentValue := 0;
ImageEnView1.IO.Acquire;
JCC |
fab |
Posted - Feb 01 2013 : 23:47:26 Hello, how do you set these parameters? Please show your code. |