My Expeditions

Travel expeditions, expeditions in to the mind, into rituals, into cultures, into computer programming, into thought process, into anything that I can imagine....

Sunday, January 25, 2009

Recovering text from old books

My house is filled with old books n Vedas, Sanskrit, and many Epics. Many of them printed atleast a century ago, and that too in Grantham. The script was used in ancient times for Sanskrit. Devanagiri is just another script for Sanskrit, just as Grantham. Even today, there are a few letters that are used in Tamil that have their roots in Grantham. Eg. , கஷ, , . People call these letters as Vada Mozhi (வட மொழி, litrally - Northern language/ Sanskrit). A lot of these letters and their variants are still found in Malayalam(, ,,) and to some extent in Telugu and Kannada as well.

These books are generally out of print. The script, doesn't have a official font, in the computers. I came to know that one professor at the Indian Institute of Technology, Madras, has developed a font for this script, but has it strictly in private circulation.

Anyways, I don't have the time/ resources to re-type the hundreds of books back into text format. What I can do, is to try and scan a few of them that my father and his friends use, and print them again (at home) so that the book itself will be preserved.

While, I was eying at this exercise, I stumbled upon one of my colleagues, who was on a similar mission. Apparently, her dad had picked up a book from a historical library and wanted to do something similar. Recover the text into a readable format from a out-of-print book.

With us, we had the following tools:
1. A digital Camera (SLR)
2. A flat bed scanner from HP
3. Adobe Photoshop (a friend has it)
4. GIMP (am a Linux Fan)
5. Original material (books - hundreds of them)

When I tried to recover the pages of the book for the first time, it was a difficult and frustrating. Finally I arrived at a "formula" that works on many of the pages that are reasonably smooth and uniform. Below are the steps that I followed (in GIMP on Kubuntu-Linux)

1. Original Scanned Page (part)

2. Increased the contrast in Gimp

3. Burnt the shadows using BURN tool
4. In, the levels dialog, I set the WHITE point using the filler tool (GIMP-> Colour->Levels)

5. DODGE the highlights

6. Burn the shadows again

7. Convert to INDEXED mode with GREY Scale index

8. Convert back to RGB Mode, Set White point in levels and Burn the Shadows again

9. Remove unnecessary spots using eraser. Anti-Alias for better viewing, some fine tuning


I was able to recover some portion of this particular "EASIER" page. There are pages that are pathetic. People have used the book for many years. The brittle pages have given way and about a decade back, people applied cellophane tapes over it to prevent them from falling apart. Some pages have even been laminated to "Preserve" them, after so many decades. The result?, the pages look RED/ BROWN. When I try to increase the contrast, I can't differentiate between the text and the page. The background has started blending into the text (or vice versa).

Does any one have enough experience fixing such images? (Will post a sample of the bad page soon).

Ref. to the question, I have asked in in Yahoo! Answers --> Link to Yahoo! Answers.

Labels: , , ,

Tuesday, October 10, 2006

A great laugh..............

It has been quite some time since I made a posting. A lot of things did happen. Some very good things in life. Some very enjoyable moments some funny, some good amount of learning and some very very unfortunate stuff.

Out of the lot, I thought, I should post one of the most funniest incidents in the recent past....

I had quit my previous company and have joined Cognizant exactly two weeks earlier(to the incident). I am now new to this Banking project which includes a lot of new technologies and development methodologies and a lot more stuff.

Well.. one fine day, I had decided to go to office in my motor bike instead of the usual Office Bus. The occasion being having to pickup some one from the railway station.

It was 8:30 PM and I was still in office. I was very very busy and was having a lot of meetings that day. I had to take excuse from my supervisors so as to leave office at that time. I was very very tired. I came running to the bus and boarded the bus... well.. I forgot that I had come to office in a bike.

I was sitting in the bus and was talking to one of my new-teammates who was also traveling in the same bus. Then all of a sudden, I remembered that, I had come to office on a motor bike and not by bus. So.. I excused myself and started to get down. When my team mate and another new-joinee girl asked me what I was up to, I told them the truth. Well... now was when the biggest joke happened. the other new joinee, who had joined along with me, started laughing hysterically. She wasn't able to accept the fact that I would tell her the truth. She advised me never again to tell such truths to any girl, and that I should excuse myself sighting other reasons, masking my stupidity.

