2011-12-18

A Scanner Darkly

I have always assumed that my scanner (an Epson Perfection V200) has construction flaws. An examples of this is, that it does not work with USB ports that are not directly connected to the motherboard.

Today I found out about another shortcoming. The waste heat of the scanner sled does not get transported away properly, which leads to permanent traces on the scanner glas. Fortunately the effect is not yet visible in everyday scans, but this situation might get worse.

To visualize the effect, scans were taken with open cover in a dark room. I combined the results from different scans in multiple layers (GIMP) with different opacities to diminish the influence of little dust particles. It would have been ideal to use this, which I could not get to work unfortunately.

To highlight the structures in the picture, Gimp's
Retinex filter was used, which performs quite well on this task. The result can be seen in the picture below.



The scanner's sled moves to a rest position away from the edge of the scanner, if not used for a while. This is where the sled cools down and the traces emerge.

SEL: These traces are from the PCB, which is attached to the sled.

SPL: Below this dot lies a small cut-out in the sled. It transports heat from the power lines of the lamp to the glas.

SLI: This horizontal stripes lies above the lamp, that illuminates what is to be scanned.

SSCR: Some scratches produced by the sled. Maybe there was something to heavy on the glas?

F: Probably finger prints that arose while cleaning the edges ;)

SCR: other scratches?

The picture below shows the same kind of image, this time produced with a Canon CanoScan LiDE 35. Even though this scanner not being the most recent model, the qualitative difference is clearly visible:



I wonder if it might be possible to augment this technique to identify which scanner model a document has been scanned with? Comments and suggestions are welcome as usually.

2011-10-04

lirc bug

Do you happen to have such a thing in your laptop?



It's an infrared remote control. In my case it's an RC811. If you also happen to have abadoned Windows from your machine, you might regard this solely as a place holder to prevent dust from entering the chassis of your computer, as it is a bit tricky to get it to function with lirc.

Today I finally stumbled upon the solution how to get it to work under Ubuntu, which consists of 3 steps. 2 are specific to the RC811 remote control, but one should be interesting to a wider circle of people.

0. Upon package installation "ITE8709 CIR port" is the appropriate type of remote control (at least for my laptop).

1. A remote control definition file is needed. In my case the correct one could be found here

2. The lirc version included in the repositories (v.0.8.7 at the time of this writing) has a bug. Referencing it in /etc/lirc/hardware.conf does not work. For example this means, that the following line would not have the desired effect:
REMOTE_LIRCD_CONF="/usr/share/lirc/remotes/generic/RC811"

Therefore the content of the definition file needs to be pasted in /etc/lirc/lircd.conf.

You can assume that this bug is present, if you have the following symptoms:
0. mode2 does work, but irw does not.

1. if the lirc daemon is started with the -n option, the following error message is displayed:
"config file contains no valid remote control definition"

If you want to control your mouse using the remote control, this /etc/lircrc might be helpful.

2011-08-23

Mnemosyne Print Flash Cards on Dead Wood

Do you know Mnemosyne? It's an excellent tool for learning flash cards. The only problem is that the computer is an evil distraction machine. So you might decide one day, that you want you print your flashcards to learn them the old school way, which means double sided printing questions and answers out on paper.

Unfortunately Mnemosyne does not have the ability to print flash cards with the question on the front and the answer on the back in double sided print. However flash cards can be exported to xml which can be converted to printable html with the following script. The Python script is a bit shaky and you might have to adapt it for your own needs, but it did the job for me.

2011-08-20

Python Constant Madness

Somehow Python does and does not have constants. The following examples, which can be tried out on the interactive interpreter, are of not much practical use, but interesting however:

Type "help", "copyright", "credits" or "license" for more information.

>>> temp_true = True

>>> temp_false = False

>>> True = temp_false

>>> False = temp_true

>>> True

False

>>> False

True


Even the built-in constants True and False can be overwritten with arbitrary content. This flexibility is probably rarely required and if this happens by accident, the logic of the following program is most likely screwed.

>>> True = "hello world"

>>> True

'hello world' 
Ruby does have a little advantage here, since it does not allow assigning new values to true and false.

2011-08-18

SVN Version Control with Xilinx ISE Projects

Maybe you have had the pleasure to work with Xilinx ISE already. A serious problem of ISE (version 13.2 at the time of this posting) is, that it has no support for version control like SVN. The project folder is a mess of generated scripts, reports and many other relatively useless files, which should not go into version control. However just adding all .vhd and .ucf files is not a good solution, because Wizards for IP generation cannot be used anymore. The 'Clean Project' Function within ISE is only an incomplete way to get rid of all unnecessary files.

A decent but working solution was to experiment a little which files are necessary and which ones aren't and use this information to create simple scripts which add necessary files to version control and set the svn ignore property to ignore the junk files. Albeit simple, these scripts have shown to be quite handy.

2011-08-09

Using the Xfig Library in Inkscape

Maybe you have used Inkscape before. It's a remarkable tool for creating vector graphics.

Sometimes it would be helpful to have a library with predefined images for all kinds of purposes (eg. arrows, symbols for schematics, fighter aircrafts, origami folding,...). An older program that is less frequently used to today, but comes with a nice library is Xfig.

Xfig has it's own file format which is a little unhandy. The following script can be used to convert the entire Xfig clipart library to .svg files. It works under Ubuntu. The package transfig is required for the conversion.

2011-07-31

Reparing a broken MD-Player

Today I found an old Sony MD Player in the basement (Sony MZ-710). It had stopped working. After inserting an MD, the internal mechanics created lots of jerky chattering for some time and after that displayed 'READ ERR'. No music would be played.

Strangely this problem could be fixed easily by removing at least some of the screws, which must have bend the body of the device. The problem returns if the screws are reinserted.

I would guess this might also be helpful to other people. There are at least hints on the internet, that this problem arises out of some production problems and not due to bad handling, e.g. dropping the device.

2011-07-31