Home › Forums › TWAIN Classic › Random scan
- This topic has 10 replies, 7 voices, and was last updated 10 years, 2 months ago by BettylBrack.
- AuthorPosts
Hi everybody!
I’m a french artist, working on scanners. After having helped my best in some art forums, in programming domain I am now forced to require your solidarity (tell me if I don’t speak in the good forum) :?…
I am trying to get a randoming scan (for example, I’d like to compel the scanning beam of light to scan my image not linearly, but randomly, in order to get an image composed by smithereens of the scanned item).
The problem is that I have really few knowledges in programming languages, and even if i’m trying to understand how Twain’s driver works, I have to admit that I really don’t know what to do first, and how :oops:. To begin with, should I start to create a program, or is Twain able to do that with little modifications?
If someone has anything that could help me, I would be very grateful. Thanking the Twain’s community in advance,
Damien
Hi.
I am also very new to programming and haven’t gotten TWAIN to work yet, but I think that it would be much easier if you:
1) Scan the image completely using TWAIN from a program like IrfanView into scanned.bmp
2) Use some image programming library (like ImageMagick) or program (like Photoshop) to randomly put together different parts of scanned.bmp and save as random.bmp
3) Now random.bmp has your random image!@Sc@n wrote:
…for example, I’d like to compel the scanning beam of light to scan my image not linearly, but randomly, in order to get an image composed by smithereens of the scanned item.
Hi Damien,
I don’t know of any TWAIN driver that will do what you want. It’s certainly not a standard TWAIN feature.
Normally, people want a digital image of exactly what they put in the scanner. Image enhancement may be desired but effects that distort the image are not (at least for non-artist types).
Your best bet is to do a normal scan and then post-process it using an image processing program such as Gimp (free) or Adobe Photoshop ($). If the effects you want to achieve are not available, look into writing a custom plug-in. Obviously, the TWAIN forum is not the right place to get help with that.
–@dpenney wrote:
Normally, people want a digital image of exactly what they put in the scanner. Image enhancement may be desired but effects that distort the image are not (at least for non-artist types).-
Hi! That’s right, and thank you to think about my question. You understand immediately the largest part of the problem, which is that something is possible when people want to (and here people don’t want what I want)… personally it took me months :). At least I can see my question has been clear enough :D.
@twainuser123 wrote:
1) Scan the image completely using TWAIN from a program like IrfanView into scanned.bmp
2) Use some image programming library (like ImageMagick) or program (like Photoshop) to randomly put together different parts of scanned.bmp and save as random.bmp
3) Now random.bmp has your random image!-Hi and thank you too to think about it! Your answer is, indeed, a solution. I just needed to find a way in which everything could be done just with the scanner and its driver. Actually, I am searching for an automated process to get strange images from my scanner, and not only a perfect copy. But as no one wants that, it seems to be, in a kind, impossible.
@dpenney wrote:
Obviously, the TWAIN forum is not the right place to get help with that.-
Thank you anyway, people like you and twainuser123 are great! Twain forum was maybe one of the right place to get help actually, even to say me to ask my question elsewhere :P. I will try all the things you adviced to me. Thank you both very much for your generous help!
I was just thinking to something… and if I just asked the Twain driver to do another type of random scan? If I just wanted Twain to chose random options of scan (for example luminosity, quality/dpi, type of frame…) it would be easier isn’t it? So is someone able to help me, to make Twain choose randomly and before the scan, all the options he offers? 😀
Thank you !
Hi/Salut Sc@n (and hi Doug!)
Are you ready to do any programming? I mean, have you written any computer programs, do you have a programming language on your computer that you could use?
I grew up surrounded by visual art and artists, but I write scanner software for a living. Maybe I can help. Hmm, what kind of computer do you have access to?
Do you have some idea of what kind of smithereens you want??
Hi spike (ou salut 😀 !)!
I grew up surrounded by visual art and artists, but I write scanner software for a living. Maybe I can help.
Of course! That could not be better 😀 ! For sure, as you will be able to make art and technology compatible, which is not so easy… in a part because an artist has a really special way to think 😉 , and sometimes wants impossible things…
Are you ready to do any programming?
Yes, I am ready to do some programming, even if I am not an expert, it does not frighten me!
I have knowledges on different things, like HTML and CSS (just to say that I am not totally a newbie in code 😉 ), and maybe more apposite, I used to create little programs on TurboPascal and DOS when I was younger. Currently, I am also learning Action Script.
Anyway, I have to admit that I have not any knowledges in “serious” languages, if you’re speaking about C++ or ASM for exemple… the only thing I have is willpower 😆 . These researchs on scanner will last for at least one year, and everything will be tried to develop and automate my manual researchs (if necessary, I have got pictures of my WIP).Hmm, what kind of computer do you have access to?
Well, there are lots of computers available for my researchs, both Mac and PC. But the OS I best control is still Windows, and the PC I daily use is a HP Pavillon, with Vista 64 bits, Service Pack 2, 2.33 GHz, 4.00 Go RAM!
Do you have some idea of what kind of smithereens you want??
First I wanted the smithereens to be produced by the scanning beam of light : if possible the object or image would not, like usually, be scanned linearly. If it was possible to scan some of its parts randomly, then the image would simply show these “parts”, stuck together in the final image (hmm, is it clear? sorry my english is not a good standard).
But as I have realized the complexity of what I ask (even if I have already done it manually), I know have revised my ambition downwards
🙄 … so :– I am now “just” trying to ask the scanner to have a random behaviour. I would like to do something turning Twain’s driver (controling my Epson Perfection 2400) into a “random driver”. Maybe a kind of plug-in, or I don’t know what, would be able to choose randomly every value (luminosity, contrast, resolution…)? It would then give me strange pictures of the scanned item, always different, at every scan.
It can seem weird, but it is a very serious project, and also very important to me. People can’t imagine at which point I need this project to come true. So thank you very much to take time for it, it is really really appreciated 🙂 !
Hi Sc@n – Hmm. Well, two thoughts:
1. I’m happy to give you a license for any of my scanning tools, but they are aimed at programmers – you’d have to do at least a little programming to use any of them.
There’s an ActiveX control that runs on a web page inside Internet Explorer – you can see a demo here:
http://dosadi.com/eztx/alpha-demo.htmThat’s fairly limited, but you can set some basic scanning parameters like resolution, brightness & contrast using Javascript, and displaying and saving images it easy.
EZTwain Pro gives you a lot more control (as much as TWAIN permits, which is not as much as you want) but requires more programming.If you wanted to try it, you could find a copy of Delphi (the modern descendant of TurboPascal!). Download & install EZTwain Pro, and then step through the Code Wizard – it will generate basic scanning code in Delphi Pascal…
http://www.dosadi.com/eztwain3.htmYou could use any program that can scan to do the basic scan to a file, and then look for software tools that let you chop, fragment, transform and re-assemble the image with random parameters. Sounds to me like you need either a scriptable image editor, or a programming language with a great image-processing module or library.
Mathematica seems like one possibility, as is Matlab.
Or you could combine a language like Python with SciPy+SciKits.image:
http://stefanv.github.com/scikits.image/How about using GIMP, which lets you control it, and extend it, with a Scheme-like language? The nice thing there is you can try things out interactively with mouse & menus, then figure out how to invoke the same operations from code.
2. You know that the scanner doesn’t really pass a beam of light over the image? Almost all scanners use a scanner ‘bar’ that can read a horizontal line of pixels all at once, in a few milliseconds. This bar is moved across the paper, or the paper is moved across the bar, to capture the image as a series of rows of pixels.
If the scanner *did* use a moving beam of light, and we randomized it… To visualize what would happen, take a photograph, and cut it into squares 0.5cm x 0.5cm. Now mix up the squares and put them back into the original shape, but scrambled – that’s what a random scan would do. I think it will look like an old TV, when the signal is cut off: There won’t be any recognizable objects or patterns – is that the effect you are looking for? On the other hand, if you cut an image into larger squares (multiple pixels) then when you scramble them, the parts still provide some interesting details. Oh well, I’m rambling. Hope this helps…
Cell phone jammer is an interesting and helpful device when we don’t want to be bothered by the cell phone noise. I just bought myself a cell phone jammer the other day, it is working great and BTW, it’s legal here in my country.
In this modern and high technology world which is also called the “information era”. There is no doubt that people now want to own the life that is safe and free and do the thing that they like and want to do. And usually such kind of life is not so easy to own for some people and as they are monitored by some device. If so the cellphone GPS signal blockers at jammerfromchina.com can be your good assistant.
In this modern and high technology world which is also called the “information era”. There is no doubt that people now want to own the life that is safe and free and do the thing that they like and want to do. And usually such kind of life is not so easy to own for some people and as they are monitored by some device. If so the video wireless can be your good assistant.
- AuthorPosts