The next day in office, my team mate had a good laugh, still thinking of the other girl's laughter.... :-))

Friday, February 17, 2006

Breakfast with Serp...

Today, I had an unusuall company for breakfast. Just after finishing my breakfast of 4 small sized dosas, I came out and saw that, a tiny little ____ had also finished his breakfast just then. The dish being most probably a frog.

Considering the previous experiences of kicking from bicycle, pulling it out of the gate, watching a censorable scene three times at the college hostel, and so on, This time, I decided to shoot the one that had just finished his breakfast.

I immediately went for my Sony digicam and had a few shots. Will post the pics shortly.

Saturday, January 21, 2006

With my brother getting transferred to Singapore, we decided to get home a broad band connection (nothing but BSNL Data One), a web cam and a new headset.

I called up my schoolmate A. Mohemad Haaris who is a partner in Xeroxtronics at Mambalam and asked him to home deliver a webcam and a headset. After a few days, he sent me a fancy Zebronics ZEB -350WC web cam. It calls itself as a night vision web cam. Wonder what it really means. I tried connecting it to my PC. Initially, the camera was not detected either by M$ Window$ XP nor by the then Mandrake (now Mandriva) Linux 10.1.

Later in the evening, the camera started working under windows perfectly. But I cant risk my PC to connect to Internet through Windows. I had enough trouble of loosing my data to virus three times earlier. So, never will I connect my PC to internet through Windows. Who is going to pay for the resource hungry Anti Virus Softwares. I am simply fed up with Anti Virus software that has caused enough embarrassment in front of my clients, by slowing/hanging my PC. So somehow I have to get this camera running under Linux. Fine. How to do that?

A little Googling helped a lot. I am not going to elaborate on how I searched. But I guess, it will be very useful to list down the steps.

[root@localhost kumar]# lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 0ac8:305b Z-Star Microelectronics Corp.
Bus 001 Device 001: ID 0000:0000

Okay: my Camera is actually a Z-Star Microelectronics Corp. 305 Rev. B

A little more Googling and the screen shots in the user manual revealed that my camera has an alias name Vimicro Zc305B.

More Googling: a French website had just the right thing for my camera. A driver for Linux :-).

I then downloaded the source tar ball and followed the sequence of steps as described from the site

For reference here it is again.

  1. Downloaded Spca5xx driver source tar.gz to local. (spca5xx-20060101.tar.gz)

  2. su to root (Root console in Konsole)

  3. mv spca5xx*.gz /usr/src (move the tar.gz to /usr/src folder)

  4. tar -zxvf spca*.tar.gz

  5. cd spca5xx*

  6. make (This will dump a few things on the screen)

  7. make install (this will again dump something on the screen)

  8. modprobe spca should do an auto-complete as modprobe spca5xx

  9. vi /etc/X11/XF86Config

  10. Search for -- Section “Module”

  11. Add the line -- Load “v4l”

  12. Re-start X Server.

  13. Open Gnome Meeting and start chatting.

BUT BUT BUT.. , my web cam worked only when I login as root. This must be a simple “rights” issue. So I checked with “ ls /dev/vid*”. This revealed that /dev/video0 was not accessible by any one other than root. So I did a “chmod a+rwx /dev/vid*”. After this, the camera is working perfectly under any user....:-)

Another useful place to look at for checking the correct functionality is to tail “/var/log/messages”

Please do let me know if any of you have a similar experience................:-)

Pending Pending pending.....

It has been a long time since I had updated my blog. A lot many things did happen during this “Idle” time. I was awarded the “Star of the Month” award for the month of October 2005. Five of my clients had come down to my office to test the application which was developed by a team of ten in about two months. Got some “prizing” words from the mouths of my clients who has an experience more than my age :-).

Out of the many blogs that are remaining to be uploaded/typed out are

  1. My trip to Paris with Anantharaman at Fontainblaue.

  2. My stay at Amsterdam (more info)

  3. Brussels and Luxembourg

  4. The lazy French airport staff at CDG airport

  5. The diverted flight and foray into Nagpur for four hours at midnight

  6. Tributes to my “Periyappa”.

  7. My broad band experience which has just been postponed

