<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkQMQ3Y9cSp7ImA9WhRRFkw.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764</id><updated>2011-11-29T17:46:22.869-06:00</updated><category term="Mimics" /><category term="DICOM" /><category term="ezDICOM" /><category term="django ajax json javascript" /><category term="counting" /><category term="xargs" /><category term="storage" /><category term="ffmpeg" /><category term="modules" /><category term="django" /><category term="spellcheck" /><category term="mplayer" /><category term="Programming" /><category term="matlab" /><category term="make" /><category term="Osirix" /><category term="ImageMagick" /><category term="python" /><category term="Magick++" /><category term="unix" /><category term="Linux" /><category term="html" /><category term="script" /><category term="fem" /><category term="makefile" /><category term="MevisLab" /><category term="abaqus" /><category term="image processing" /><category term="correlation" /><category term="OCR" /><category term="ImageJ" /><category term="beautifulsoup" /><category term="tesseract" /><category term="modulefiles" /><title>Images &amp; Visualization</title><subtitle type="html">Blog on multiple topics in Image Processing and Visualization and anything else not connected.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://imageviz.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/imageviz" /><feedburner:info uri="imageviz" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;A04MQ3c_eCp7ImA9Wx5UF0Q.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-6230270327969663645</id><published>2010-10-22T14:23:00.023-05:00</published><updated>2010-10-22T21:13:02.940-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-22T21:13:02.940-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="image processing" /><category scheme="http://www.blogger.com/atom/ns#" term="correlation" /><category scheme="http://www.blogger.com/atom/ns#" term="counting" /><title>Calculating the number of repeating objects in an image</title><content type="html">Recently I was asked to help solve a problem determining the number of seats in an airline. An example of such an airline layout is shown below (click to view the bigger image.)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_iniZFBtdGok/TMHnVTDy-FI/AAAAAAAABaE/ELzVnvUe8Pg/s1600/airline_seating.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 70px;" src="http://3.bp.blogspot.com/_iniZFBtdGok/TMHnVTDy-FI/AAAAAAAABaE/ELzVnvUe8Pg/s400/airline_seating.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5530956170467145810" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I decided to use the method I knew best, Cross Correlation. The idea is to cross correlate the template of the seat (i.e., an image of a single seat) with every pixel in the airline layout image. The template (coordinate origin is its center) is moved over to a particular pixel in the image. The cross correlation coefficient is calculated and the value is used as the intensity of a new image. This is repeated by moving the template to every pixel in the airline layout image. The pixels for which the template matches perfectly with the airline layout image, will have the correlation coefficient close to 1. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_iniZFBtdGok/TMHnRynvqlI/AAAAAAAABZ8/dBmI793tHbQ/s1600/template.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 48px; height: 45px;" src="http://2.bp.blogspot.com/_iniZFBtdGok/TMHnRynvqlI/AAAAAAAABZ8/dBmI793tHbQ/s400/template.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5530956110219946578" /&gt;&lt;/a&gt;&lt;br /&gt;Above: A hard to see template of the seat.&lt;br /&gt;&lt;br /&gt;The results of the cross correlation is shown below (click to view the bigger image.)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_iniZFBtdGok/TMHnMwa-5xI/AAAAAAAABZ0/Ho8cv8efg9U/s1600/correlated_image.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 123px;" src="http://1.bp.blogspot.com/_iniZFBtdGok/TMHnMwa-5xI/AAAAAAAABZ0/Ho8cv8efg9U/s400/correlated_image.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5530956023730202386" /&gt;&lt;/a&gt;&lt;br /&gt;The bright spots in this image are the points with the highest correlation. It then becomes a simple process of segmenting the high intensity pixel. &lt;br /&gt;&lt;br /&gt;To perform these operations, my natural choice was Matlab and its Image processing toolbox. &lt;br /&gt;&lt;code&gt;&lt;br /&gt;im = imread('airline_seating.jpg');&lt;br /&gt;im = rgb2gray(im);&lt;br /&gt;&lt;br /&gt;im_template = imread('template.jpg');&lt;br /&gt; im_template= rgb2gray(im_template);&lt;br /&gt;&lt;br /&gt;C = normxcorr2(im_template, im);&lt;br /&gt;C1 = C&gt;0.7;&lt;br /&gt;&lt;br /&gt;stat = regionprops(C1);&lt;br /&gt;noofseats = size(stat,1);&lt;br /&gt;disp(['Number of seats = ',num2str(noofseats)]);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In the first 4 lines of code, we read the airline layout image and the template image. To obtain the correlation image, I did not have to write my own correlation function instead Matlab has one already ready to be used. This function, normxcorr2 needs the airline layout  and the template matrix. Once the correlation image is obtained, we segment it based on the logic that any pixel with value more than 0.7 is considered as pixels corresponding to the center of seat. Since the center of the seat did not segment as a single pixel, I could not count the number of pixels as the number of seats. Instead I calculated the number of regions using regionprops and store it as a structure. The number of elements of the structure is the number of seats.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-6230270327969663645?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/6230270327969663645/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=6230270327969663645" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6230270327969663645?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6230270327969663645?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/aLfI8iF08V0/shdflkghjsdlkfgjh-0.html" title="Calculating the number of repeating objects in an image" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_iniZFBtdGok/TMHnVTDy-FI/AAAAAAAABaE/ELzVnvUe8Pg/s72-c/airline_seating.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2010/10/shdflkghjsdlkfgjh-0.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAARXozfyp7ImA9Wx5UE0s.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-604151876886253520</id><published>2010-10-06T13:22:00.010-05:00</published><updated>2010-10-17T21:09:04.487-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-17T21:09:04.487-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="beautifulsoup" /><category scheme="http://www.blogger.com/atom/ns#" term="html" /><title>Spamming of HTML forms - one case</title><content type="html">Recently I found that a newspaper in its online edition switched from image based &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA"&gt;CAPTCHA system&lt;/a&gt; to solving a mathematical puzzle, in-order to prevent spamming of their comment section using a computer program. A screen capture of the same can be found below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_iniZFBtdGok/TKy-fCAz40I/AAAAAAAABZI/NcAc6y_8bEg/s1600/Picture+1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 222px;" src="http://2.bp.blogspot.com/_iniZFBtdGok/TKy-fCAz40I/AAAAAAAABZI/NcAc6y_8bEg/s400/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5525000283202249538" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The problem with such a system is that they can be easily solved using a computer, which defeats the purpose of using it to differentiate human and computers apart. To test my own skill, I wanted to write a program that can download the page, read it and solve the puzzle as well. Using the information I obtain, I could then post comments without human intervention. &lt;br /&gt;&lt;br /&gt;To accomplish this task, I used the usual suspects like python and and the HTML parser, &lt;a href="http://www.crummy.com/software/BeautifulSoup/"&gt;BeautifulSoup&lt;/a&gt;. BeautifulSoup reads a string of html or xml and converts it to a tree. Using the tree, it is easy to navigate through the tags or search for a particular one based on id or name. It is also powerful enough to differentiate tags based on CSS class in html tags.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;1. import urllib&lt;br /&gt;2. from BeautifulSoup import BeautifulSoup&lt;br /&gt;3. import string,re&lt;br /&gt;&lt;br /&gt;4. doc = urllib.urlopen('http://www.somesight.com/comment/reply/1854565').read()&lt;br /&gt;5. soup = BeautifulSoup(''.join(doc))&lt;br /&gt;&lt;br /&gt;6. a = soup.findAll("span",{"class":"field-prefix"})&lt;br /&gt;7. b = a[0].contents[0].split("=")[0].split("+")&lt;br /&gt;8. c = [int(bs) for bs in b]&lt;br /&gt;9. captcha_response = sum(c)&lt;br /&gt;10. print a,captcha_response&lt;br /&gt;&lt;br /&gt;11. token1 = soup.findAll("input",id="edit-captcha-token")&lt;br /&gt;12. token1_val = token1[0]['value']&lt;br /&gt;13. print token1,token1_val&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The two important information that I need to calculate are the captcha_response which is the solution to the mathematical problem and the captcha_token, a hidden html field in the webpage. Line #6 searches for a class, field-prefix in span tag. This tag contains the string for the mathematical puzzle that needs to be solved.  I obtain the contents of this string and split it in-order to obtain the individual numbers in a list. Finally I convert those numbers from string to integer in Line #8 and sum them using line #9. &lt;br /&gt;&lt;br /&gt;Line #11 searches the hidden captcha token, stored in the input tag with id="edit-captcha-token".&lt;br /&gt;&lt;br /&gt;Armed with these two information, we can post any name and comment to the form. The comments were moderated but it would still require lot of human intervention to clear the spams. &lt;br /&gt;&lt;br /&gt;I informed the webmaster of this issue. They have since moved to a image based system. I removed all reference to the site in this blog post and program in-order to keep their anonymity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-604151876886253520?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/604151876886253520/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=604151876886253520" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/604151876886253520?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/604151876886253520?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/nYEvVAcDETw/spamming-of-html-forms-one-case.html" title="Spamming of HTML forms - one case" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_iniZFBtdGok/TKy-fCAz40I/AAAAAAAABZI/NcAc6y_8bEg/s72-c/Picture+1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2010/10/spamming-of-html-forms-one-case.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEESXc-eip7ImA9Wx5WEUs.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-7240943281193537224</id><published>2010-09-21T14:16:00.026-05:00</published><updated>2010-09-22T10:00:08.952-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-22T10:00:08.952-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="django ajax json javascript" /><title>Ajax in django</title><content type="html">Asynchronous Javascript and XML (Ajax) has become the most important tool for web developers in improving the look and feel of their website. A normal HTML request is sent by a client with request for a particular page. The server prepares the page and sends it to the client browser that renders the page. This approach is still valid for most pages. But the problem is that the whole page gets rendered every time the server processes a request. This might be acceptable for some websites but sites like google maps, stock ticker sites would rather modify a small portion of the page rather than reload them completely. Ajax plays an important role in such applications.&lt;br /&gt;&lt;br /&gt;Django provides support for Ajax and my google-fu turned up a few of them that were really good. The problem I had with them was that the sites focused more on how syntactically Ajax can be executed in Django rather than the overall principle. So, in this post I will focus just on the basic principles of Ajax in Django. The anatomy of a typical django request can be summarized by the image below. The request comes in from the client, the view function processes it and the response is returned using a call to HttpResponse or render_to_response etc. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_iniZFBtdGok/TJkKPXUEfyI/AAAAAAAABXw/vUcAjUKw-RE/s1600/Picture+1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 368px;" src="http://1.bp.blogspot.com/_iniZFBtdGok/TJkKPXUEfyI/AAAAAAAABXw/vUcAjUKw-RE/s400/Picture+1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5519454077391765282" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;In a normal django request, the response is in the form of HTML or CSV or some such file. Ajax needs JSON or XML instead. Hence django is almost ready for Ajax. The only extra step is the need to serialize the data in to JSON or XML format. Django makes it easy by providing serializers that are builtin. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;During the process of serializing, django takes two approaches. &lt;span style="font-weight:bold;"&gt;The first approach is for serializing list of django model objects and the second approach is for everything else.&lt;/span&gt; The everything else could include any dictionary of values that you create but need to pass through serialization. Lets look at each approach separately. Both approach are serialized using simplejson built in to django. In the former, django provides a separate module and hence you do not have to make an explicit simplejson call. In the latter, you need to make explicit calls to simplejson functions. &lt;br /&gt;&lt;br /&gt;In the first approach, we pass the list of django model objects to the serialize function in the serializers module. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt; from django.core import serializers&lt;br /&gt; &lt;br /&gt; def search(request, query):&lt;br /&gt;  return serializers.serialize("xml",User.objects.filter(lastname__startswith=query))&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In the second approach, we need to make a explicit call to simplejson. In the program below, we first load the simplejson module. We then create our dictionary using the values, number and image_loc. We then return the json value using simplejson.dumps() function and django's HttpResponse function. The javascript on the django template will then modify the HTML page according to the values in the json object. If you use the first approach to the dictionary that you created, it will give an error, "'str' object has no attribute '_meta'"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;from django.utils import simplejson&lt;br /&gt;&lt;br /&gt;def servevalues(request):&lt;br /&gt;    number = 10000&lt;br /&gt;    image_loc = 'http://www.google.com/images/logos/ps_logo2.png'&lt;br /&gt;    data = {"number":number,"image_loc":image_loc}&lt;br /&gt;    return HttpResponse(simplejson.dumps(data),mimetype='application/javascript')&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Remember:&lt;br /&gt;1. Ajax calls to django are very similar to http request calls. Both return some form of textual information. Hence syntactically they look alike&lt;br /&gt;&lt;br /&gt;2. There are 2 approach to serializing. The first approach is for django model objects and the second approach is for any other object / dictionary that you create. In either case, the code that you have to write is minimal and simple, the django way!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-7240943281193537224?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/7240943281193537224/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=7240943281193537224" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7240943281193537224?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7240943281193537224?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/V69_M-gURqE/ajax-in-django.html" title="Ajax in django" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_iniZFBtdGok/TJkKPXUEfyI/AAAAAAAABXw/vUcAjUKw-RE/s72-c/Picture+1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2010/09/ajax-in-django.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04CQHsyfCp7ImA9Wx5VEkU.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-8447986147898856235</id><published>2010-07-16T11:34:00.011-05:00</published><updated>2010-10-05T09:46:01.594-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-05T09:46:01.594-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="django" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><title>Keep tab on items you lent using borrow-err.com</title><content type="html">On my free time, I have been working on a small but useful and interesting project. It resulted in the site &lt;a href="http://www.borrow-err.com/"&gt;http://www.borrow-err.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The reason for creating the site was my forgetfulness. I lend books to others and I forget about it. So, I decided to create a website where I can keep track of items I lent to others. If you would like to try it, just key in the details of the items and the name of the borrower in to the home page. The website will then send you a reminder email every month for the items you lent. If you are lucky and you get your items back, you can remove them from the list using the links provided in the email. &lt;br /&gt;&lt;br /&gt;You can access it using any browser. The page is also light enough that it loads fine in mobile browsers as well. So whether you are at home, office or on road, you can use borrow-err.com to keep track of items that you lent.  Try it and give me your feedback.&lt;br /&gt;&lt;br /&gt;Remember: &lt;span style="font-style:italic;"&gt;borrower's err, so you need borrow-err.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;October 5th, 2010: &lt;span style="font-style:italic;"&gt;The previous version had the bare minimum styling. Hence I made some changes and I believe the new version is more pleasing to your eye.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-8447986147898856235?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/8447986147898856235/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=8447986147898856235" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8447986147898856235?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8447986147898856235?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/mnRyZ9BAM9s/keep-tab-on-items-you-lent-using-borrow.html" title="Keep tab on items you lent using borrow-err.com" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2010/07/keep-tab-on-items-you-lent-using-borrow.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUMQXo_cSp7ImA9WxNaEEQ.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-6183698968478893033</id><published>2009-11-21T10:48:00.006-06:00</published><updated>2009-11-24T13:18:00.449-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-24T13:18:00.449-06:00</app:edited><title>Did you know that ... Part 2</title><content type="html">1. Digital Imaging received this years Nobel Prize in Physics. Willard&lt;br /&gt;Boyle and George Smith received their recognition for work on Charge&lt;br /&gt;Couple Devices (CCD) used in range of scientific instruments including the telescope.&lt;br /&gt;&lt;br /&gt;2. There have been many Nobel Prize awarded to people who used imaging as one of their tools of investigation&lt;br /&gt;&lt;br /&gt;3. Hough Transform used in the detection of geometrical shapes was initially &lt;a href="http://www.google.com/patents?vid=3069654"&gt;patented&lt;/a&gt; by Paul Hough in 1962&lt;br /&gt;&lt;br /&gt;4. &lt;a href="http://stardust.jpl.nasa.gov/tech/aerogel.html"&gt;NASA Aerogel&lt;/a&gt; was used to collect the interstellar and comet particles. The aerogel slows the particles otherwise traveling at high velocity to a halt without heating. NASA collected images of these tracks along which the particle translated and requested help from public in determining the location of them.&lt;br /&gt;&lt;br /&gt;5. &lt;a href="http://www.openshotvideo.com/"&gt;Open shot&lt;/a&gt; is a free non-linear movie editor under Linux. You can clip, resize and trim movies, add transition between scenes, change speed of clips and even "&lt;a href=http://en.wikipedia.org/wiki/Ken_Burns_Effect&gt;Ken Burns effect&lt;/a&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-6183698968478893033?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/6183698968478893033/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=6183698968478893033" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6183698968478893033?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6183698968478893033?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/_9ZlZMv7amc/did-you-know-that-part-2.html" title="Did you know that ... Part 2" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/11/did-you-know-that-part-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEENRHYzeSp7ImA9WxJUEEs.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-5152344979952727508</id><published>2009-07-08T09:43:00.003-05:00</published><updated>2009-07-08T10:24:55.881-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-08T10:24:55.881-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="matlab" /><title>Matlab alternatives</title><content type="html">Matlab is a powerful programming language for scientific computing. The popularity of Matlab stems from the fact that it is a high level programming language focusing more on faster development and less on syntax. It also has many tool boxes that extend the functionality that is offered by basic Matlab on to other scientific and engineering domains. In spite of all these advantage, it comes with a price, the fact that we need to pay for purchasing, installing and maintaining it. Although the price we pay might be easily offset by the benefits, many Matlab like software are in existence and perform similar even if not the same set of functionality. In this blog, we will look at some of the alternatives. In all these alternatives, the program written to be run on Matlab can be run directly, within the constrains of functionality offered by that particular software. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;FreeMat&lt;/span&gt;&lt;br /&gt;&lt;a href="http://freemat.sourceforge.net/"&gt;FreeMat&lt;/a&gt; is a open source software released under GPL. It is available for most of the common OS like Windows, Linux and Mac. Installing the software on a Windows machine was a piece of cake. Its repertoire of functionality is large but does not have many of the toolboxes offered by Matlab.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Octave&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.gnu.org/software/octave/"&gt;Octave&lt;/a&gt; is another software available under GPL. The syntax of Octave commands are similar to Matlab (&lt;a href="http://www.gnu.org/software/octave/FAQ.html#MATLAB-compatibility"&gt;and not the same&lt;/a&gt;) and is also highly extensible using C, C++ and Fortran. Unlike FreeMat, Octave comes with many toolboxes for Image processing, Signal processing, Statistics etc. Installing the software on a Windows machine using &lt;a href="http://www.cygwin.com/"&gt;cygwin&lt;/a&gt; is easy but installing from source on Linux machine requires expertise due to many dependencies. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Numpy and Scipy &lt;/span&gt;&lt;br /&gt;&lt;a href="http://numpy.scipy.org/"&gt;Numpy and Scipy&lt;/a&gt; are Python modules that can be used to perform high level scientific computation like Matlab. Since these modules are based in python, their syntax is not similar to Matlab but due to its focus on high level programming, the syntax is generally simple. With installation of dependencies like python imaging library (PIL), we can perform image and signal processing. Scipy can also be used to perform optimization and statistics. Prebuilt binary packages are easy to install but installation from source is cumbersome due to its dependencies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-5152344979952727508?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/5152344979952727508/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=5152344979952727508" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5152344979952727508?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5152344979952727508?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/j5XRpqZu1As/matlab-alternatives.html" title="Matlab alternatives" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/07/matlab-alternatives.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUHQXc7cSp7ImA9WxVVEU8.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-2446539239791373401</id><published>2009-02-19T13:19:00.015-06:00</published><updated>2009-03-03T16:43:50.909-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-03T16:43:50.909-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="fem" /><category scheme="http://www.blogger.com/atom/ns#" term="abaqus" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="script" /><title>Python and Abaqus</title><content type="html">Recently I had the opportunity to work with a student who needed to perform a Finite Element Analysis on roughly 400 files using Abaqus. Processing such large number of images using the graphical user interface would have been impractical. We were happy to learn that Abaqus has a python scripting module which could help us with the automation.&lt;br /&gt;&lt;br /&gt;We set about writing the python program from the individual function calls given in their manuals. But considering the scope of the software and its complexity, the approach quickly became difficult. Instead, we resorted to creating "macros" and modifying it to our purpose.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 0, 0);"&gt;Creating Macros&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The macros in Abaqus lets you perform a series of operations and record them as python scripts. The scripts by default are stored in "abaqusMacros.py" with each macro recorded as a function. Since the macro was created for a particular model, we modified the names in the function " Entire_Work_Flow" to be generic so that other models can be loaded. We then added other functions that will call the function created using macro.&lt;br /&gt;&lt;br /&gt;The other function created were "getvalues" that obtains the relavant von mises stress values from the ODB file. The main function reads each of the solid model (.sat file) in a given directory and passes the filename to the macro function. It then calls getvalues function and stores the result in a CSV file for further analysis.&lt;br /&gt;&lt;br /&gt;To run the script, type "abaqus cae -noGUI scriptname.py".&lt;br /&gt;&lt;br /&gt;The Entire_Work_Flow has been trimmed to show only the relevant lines that corresponds to creation of the name of parts, instance and job name.&lt;br /&gt;&lt;br /&gt;&lt;object id="_ds_4637202" name="_ds_4637202" type="application/x-shockwave-flash" data="http://viewer.docstoc.com/" width="670" height="550"&gt;&lt;param name="FlashVars" value="doc_id=4637202&amp;amp;mem_id=14095&amp;amp;doc_type=doc&amp;amp;fullscreen=0"&gt;&lt;param name="movie" value="http://viewer.docstoc.com/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/object&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;a href="http://www.blogger.com/docs/4637202/Abaqus_python"&gt;Abaqus_python&lt;/a&gt; - &lt;a href="http://www.docstoc.com/"&gt;Free Legal Forms&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-2446539239791373401?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/2446539239791373401/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=2446539239791373401" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/2446539239791373401?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/2446539239791373401?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/mA1HmZN7vhg/python-and-abaqus.html" title="Python and Abaqus" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/02/python-and-abaqus.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4GRHg6fyp7ImA9WxVQFko.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-2159026566758030798</id><published>2009-01-26T16:04:00.014-06:00</published><updated>2009-02-03T10:35:25.617-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-03T10:35:25.617-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="unix" /><title>New Line command</title><content type="html">Once in a while, I come across a task that i need to perform, may be using a python script and then it amazes me to find a tool built in to Linux / Unix.&lt;br /&gt;&lt;br /&gt;I had a series of numbers (stored as a column) representing a physical quantity measured with respect to time. The data was stored as a text file. I had to add the time (in seconds) column before the column in the file. The first row had time of 1 second, the second row had a time of 2 seconds etc. In short, I just needed to add the line number to each row.&lt;br /&gt;&lt;br /&gt;Ordinarily, one could use python to open the file, read each row and add a incremental number in front of each row. But with Linux all that I had to do was &lt;br /&gt;&lt;br /&gt;&lt;code&gt;nl file1.txt &gt; file2.txt&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;where 'nl' is the new line command. The file 'file1.txt' contained the one column of numbers, the measured values and 'file2.txt' will contain two columns, the seconds column and the datacolumn. &lt;br /&gt;&lt;br /&gt;The new line command can also work across pages, can number headers, footers etc. Please check the &lt;a href="http://linux.die.net/man/1/nl"&gt;man page&lt;/a&gt; for more details.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Dec 28, 2009&lt;/span&gt;&lt;br /&gt;I found a second method to add line number:&lt;br /&gt;&lt;br /&gt;To add line number including blank line &lt;code&gt;cat -n file1.txt &gt; file2.txt&lt;/code&gt;. If you wish to add line numbers only for non-blank lines, use &lt;code&gt;cat -b file1.txt &gt; file2.txt&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-2159026566758030798?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/2159026566758030798/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=2159026566758030798" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/2159026566758030798?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/2159026566758030798?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/8XRG_fcdZv4/new-line-command.html" title="New Line command" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/01/new-line-command.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EFQX87eCp7ImA9WxVRF0k.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-5984888048206161254</id><published>2009-01-23T09:52:00.007-06:00</published><updated>2009-01-23T15:20:10.100-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-23T15:20:10.100-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xargs" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="unix" /><title>xargs - taking output of one command and making input for another</title><content type="html">If you would like to take the output of one command and pass it on to another UNIX program, you are in luck. Like many things in Unix/Linux, there are many ways to perform this operation. &lt;br /&gt;&lt;br /&gt;For example if I need to find all jobs that are running in the queue and get complete details, I could perform either&lt;br /&gt;&lt;br /&gt;&lt;code&gt;qstat -f `qstat | grep R | awk '{print $1}'` &lt;/code&gt; &lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;&lt;code&gt;qstat | grep R | awk '{print $1}' | xargs -n1 qstat -f &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In the first version, the command within `backticks` is evaluated to obtain the list of jobs that are "running". In this command, 'qstat | grep R' will give a list of rows for jobs running.  The awk command splits that string and obtains the list of job names. &lt;br /&gt;&lt;br /&gt;In the second version, 'qstat | grep R | awk '{print $1}'' is evaluated and the output is passed to xargs command. Both these commands are equivalent, except that the second option is more robust in handling whitespace and null character in output before it becomes an input to the next command.&lt;br /&gt;&lt;br /&gt;We will continue further with the use of xargs and calculate the total time all the currently running jobs would need. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;qstat | grep R | awk '{print $1}' | xargs -n1 qstat -f | grep Resource_List.walltime | awk '{split($3,a,":");sum+=a[1]}END{print sum}'&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;As seen earlier, the output of xargs command gives the input to 'grep Resource_List.walltime' command. The output of this command is the rows that contain information about the wallclock time for each of these jobs. These rows are then parsed to obtain just the 3rd column ($3 in the command) which contains wallclock time formatted as hh:mm:ss. &lt;br /&gt;&lt;br /&gt;This string is split across ":" and the first number, namely the hour, is obtained as "a[1]" in the command. This process is repeated for each of the job and at end the total sum is printed. &lt;br /&gt;&lt;br /&gt;I will keep posting more of such tidbits in the future ....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-5984888048206161254?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/5984888048206161254/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=5984888048206161254" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5984888048206161254?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5984888048206161254?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/FUnmbSa67wQ/xargs-taking-output-of-one-command-and.html" title="xargs - taking output of one command and making input for another" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/01/xargs-taking-output-of-one-command-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYMRXY5cSp7ImA9WxVRFkk.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-8484298855114753805</id><published>2009-01-22T08:53:00.007-06:00</published><updated>2009-01-22T11:09:44.829-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-22T11:09:44.829-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="modules" /><category scheme="http://www.blogger.com/atom/ns#" term="modulefiles" /><title>Creating module files</title><content type="html">A complex program in Linux will generally be installed in multiple locations. For example, a C++ library like Magick++ after installation will require include files, library files and binary files. Each of these is located in different folders and may be in different parent directories aw well. &lt;br /&gt;&lt;br /&gt;In one of our installation, Magick++ is installed in /usr/local/magick++/magick++/. Under this directory, the include files are in &lt;span style="font-style:italic;"&gt;include&lt;/span&gt;, the library files are in &lt;span style="font-style:italic;"&gt;lib&lt;/span&gt; and binary files are in &lt;span style="font-style:italic;"&gt;bin&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;For a user defined program using the Magick++ library, the path to all three have to be in their environment variable. This is set using a module file.&lt;br /&gt;&lt;br /&gt;A module file is a TCL script. An example of the module file for adding path to magick++ is given below. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#%Module######################################################################&lt;br /&gt;##&lt;br /&gt;##  Magick++ Module&lt;br /&gt;##&lt;br /&gt;proc ModulesHelp { } {&lt;br /&gt;    puts stderr "\tThis module adds PATH that allow you to compile Magick++&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;set MAGICK_LIB_HOME "/usr/local/magick++/magick++/lib"&lt;br /&gt;set MAGICK_BIN_HOME "/usr/local/magick++/magick++/bin"&lt;br /&gt;set MAGICK_INCLUDE_HOME "/usr/local/magick++/magick++/include"&lt;br /&gt;&lt;br /&gt;append-path PATH $MAGICK_BIN_HOME&lt;br /&gt;append-path LD_LIBRARY_PATH $MAGICK_LIB_HOME&lt;br /&gt;append-path LD_INCLUDE_PATH $MAGICK_INCLUDE_HOME&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The module file begins with #%Module, which helps to identify a module file. The proc ModulesHelp prints a helpful message whenever "&lt;span style="font-style:italic;"&gt;module help magick++&lt;/span&gt;" is typed in linux command prompt. The next three lines create variables that store the location of lib, bin and include direcory. Finally these paths are appended to the environment variables PATH, LD_LIBRARY_PATH and LD_INCLUDE_PATH respectively.&lt;br /&gt;&lt;br /&gt;To invoke this module file and attach all these path to environment variables, type "&lt;span style="font-style:italic;"&gt;module load magick++&lt;/span&gt;" or "&lt;span style="font-style:italic;"&gt;module add magick++&lt;/span&gt;" at the Linux command line.&lt;br /&gt;&lt;br /&gt;To unload these path and environment variables, type "&lt;span style="font-style:italic;"&gt;module unload magick++&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;In addition to appending path, we can also prepend paths, set and unset environment variables, set and unset aliases etc. Refer to the &lt;a href="http://modules.sourceforge.net/man/modulefile4.html"&gt;manpage&lt;/a&gt; for more details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-8484298855114753805?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/8484298855114753805/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=8484298855114753805" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8484298855114753805?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8484298855114753805?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/c2gJeCTVgS0/creating-module-files.html" title="Creating module files" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/01/creating-module-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcFQH08fyp7ImA9WxVRFk4.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-8815269255281680415</id><published>2009-01-22T08:30:00.008-06:00</published><updated>2009-01-22T08:53:31.377-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-22T08:53:31.377-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="makefile" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="make" /><title>Configuring Make file</title><content type="html">Any of us who have used Linux will eventually end up installing softwares from source. The most common method for installing softwares written is C, C++, Fortran etc is using Makefile. &lt;br /&gt;&lt;br /&gt;The Makefile contains the list of commands that will be used to create the various libraries, binaries etc. &lt;br /&gt;&lt;br /&gt;In the most simplest of the scenario, the installation will involve&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;./configure&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;make clean&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first step prepares the makefile with all relavant configuration depending on the system on which it is being installed. This could include, the location where the files will be stored after installation, the type of CPU etc. The second step  "make" compiles and "make install" builds and places the program in the appropriate locations. "make clean" clears any temporary files that have been created. &lt;br /&gt;&lt;br /&gt;Depending on the different scenarios and type of software being installed, different configuration may have to be set. In the example below, we will configure the installation of magick++ (a C++ library for ImageMagick) so that it is installed in /usr/local/magick++/magick++/ instead of the default location /usr/local/&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;./configure --with-quantum-depth=8  --prefix=/usr/local/magick++/magick++/ --exec-prefix=/usr/local/magick++/magick++/&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;--prefix is the location where the lib and include files will be stored after compiling. If not specified, it will be assumed as /usr/local&lt;br /&gt;&lt;br /&gt;--exec-prefix is the location where bin files will be located. &lt;br /&gt;&lt;br /&gt;By default, --prefix = --exec-prefix&lt;br /&gt;&lt;br /&gt;There are many other configuration parameters that can be set, which again depends on the software. I will keep posting more such configuration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-8815269255281680415?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/8815269255281680415/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=8815269255281680415" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8815269255281680415?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8815269255281680415?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/H4mniQUn6fw/configuring-make-file.html" title="Configuring Make file" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/01/configuring-make-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYCSH87fCp7ImA9WxVSEEk.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-8022618269769871623</id><published>2009-01-03T17:38:00.025-06:00</published><updated>2009-01-03T22:42:49.104-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-03T22:42:49.104-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="spellcheck" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><title>Spell checker in Unicode using Python</title><content type="html">I have a project where I had to perform spell check on characters recognized using an optical character recognition program (OCR). My first choice was to search for an existing program written preferably in python, my favorite choice for such work. You can download the complete file &lt;a href="http://www.msi.umn.edu/%7Echityala/spellcheck/spellchecker.py"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Amazingly I found this work by &lt;a href="http://norvig.com/spell-correct.html"&gt;Peter Norvig &lt;/a&gt;. It was very well documented and well written piece of code.&lt;br /&gt;&lt;br /&gt;But I had few issues that I needed to fix and so I could not use it directly.&lt;br /&gt;&lt;br /&gt;1. In my program, unicode characters need to defined as the default character for all input and output unlike peter's program which works on ascii.&lt;br /&gt;&lt;br /&gt;This is performed in the following code&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#!/usr/bin/python -Wall&lt;br /&gt;&lt;font style="color: rgb(255, 0, 0);"&gt;# -*- coding: utf-8 -*- &lt;/font&gt;&lt;br /&gt;&lt;br /&gt;import re, collections, pprint,os&lt;br /&gt;&lt;red style="color: rgb(255, 0, 0);"&gt;import sys &lt;/red&gt;&lt;br /&gt;import codecs&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;...&lt;br /&gt;&lt;font style="color: rgb(255, 0, 0);"&gt;reload(sys)&lt;/font&gt; &lt;font style="color: rgb(255, 0, 0);"&gt;    sys.setdefaultencoding('iso8859-1') &lt;/font&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2. The list of alphabets will also include the unicode characters applicable in my situation like &lt;br /&gt;&lt;font style="color: rgb(255, 0, 0);"&gt;alphabet = u'abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß'&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;3. The unicode feature of python is smart enough to recognise the right characters for conversion from upper case to lower case. All that needs to be done is to call the .lower() function on any unicode characters in the following function.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font style="color: rgb(255, 0, 0);"&gt;def words(text):&lt;/font&gt; &lt;font style="color: rgb(255, 0, 0);"&gt;return re.findall(u'[abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿß]+',text.lower())&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Peter's program trains different words by determining the probability of its occurence. In simple terms, it counts the number of time a word appears in a standard piece of text. The larger the piece of text, the more representative it is to the real world. This scenario was not true in my case, as I do not have a piece of text where a word gets repeated multiple times.&lt;br /&gt;&lt;br /&gt;In my case, I have a list of words in a text file. Almost all the word gets repeated only once and not any more. So the rank of a word was not in frequency but its ordinality.&lt;br /&gt;&lt;br /&gt;The ord function in python returns the unicode position of a character input. In the function below, I first determine the ordinality of each word in the possible candidates (i.e., the original set of words). Then the ordinality of the word to be spell checked is also found. The difference between the two ordinalities is determined and the location of the lowest value gives the location of the correct word in the candidates.&lt;br /&gt;&lt;br /&gt;&lt;font style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;def best_candidate(candidates,word):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clist = list(candidates)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Find ordinality for the complete list&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; so = []&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for cl in clist:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    sum_ord = 0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;        for c in cl:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;           sum_ord = sum_ord+ord(c)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;        so.append(sum_ord)&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   #Find ordinality of the given word&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   sum_ord = 0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   for c in word:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     sum_ord = sum_ord+ord(c)&lt;br /&gt;&lt;p&gt;#Find difference in ordinality and also lowest value location&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;       so_item_l = []&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;       for so_item in so:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     so_item_l.append(abs(so_item-sum_ord))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     min_loc = so_item_l.index(min(so_item_l))&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  return clist[min_loc]&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/codealphabet&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-8022618269769871623?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/8022618269769871623/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=8022618269769871623" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8022618269769871623?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8022618269769871623?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/QUCy5L1W5hE/spell-checker-in-unicode-using-python.html" title="Spell checker in Unicode using Python" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2009/01/spell-checker-in-unicode-using-python.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMMQ34_cCp7ImA9WxdWFU4.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-5818668470667263329</id><published>2008-07-08T10:12:00.008-05:00</published><updated>2008-07-08T10:21:22.048-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-08T10:21:22.048-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="matlab" /><title>Convert a series of Matlab figure files in to jpg</title><content type="html">This program converts a set of fig files located in a directory in to jpg files. The program runs through the directory and gets a list of fig file names. These files are then read using the ‘openfig’ command and the output is written using ‘saveas’ command. For example, a file named ‘image.fig’ will be read and saved as ‘image.fig.jpg’. The only variable that needs to be changed is the figdirectory&lt;p&gt;&lt;/p&gt;    &lt;span style="font-weight: bold;"&gt;Bonus: &lt;/span&gt;You can use the parsing directory structure to read any kind of files located in a directory.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;%%Matlab program - fig2jpg&lt;br /&gt;figdirectory = 'C:\Documents and Settings\username\Desktop'&lt;br /&gt;&lt;br /&gt;fullpath = sprintf('%s/*.fig',figdirectory)&lt;br /&gt;d = dir(fullpath);&lt;br /&gt;length_d = length(d)&lt;br /&gt;if(length_d == 0)&lt;br /&gt;  disp('couldnt read the directory details\n');&lt;br /&gt;    disp('check if your files are in correct directory\n');&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;startfig  = 1&lt;br /&gt;endfig = length_d&lt;br /&gt;&lt;br /&gt;for i = startfig:endfig&lt;br /&gt;     fname = d(i).name;&lt;br /&gt;   fname_input = sprintf('%s/%s',figdirectory,fname)&lt;br /&gt;     fname_output =  sprintf('%s/%s.jpg',figdirectory,fname)&lt;br /&gt;     saveas(openfig(fname_input),fname_output,'jpg');&lt;br /&gt;end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-5818668470667263329?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/5818668470667263329/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=5818668470667263329" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5818668470667263329?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5818668470667263329?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/mgjRvdvala0/convert-series-of-matlab-figure-files.html" title="Convert a series of Matlab figure files in to jpg" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/07/convert-series-of-matlab-figure-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUEQXY-fyp7ImA9WxdWFU4.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-8998956458233277870</id><published>2008-05-13T21:53:00.003-05:00</published><updated>2008-07-08T10:16:40.857-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-08T10:16:40.857-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><title>Setting automatic jobs in Linux</title><content type="html">I was working on setting up a cron job for monitoring the machines under my control and so the natural thing was to set a cron job in Linux. I was new to &lt;code&gt;crontab&lt;/code&gt; command in Linux but as you will soon see, the command is very simple and hence should be easy to master. There are some nuances that I learnt during the course of the work and I will discuss it at the end.&lt;br /&gt;&lt;br /&gt;The crontab command begins with setting the time, date at which a particular job needs to be run. These parameters are set using a crontab file, which can be edited by calling the command &lt;code style="font-style: italic;"&gt;crontab -l&lt;/code&gt;. In the editor, type the following command&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;5   *   *   *   *   command-to-execute &gt; logfile.log &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The number 5 represents the minute at which the command has to be executed. The subsequent values represents the hour, day, month and day of the week (Sunday = 0) respectively. The value * represents all the possible combination. The &gt; pipes the output of the command to a logfile. Once the crontab file has been set, it can be verified using &lt;code&gt;crontab -l&lt;/code&gt;. The crontab file can also be written to a text file and loaded using &lt;code&gt;crontab cronfile.txt&lt;/code&gt;. The content of the cronfile.txt is same as above.&lt;br /&gt;&lt;br /&gt;If you wish that you receive a mail every time the cron runs, add the following line first&lt;br /&gt;&lt;br /&gt;MAILTO: johndoe@email.com (Of course, replace it with the correct email address)&lt;br /&gt;&lt;br /&gt;So far, everything is easy and good but be careful with the following,&lt;br /&gt;&lt;br /&gt;1.Ensure that there is an empty line after the last line of crontab file.&lt;br /&gt;2.For some reason, crontab cannot use the PATH stored by Linux. So ensure that all commands in the crontab file and all the commands and scripts called by crontab are referred with full path.&lt;br /&gt;    &lt;br /&gt;   So instead of calling&lt;br /&gt;           &lt;code style="font-style: italic;"&gt;*   2   *   *  *  python     /path/to/file/pythonfile.py&lt;/code&gt;&lt;code style="font-style: italic;"&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;&lt;br /&gt;call&lt;/code&gt;&lt;code style="font-style: italic;"&gt;&lt;br /&gt;  *  2   *   *   *   /usr/bin/python    /path/to/file/pythonfile.py&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Also make sure that all the path in the python file are also referred using full path.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-8998956458233277870?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/8998956458233277870/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=8998956458233277870" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8998956458233277870?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8998956458233277870?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/QEve-Jd4hgg/setting-automatic-jobs-in-linux.html" title="Setting automatic jobs in Linux" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/05/setting-automatic-jobs-in-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAFRnszfip7ImA9WxZbEEs.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-4779103731072960029</id><published>2008-04-09T15:37:00.001-05:00</published><updated>2008-04-12T23:58:37.586-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-12T23:58:37.586-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OCR" /><category scheme="http://www.blogger.com/atom/ns#" term="tesseract" /><title>Optical Character Recoginition (OCR) using Tesseract</title><content type="html">Recently I had a very interesting project from client who wanted to extract the text (in my case numbers) embedded on thousands of images. My natural choice was to use Tesseract, as it can be scripted and applied to many images in sequenence. &lt;br /&gt;&lt;br /&gt;Tesseract is an OCR software, originally developed by Hewlett Packard and currently developed by Google. It is a open source software released under Apache license. Since it is open source, you can get your hands on it and install it on pretty much any operating system. I installed it on a Windows machine under Cygwin and the installation was a breeze. &lt;br /&gt;&lt;br /&gt;Tesseract does not have any segmentation methods, no document layout and can only output the recognised text to a file. But its accuracy is good enough for many applications. It was ranked among top 3rd OCR software for the year 1995. Making a call to tesseract is also easy&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;tesseract data.bmp text.dat [-l langid]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The values within [] are optional. The &lt;span style="font-style:italic;"&gt;langid &lt;/span&gt;is the the language being recognized. The default language is English. But it also supports French, Italian, German, Spanish. &lt;br /&gt;&lt;br /&gt;Since Tesseract does not have any segmentation methods to separate the text from background, the user have to apply these methods using other softwares like ImageMagick, ITK etc. The most common segmentation technique for scanned documents is the &lt;span style="font-style:italic;"&gt;Local Adaptive Thresholding&lt;/span&gt;. It takes in to account the variation in background intensity across the scanned image and thresholds accordingly. But the right technique has to be chosen depending on the type of image being recognized. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Possible additions to Tesseract&lt;/span&gt;&lt;br /&gt;All the text that I needed to decipher in my images were numbers but Tesseract does not have a langid for numbers. Since there are no langid for numbers, Tesseract deciphered some of these numbers as alphabets. If I have time in the future, I will work on creating the langid for numbers as it will be helpful for many people. If you find that it might be helpful for you, I encourage you to create one or contact me and we can work togther.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-4779103731072960029?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/4779103731072960029/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=4779103731072960029" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/4779103731072960029?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/4779103731072960029?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/XzT3fN7zEn0/optical-character-recoginition-ocr.html" title="Optical Character Recoginition (OCR) using Tesseract" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/04/optical-character-recoginition-ocr.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04NRH06eip7ImA9WxZVGEg.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-7262950954074880139</id><published>2008-03-27T16:06:00.002-05:00</published><updated>2008-03-29T23:39:55.312-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-29T23:39:55.312-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Magick++" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Summary of all chapters</title><content type="html">Currently I am busy with my other projects and I am not able to continue working on chapters on Draw and Pixel class and also on other useful small projects that you could perform. So meanwhile, I am uploading a file which has all my writing thus far. Enjoy reading.&lt;br /&gt;&lt;br /&gt;&lt;object width="670" height="550"&gt;&lt;param name="movie" value="http://www.docstoc.com/docs/wrapper.ashx?doc_id=429912&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter1to6.pdf.swf&amp;enableFullScreen=1"/&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed src="http://www.docstoc.com/docs/wrapper.ashx?doc_id=429912&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter1to6.pdf.swf&amp;enableFullScreen=1" width="670" height="550" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;a href="http://www.docstoc.com/docs/429912/Magick-chapter-1-to-6"&gt;Magick++ chapter 1 to 6 &lt;/a&gt; - Get more &lt;a href="http://www.docstoc.com/"&gt;free documents&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-7262950954074880139?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/7262950954074880139/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=7262950954074880139" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7262950954074880139?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7262950954074880139?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/3FzfRmAMDV8/summary-of-all-chapters.html" title="Summary of all chapters" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/03/summary-of-all-chapters.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQNQHgyfSp7ImA9WxZVFkg.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-7113063635345494855</id><published>2008-03-24T08:59:00.001-05:00</published><updated>2008-03-27T16:13:11.695-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-27T16:13:11.695-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Magick++" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Chapter 6: Image class – Part 2</title><content type="html">In chapter 4, we looked at the overview of the Image class and discussed a few  functions, for filtering images, in detail using some example program. In this chapter, we will discuss a higher order image processing function like segmentation. We will first demonstrate a program for performing adaptive thresholding and then a program for performing fuzzy c  mean clustering. Each of these algorithms will be explained and then the program will be illustrated to ensure complete understanding. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Continue reading the pdf file ...&lt;br /&gt;&lt;br /&gt;&lt;object width="670" height="550"&gt;&lt;param name="movie" value="http://www.docstoc.com/docs/wrapper.ashx?doc_id=429892&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter6%255b2%255d.pdf.swf&amp;enableFullScreen=1"/&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed src="http://www.docstoc.com/docs/wrapper.ashx?doc_id=429892&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter6%255b2%255d.pdf.swf&amp;enableFullScreen=1" width="670" height="550" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;a href="http://www.docstoc.com/docs/429892/Chapter-6-Image-class-–-Part-2"&gt;Chapter 6: Image class – Part 2&lt;/a&gt; - Get more &lt;a href="http://www.docstoc.com/"&gt;free documents&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-7113063635345494855?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/7113063635345494855/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=7113063635345494855" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7113063635345494855?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7113063635345494855?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/LDpgxb0QEkc/chapter-6-image-class-part-2.html" title="Chapter 6: Image class – Part 2" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/03/chapter-6-image-class-part-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUDRXY-cCp7ImA9WxZWFkU.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-5832476056438160285</id><published>2008-03-14T11:30:00.003-05:00</published><updated>2008-03-16T11:17:54.858-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-16T11:17:54.858-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Magick++" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Chapter 5: Exception class</title><content type="html">In this chapter, we will focus on the Exception class, to identify errors in the Magick++ function calls at run time, ensuring easier debugging of code. We will compliment it with example program that will aid in the understanding of its use. &lt;br /&gt;&lt;br /&gt;Continue reading the pdf below...&lt;br /&gt;&lt;br /&gt;&lt;object width="670" height="550"&gt;&lt;param name="movie" value="http://www.docstoc.com/docs/wrapper.ashx?doc_id=422229&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter5.pdf.swf&amp;enableFullScreen=1"/&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed src="http://www.docstoc.com/docs/wrapper.ashx?doc_id=422229&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter5.pdf.swf&amp;enableFullScreen=1" width="670" height="550" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;a href="http://www.docstoc.com/docs/422229/Chapter-5-Exception-class"&gt;Chapter 5: Exception class&lt;/a&gt; - Get more &lt;a href="http://www.docstoc.com/"&gt;free documents&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-5832476056438160285?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/5832476056438160285/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=5832476056438160285" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5832476056438160285?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/5832476056438160285?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/6ecuDeyVyZU/chapter-5-exception-class.html" title="Chapter 5: Exception class" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/03/chapter-5-exception-class.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4ESHc_eSp7ImA9WxZWEEU.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-6562458613278820918</id><published>2008-03-09T12:24:00.002-05:00</published><updated>2008-03-09T12:31:49.941-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-09T12:31:49.941-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Magick++" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Chapter 4: Image class – Part 1</title><content type="html">In this previous chapter, we looked at the overview of the various classes available in Magick++. In this chapter, we will focus on the Image class, the base class and learn its features and some of it functionalities. We will compliment these with example programs that will aid in the understanding of its use. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Image class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As indicated earlier, Image class is the main class in Magick++. It can&lt;br /&gt;1.Read and Write almost all common formats including some field domain specific formats like dicom&lt;br /&gt;2.Create new images&lt;br /&gt;3.Perform image filtering1&lt;br /&gt;4.Perform geometric image transformation&lt;br /&gt;5.Improve quality of photographs&lt;br /&gt;6.Perform image modification like slicing, bordering etc&lt;br /&gt;7.Segmentation2&lt;br /&gt;8.Set image attributes&lt;br /&gt;9.and more such features which could not arranged in to this list&lt;br /&gt;&lt;br /&gt;Continue reading the pdf below...&lt;br /&gt;&lt;br /&gt;&lt;object width="670" height="550"&gt;&lt;param name="movie" value="http://www.docstoc.com/docs/wrapper.ashx?doc_id=419905&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter4.pdf.swf&amp;enableFullScreen=1"/&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed src="http://www.docstoc.com/docs/wrapper.ashx?doc_id=419905&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter4.pdf.swf&amp;enableFullScreen=1" width="670" height="550" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;a href="http://www.docstoc.com/docs/419905/Chapter-4-Image-class-–-Part-1"&gt;Chapter 4: Image class – Part 1&lt;/a&gt; - Get more &lt;a href="http://www.docstoc.com/"&gt;free documents&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-6562458613278820918?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/6562458613278820918/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=6562458613278820918" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6562458613278820918?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6562458613278820918?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/q3sgL_CpjLE/chapter-4-image-class-part-1.html" title="Chapter 4: Image class – Part 1" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/03/chapter-4-image-class-part-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUMQ3o8fSp7ImA9WxZXGE4.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-3064550666371555183</id><published>2008-03-02T09:57:00.004-06:00</published><updated>2008-03-06T15:01:22.475-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-06T15:01:22.475-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Magick++" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Chapter 3: Introduction to Magick++ classes</title><content type="html">In this chapter, we will look at an overview of the various classes available in Magick++. We will list the various classes and a brief description of their function and then a detailed  look at how these classes work together in-order to create a good programming practise.&lt;br /&gt;&lt;br /&gt;Magick++ classes&lt;br /&gt;  There are a total of 11 classes in Magick++. The major class is Image as it can read, write and create images. Other classes like Color, Geometry etc are used to support the functionalities in Image class and other classes. In the following table, the various classes are arranged roughly in the order of importance...&lt;br /&gt;&lt;br /&gt;Continue reading the pdf file below...&lt;br /&gt;&lt;br /&gt;&lt;object width="670" height="550"&gt;&lt;param name="movie" value="http://www.docstoc.com/docs/wrapper.ashx?doc_id=415234&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter3.pdf.swf&amp;enableFullScreen=1"/&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed src="http://www.docstoc.com/docs/wrapper.ashx?doc_id=415234&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter3.pdf.swf&amp;enableFullScreen=1" width="670" height="550" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;a href="http://www.docstoc.com/docs/415234/Chapter-3-Introduction-to-Magick-classes"&gt;Chapter 3: Introduction to Magick++ classes&lt;/a&gt; - Get more &lt;a href="http://www.docstoc.com/"&gt;free documents&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-3064550666371555183?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/3064550666371555183/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=3064550666371555183" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/3064550666371555183?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/3064550666371555183?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/P_L96np5eqk/chapter-3-introduction-to-magick.html" title="Chapter 3: Introduction to Magick++ classes" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/03/chapter-3-introduction-to-magick.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQAQHY7eSp7ImA9WxZXGE4.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-89845583462132164</id><published>2008-02-24T23:02:00.003-06:00</published><updated>2008-03-06T15:02:21.801-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-06T15:02:21.801-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Magick++" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Chapter 2: Compiling Magick++ program</title><content type="html">In this chapter, we will look at a demonstration program to understand the method for compiling and linking a Magick++ program. Read the pdf file located below ...&lt;br /&gt;&lt;br /&gt;&lt;object width="670" height="550"&gt;&lt;param name="movie" value="http://www.docstoc.com/docs/wrapper.ashx?doc_id=412150&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter2.pdf.swf&amp;enableFullScreen=1"/&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed src="http://www.docstoc.com/docs/wrapper.ashx?doc_id=412150&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter2.pdf.swf&amp;enableFullScreen=1" width="670" height="550" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;a href="http://www.docstoc.com/docs/412150/Chapter-2-Compiling-Magick-program"&gt;Chapter 2: Compiling Magick++ program &lt;/a&gt; - Get more &lt;a href="http://www.docstoc.com/"&gt;free documents&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-89845583462132164?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/89845583462132164/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=89845583462132164" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/89845583462132164?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/89845583462132164?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/958f5M-Kx60/chapter-2-compiling-magick-program.html" title="Chapter 2: Compiling Magick++ program" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/02/chapter-2-compiling-magick-program.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMHQno5fip7ImA9WxZXGE4.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-8080237617797565430</id><published>2008-02-20T20:05:00.012-06:00</published><updated>2008-03-06T15:03:53.426-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-06T15:03:53.426-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Programming" /><category scheme="http://www.blogger.com/atom/ns#" term="Magick++" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Chapter 1: Introduction to Magick++</title><content type="html">I have been preparing programs that demonstrate the various capabilities of Magick++. I am planning to prepare them as a set of articles (around 10)  that would demonstrate how Magick++ could be integrated in to your C++ program, thus providing an immense power in manipulating images.&lt;br /&gt;&lt;br /&gt;In this tutorial, I would introduce some of the basics of Magick++ and in the next tutorial, we would work on the various classes that are defined in Magick++. Subsequently, we would prepare simple programs and with advanced features appearing as we progress.&lt;br /&gt;&lt;br /&gt;Continue reading the pdf file below...&lt;br /&gt;&lt;br /&gt;&lt;object width="670" height="550"&gt;&lt;param name="movie" value="http://www.docstoc.com/docs/wrapper.ashx?doc_id=408115&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter1[2].pdf.swf&amp;enableFullScreen=1"/&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;embed src="http://www.docstoc.com/docs/wrapper.ashx?doc_id=408115&amp;swf_url=http%3A//content1.docstoc.com.s3.amazonaws.com/chapter1[2].pdf.swf&amp;enableFullScreen=1" width="670" height="550" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;font size="1"&gt;&lt;a href="http://www.docstoc.com/docs/408115/Introduction-to-Magick"&gt;Introduction to Magick++&lt;/a&gt; - Get more &lt;a href="http://www.docstoc.com/"&gt;free documents&lt;/a&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-8080237617797565430?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/8080237617797565430/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=8080237617797565430" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8080237617797565430?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/8080237617797565430?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/WryPmgALOgw/chapter-1-introduction-to-magick.html" title="Chapter 1: Introduction to Magick++" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/02/chapter-1-introduction-to-magick.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQBRXw5eip7ImA9WxZREU4.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-6520394627420388571</id><published>2008-02-04T07:03:00.000-06:00</published><updated>2008-02-04T09:02:34.222-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-04T09:02:34.222-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><title>Reviewing ImageMagick</title><content type="html">&lt;a href="http://www.imagemagick.org/script/index.php"&gt;ImageMagick&lt;/a&gt; is a software suite for reading, writing and processing images. Over the years various functionalities have been added to the suite and the current version can read and write almost all common formats and also many not so common formats. It can also process these images using its various transformation, filtering etc. It is a free software and is available for all common OS.&lt;br /&gt;&lt;br /&gt;It is so powerful that many other desktop applications and some online applications like flickr.com have been developed around it. So whether you are looking for a simple image conversion or you want to program your website to serve users image processing needs, ImageMagick can handle it for you.&lt;br /&gt;&lt;br /&gt;Why ImageMagick?&lt;br /&gt;1. If the various operations in image processing can be classified in to input, processing and output, ImageMagick provides functionalities that perform all these three operations.&lt;br /&gt;2. ImageMagick provides a set of libraries that allow reading and writing about 100 different formats. So that the user can concentrate more on the image processing than on the file input and output (I/O).&lt;br /&gt;3. ImageMagick can be used in command line in almost all the common operating systems like Windows, Linux, UNIX and Mac etc by combining the read, write and image processing operations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Other features:&lt;br /&gt;1. Read and write files from over 100 different file formats. These include the commonly used formats like GIF, JPEG, PNG and TIFF etc. Refer http://www.imagemagick.com/www/formats.html for complete list.&lt;br /&gt;2. Modify shape, size and orientation of the images&lt;br /&gt;3. Add different effects like blur, emboss, swirl etc&lt;br /&gt;4. Create GIF and movie sequences&lt;br /&gt;5. Draw vector graphics on the images&lt;br /&gt;6. Perform image composition&lt;br /&gt;7. Decorate an image with a border or frame&lt;br /&gt;8. Combine all these operations with different programming languages using APIs to create powerful image processing functionality&lt;br /&gt;&lt;br /&gt;Why ImageMagick APIs?&lt;br /&gt;1.  Command line tools do not lend themselves to large programs.&lt;br /&gt;2. The number of file formats is finite and definitely only a few of them are used universally. But the number of image processing operations is infinite as the individual operations can be mixed and matched. Hence, the programmer needs flexibility in creating their own image processing routines. ImageMagick fills this gap by providing APIs.&lt;br /&gt;3. APIs also allow access to the individual pixels in an image and hence can perform low level image processing operations as well.&lt;br /&gt;4. Two people are not alike and definitely two programmers are not alike. So, ImageMagick provides a multiple choice for programming environment. A Java developer need not be constrained to use C++ for his image processing operations.&lt;br /&gt;5. This also allows ImageMagick to be used in different environment,&lt;br /&gt; a. Desktop applications using C, C++, LabView, Pascal and Tcl/Tk&lt;br /&gt; b. Internet based applications using COM+, Java, .NET, PHP, Python and Ruby&lt;br /&gt;&lt;br /&gt;This listing demonstrates the range of applications that can be developed using ImageMagick and does not in any way limit the imagination of the programmer. PHP can also be used to write desktop application while C++ can be used to write command line operations which in turn can be used in an internet based application.&lt;br /&gt;&lt;br /&gt;Please check &lt;a href="http://www.imagemagick.org/Usage/"&gt;this&lt;/a&gt;  and &lt;a href="http://www.imagemagick.org/script/command-line-tools.php"&gt;this&lt;/a&gt; website for some examples on ImageMagick. Also check &lt;a href="http://www.imagemagick.org/script/api.php"&gt;this&lt;/a&gt; website for introductory tutorials on various ImageMagick API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-6520394627420388571?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/6520394627420388571/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=6520394627420388571" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6520394627420388571?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/6520394627420388571?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/soTF_6__WaY/reviewing-imagemagick.html" title="Reviewing ImageMagick" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2008/02/reviewing-imagemagick.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFSHw_fCp7ImA9WB9VF08.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-7463380545510383925</id><published>2007-12-03T17:15:00.000-06:00</published><updated>2007-12-03T17:21:59.244-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-03T17:21:59.244-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="storage" /><title>Wuala, a P2P online storage</title><content type="html">&lt;p class="MsoNormal" style="text-align: justify;"&gt;I was recently looking for a good way to store some of my files online and needed something more interesting than a simple storage space. I found “Wuala”, an effort by Swiss students, Dominik Grolimund and Luzius Meisser. It uses the P2P technology to store your files across multiple computers in the internet grid.&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;&lt;/span&gt;SETI@Home was an effort to use the idle CPU resource of computers in the internet. Similarly, Wuala aims to use the idle hard drive resource of participant’s computer in the internet. A user is deemed a participant if their computer is turned ON for at least 17% of the time. &lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt;&lt;/o:p&gt;Wuala provides 1GB of space and the next 4GB of space is provided in a cloud of computers that participate. Since it is not possible to risk storing a file at just one location, Wuala uses a system of breaking files in to chunks and distributing across multiple computers, thus providing persistent storage.&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt;&lt;/o:p&gt;When the user uploads a file, the file is encrypted and then broken in to chunks. Some of the chunks are stored in Wuala’s server and the rest are stored across various computers. When the file is requested to be read from the cloud, these chunks are brought together. With the better adoption of the system by more users, Wuala server will be replaced by just the computers on the internet. &lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt;&lt;/o:p&gt;The speed of upload is dictated by speed of download, implying that a user allowing more upload rate gets preference for higher download rate.&lt;/p&gt;        &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt;&lt;/o:p&gt;Wuala has been written in Java and is available on most platforms. It allows the user to specify folders as private, shared (with friends) and public. I tested the alpha version on a Windows machine and found their drag and drop feature to be very handy. It also provides an encryption system which allows your files to be stored securely and is better than other storage systems. Since the system is decentralized, it comes with a safety feature of being persistent by default. It allows the user to search the file names or tag them for a better search. I would recommend the system for folks who need a lot of storage space at no cost (who wouldn’t?).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt;&lt;/o:p&gt;My only wish is that, Wuala should be accessible in the future without any installation. If I am using a computer locked up for any installation but I still need to access some files, then I should be able to access it using a browser. It is currently in their agenda and I hope it will appear soon.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-7463380545510383925?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/7463380545510383925/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=7463380545510383925" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7463380545510383925?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/7463380545510383925?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/mmZvHIKpnPY/wuala-online-storage.html" title="Wuala, a P2P online storage" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2007/12/wuala-online-storage.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QFQ3cyeyp7ImA9WB9WFEw.&quot;"><id>tag:blogger.com,1999:blog-1149088774216168764.post-439409127744841167</id><published>2007-11-12T20:20:00.000-06:00</published><updated>2007-11-18T14:55:12.993-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-18T14:55:12.993-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ffmpeg" /><category scheme="http://www.blogger.com/atom/ns#" term="ImageMagick" /><category scheme="http://www.blogger.com/atom/ns#" term="mplayer" /><title>Did you know that ...      Part 1</title><content type="html">1. Images are identified using Magic number. If you open a gif file in a text editor, you will notice the magic number representing gif, GIF89a. These numbers are not limited to images alone, even pdf and postscript files can be identified.  In fact it can be used to identify most of the file formats&lt;br /&gt;&lt;br /&gt;2. ImageMagick is used by &lt;a href="http://www.flickr.com"&gt;flickr.com&lt;/a&gt; for their image processing&lt;br /&gt;&lt;br /&gt;3. The much used picture of Lena (below) for image processing is the Playboy centerfold picture of the Swedish model, Lenna Soderberg&lt;br /&gt;&lt;br /&gt;4. &lt;a href="http://www.mplayerhq.hu/design7/news.html"&gt;Mencoder&lt;/a&gt; is a command line tool for editing movies much like Imagemagick is a command line tool for editing images&lt;br /&gt;&lt;br /&gt;5. Mplayer is the close cousin of Mencoder and can be used for viewing movies&lt;br /&gt;&lt;br /&gt;6. &lt;a href="http://ffmpeg.mplayerhq.hu/"&gt;ffmpeg&lt;/a&gt; is another tool for editing movies and is believed to be used in youtube.com to convert the uploaded videos in to flash video (FLV) format.&lt;br /&gt;&lt;br /&gt;7. Google has implemented a face recognition in its search. The images of face can be seperated from google image search result by typing "&amp;amp;imgtype=face" at the end of the url.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_iniZFBtdGok/RzkKkT-AyjI/AAAAAAAAAGA/ylwws1IpE-U/s1600-h/Lenna.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_iniZFBtdGok/RzkKkT-AyjI/AAAAAAAAAGA/ylwws1IpE-U/s200/Lenna.png" alt="" id="BLOGGER_PHOTO_ID_5132144869317331506" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1149088774216168764-439409127744841167?l=imageviz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://imageviz.blogspot.com/feeds/439409127744841167/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1149088774216168764&amp;postID=439409127744841167" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/439409127744841167?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1149088774216168764/posts/default/439409127744841167?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/imageviz/~3/hFoSg4mAeJ8/did-you-know-that-part-1.html" title="Did you know that ...      Part 1" /><author><name>Ravi</name><uri>http://www.blogger.com/profile/13707779317135150795</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp0.blogger.com/_iniZFBtdGok/RzkKkT-AyjI/AAAAAAAAAGA/ylwws1IpE-U/s72-c/Lenna.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://imageviz.blogspot.com/2007/11/did-you-know-that-part-1.html</feedburner:origLink></entry></feed>