Well before all that, I want to write this technical blog on my web cam.

Monday, October 03, 2005

More Blogs on the way...

Hmm... Therez so much to say, so little time.
Herz a short note on what to expect over here in a short while...

I had been to Luxembourg over the weekend, all alone.
Two weeks earlier, I had an adventure trip to Paris, along with Anantha Raman.
Hurt one of my best friends and collegues... I was using his digi-cam, and made some unnecssary comments.
Well.. I have almost finished my stay at Amsterdam, starting from 21st August. There are tonnes to write about AMS....

My travel to Sirkali, Kumbhakonam and the temples around.

lots and lots more....

when am I going to write about all this????

Tuesday, September 27, 2005

A trip to Zaanse Schans

Zaanse Schans is a small village near Amsterdam. Recently we took a 20 mintute train from Amsterdam Centraal to Zaanse Schans. It was our first outing together. Me, Jayasankar and Madhav had ventured into the expedition, on the guidelines of Narayan.

We got down at the Zaanse Schans station and started our walk towards the unknown. We crossed some stinking streets, stinking with the smell from a near by factory. Looked more like a rice mill to me. There we crossed a bridge, from where a lot of old windmills were visible. Okay, now that we are on the right track, we marched forward and got into one of the first windmills. The entry ticket cost us 2.5 euros per head. The Cat, as it was called was huge from inside. They were using the windmill for grinding colour powder. When we were there, they were grinding some lime stone. Two huge stone wheels, each weighing 3 tonnes were being rolled by the power of AIR....

we went up and down the windmill, clicking as many pics as possible. After getting tired, we got out of the tiny windmill, and went forward to see the other two windmills in the same direction. we did not bother to enter any of the other windmills.

Ofcourse, the windmills were very beautiful and considering that they were built hundreds of years back, it was really breathtaking. Obviously it was a very windy place. I am visiting Amsterdam when it has one of the best climates of the year. So it was really COOL and good.

A few ducklings were having a feast at a near by fields.

There was also some model town, model village, and lots and lots of small bridges around.

In the village, in a small hotel, I took some mineral water, while Madhav and Jay took an ice fruit. While we enjoyed our refreshments, sitting in what was once a hut, we observed some people trying to walk using an alluminium walking sticks. I dont know what you call it, but it has a small foot hold, and you have to climb on it and walk with the stick. Jay was good at doing it. Madhav tried hard in vain. When I tried, I bannged a few times on the walls of the hut it was leaning on. An old lady got tensed and rushed out to check what had happened to her hut.

While returning from the windmills, there were a lot of beautiful Roses literally everywhere. The streets were all decorated with beautiful flowers. Just trying to imagine my home place with such decorations.

By the time we got back to Amsterdam it was afternoon. I had my first ever Falafel. Falafel is a "Aamai Vadai" type of dish, which is placed inside a Naan like bread. This stuff costs around 2.8 Euros for a small piece. But you are allowed to take any amount of vegitable Saladas available at the Moaz shop.

when we were nearing our home, we were crossing one of the many cannals of Amsterdam. The sun was setting late in the night, and it was a beautiful sight. We stopped to take a few snaps. But we were surprised when hundreds of boats started stromming the cannal. It was some kind of cannoing weekend it seems...

actually, am not in the best of the moods to describe all the places. I will do so when I get more time. It was actually a lot of interesting things that happened.

more later.....

Monday, August 29, 2005

First trip in Holland -- Alone

I landed in AMS - Schipol Airport last Sunday. The very day, I had a small trip to the DAM Square and the Centraal station(no spelling mistakes there.). The idea was to have a feel of the city, I am going to live in for the next few weeks, and also to get a bus pass, so that I can travel about during my stay. The week I landed in wasn't so neat. The garbage cleaners had gone on a week long strike, and there was this shopping festival, through ships, from all over the world.

Well, that was the first day in AMS,

Today being the Second Sunday in the Hollow Land, my roomy - Jayasankar had arranged for a trip to some of the cities of the Land under sea level - Holland. He was kind enough to pay my bill, so that, I can pay later and also gave me his mobile phone, just in case, for emergency use only.

I had to use the mobile, in the very first hour itself. I got down at DAM Square, after boarding the tram at Johan Houzingalaan (sounds something like that, but read Johan as Yuohaan). I got down at DAM Square, but din know how to get to the bus stop. I used Jay's mobile to call up Madhav. After thinking for a while, he suggested that I should ask for the Teaser's restaurant, if people don't recognize AmEx Bank. Luckily for me some road cleaners understood where AmEx bank was. Thankfully, I wasn't embraced by asking them for the restaurant. The bus was waiting a couple of buildings away from AmEx bank.

After getting the boarding pass from the office, I finally found the bus and boarded it. It was a nice bus, and we weren't allowed to have food in it. First thing that the tourist guide showed us was the railway station (Centraal) and the thousands of bikes (bicycles) parked in a multistoried stand. I wonder, how we can identify our cycle from that lot. I usually have a tough time recognizing my cycle at Pallavaram cycle stand.

Then there was this arch. Arches are common throughout Europe I guess. You can find one almost everywhere. Like Paris for instance. This particular arch was the arch for the port. Wait a minute.. Where is the port now? It has moved to someother place?? Quite possible.

We saw many things on the way, including some windmills that were used to drain water from the sea, to claim the land. Almost all bridges in Holland can be lifted to make way for boats. I don't know how many of them are still operational.

The bus had 12 Infy guys from London, 2 South African Pharmasits of Indian Origin, practicing in London, 3 different old couples of Indian origin now living in different parts of Europe, including Swiss. Thus the bus was filled with Indians or at least ethnic Indians.

Our first stop was at a Wodden shoe factory. There they showed us how they make some costly wodden shoes which can be used only for show case. People claim that they still use the shoes for some agri work, as it is waterproof. I dont know, how t will be waterproof when the water is ankle deep.

We had passed through the Alsameer flower market. It was closed for the weekend.

We went through The Hague and passed through Rotterdam also. No stopping what so ever. We then went to Delft. There they had this blue pottery. They had originally tried to copy Chineese and Japaneese Pottery, and imported clay from neighbouring countries. Instead of using the wheel for making the pottery, they make the clay into a proper liquid and pour it into hollow POP moulds (Plaster of Paris). its very costly and when asked if they can be used for normal house hold, the reply was it was for showcase only. They were also complaining that the Chineese were making fake pottery with their name. Hmmm... something fishy???

At Delft, we had stopped for lunch. As usual, like any other Indian long distance bus, the driver almost forced us to have our lunch at his fav. restaurant. People are same everywhere. I requested the guide to help me find a place to have my food, which I had brought. She asked me to have atleast a drink so that she can get me a table to eat my own food. I ordered a capaccino. I think, i did the right thing. We had stopped for an hour, and I finished my lunch in just 15 mins of stopping. After that, I wandered through the streets of Delft. Old beautiful, Typical Europian architecture. It was good. I was roaming for 45 mintues. Others werent lucky. They barely finished their lunch when the bus was ready to leave.

We stopped by at The Hague. We saw the prison where the War crimes criminal - forgot his name- is being put now. we stopped at the International Court of Justice, and the flame of peace.

We were passing through some forrest like area. The guide told us that it was a park built in the 1930s. Actually, during 1930s, there were was an economic slump and people were without jobs. In order to provide jobs to people, the govt came up with an idea of building a park. Many thousand people were employed for the next decade and the job they did : plant trees, and build a park. WOW.. what a way to give employment.

There was this American guy in his mid 30s who had come with his old mom. He was quizzing the Guide about the difference between Holland and The Netherlands. She replied that it was one and th same. Just an allias. But later, I came to know from Jayasankar, that before The Netherlands became a country there were many small provinces, and Holland was the biggest province. People wanted Holland to be a part of the new country. But Holland demanded that its Capital, Amsterdam should be the capital. The big boy always wins. The wish was granted. But it is still very funny to me. There is nothing in Amsterdam to call it as a Capital. The queen, the Parliament, and all govt offices are all at The Hague. Amsterdam just boasts about a very big airport, some cannals, and no-culture. Then what else is there in Amsterdam to call it as the Capital????

That was the end of my first tour of Holland.

will keep posting....