Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Sunday, December 26th, 2010, 11:09 am

Nearly Two Months With Fedora 14

Fedora 14 with browser

WHEN Fedora 14 was released there was a lot of excitement about it, more so than when previous releases of this leading GNU/Linux distribution came out. This was justified. After almost 8 weeks with Fedora 14 the only major issue I have had with it is conflicting packages, which would not really be Fedora’s fault. For the most part, when it comes to the experience on the KDE (4.5.x) desktop, everything is great. Some reviewers of Fedora 14 have been harsh and said that it would mostly suit advanced users; I’ve not yet found something which would justify a need for advanced skills though. Maybe once a week or so a technical issue may arise that requires technical understanding, but it’s never something critical.

All in all, having used Fedora 14 since it was released I can happily recommend it.

Sunday, December 26th, 2010, 10:25 am

2011 Resolutions – Professional Focus, Research, and Ethics

EVERY once in a while we all get a break from everyday life and potentially introspect. As the year 2011 is almost upon us, it’s time to explain — on a more personal note for a change — what needs improving. First of all, from a professional point of view, it would be important to ensure effectiveness and to spend less time responding to Internet trolls and other such distractions. It’s just too easy to descend to gossip sometimes, however it gets nobody anywhere. There are some people who revel in harassment of progressive individuals and the worst those latter individuals can do is lose sight of their goals, then engage with the harassers. It’s tempting to do so (one’s own defense), but it’s counter productive as it leads to more of the same. When one expresses strong opinions on any matter, detractors will exist; the polite ones are worth debating with.

On the subject of research, my plan is to ensure that I maintain contact with my roots in computer science with emphasis on computer vision. I may soon have a start-up on the side, but there is no final decision on that yet. Research can produce a skills-based service that helps individuals. This can be an ethical service which even advances software freedom.

Last but not least (quite the opposite in fact), living an ethical life is not the priority of those to whom keeping score means accumulating wealth, even when it comes at the expense of someone else’s (even one’s own) health. We only live once and we must take advantage of this opportunity to do something positive for our neighbours to enhance solidarity. The Earth’s resources are finite and wealth is relative, where one person’s well-being often depends on someone else’s labour (typically dissociated geographically). For harmonious co-existence on this planet people need to increasingly work together and this sometimes means sharing of knowledge, commodities, food, water, and shelter. It’s too easy for people in the West to pretend that the world is just the West when in fact it accounts for less than 20% of the world’s population. Legislators must begin to take into account that inequality is not necessarily the result of imbalanced motivation and determination among minds; many people are born with little or no opportunities and particular conditions imposed by international laws keep it that way. Institutions like WIPO, WTO, WB, and IMF are just part of it and with gradual reform a safer world for everyone to live in is not a distant fantasy. The only real wars are class wars and dimensions like religion/race/nationality are often just instruments that act as surrogates for those in power, not a replacement for identical, scientific, and social doctrines.

Saturday, December 25th, 2010, 4:46 pm

Visual Tour of QtOctave

People who say that nothing can replace Photoshop and nothing can replace Microsoft Office simply forget that the functionality they must be implicily referring to is hardly used by anyone among the entire userbase. As pointed out in the previous post, two months with QtOctave and other free/libre software taught me that there is no reason to deny that ~90% of MATLAB’s users can abandon it and use free/libre software instead, maybe more happily in fact (stability, program weight, and cross-platform with access to the source code count, it’s not just a matter of cost). I have used some of the most advanced functionality in MATLAB, so I do know what I am talking about here.

Today I present free/libre software called QtOctave, which is a graphical front end to Octave and it uses Qt, as the name suggests. Qt is cross platform, so as expected it runs on Windows too. Without further ado, let’s take an overview of what QtOctave looks like. I typically put QtOctave on my eighth workspace in KDE, which helps me remember where to find it. Here is my workspace 8 (screenshot, click to magnify).

QtOctave

This picture may be daunting, but QtOctave does a good job hiding lot of the functionality under menus, which reduces clutter. QtOctave uses Octave (CLI) as its engine, but it provides a friendlier face to it. Let’s break down this picture and explain what each component does, in turn.

Menu

The main menu contains many of the basic functions one ought to expect. By “functions” what I mean is either functionality like opening files or mathematical functions that are commonly used. Many options there control the appearance of the GUI, whose core component of the command line containing the core, Octave. QtOctave wraps it up nicely and provides tools to work with/around it.

Menu in QtOctave

Variables

Octave exposes names and corresponding values of variables it holds, but only upon demand. How about having a GUI component to keep track of these and display this information all the time. You want it? You got it:

Variables

Commands and Dynamic Help

The command pane is a companion tool which helps keep track of recently-used commands and makes these conveniently available. In my case, I added the “Dynamic Help” component, to help show what commands are available as soon as I start typing. The contents in the example below show what appears in the window as soon as I began typing “plot”. The namespace of commands can be highly populated if many modules are used (in session’s path), so this is a good way to keep track without looking elsewhere. Bash has a similar functionality which it makes available via the “Tab” key.

Commands and Dynamic Help

Directories

Directories and files are sometimes easier to approach and navigate though when they are quickly accessible through the main GUI. This has use in all sorts of circumstances as drag-and-drop functionality is broadly supported.

Directories

Terminal

In the main body of the program there is the terminal section (or other components, if one chooses to make them available there). Show below is an example of basic interaction with Octave.

Terminal

CLI

The command-line interface is an integral part of the above and it supports up/down arrow key for use of commands history.

CLI

Editor Menu

This editor can be made part of the main windows, but it does not have to be. I personally choose to make it an external window on a second monitor where it offers a lot of viewing space. The menu has all one ought to expect to find in a standard text editor, but it also contains program-specific buttons like execution and debugging.

Editor Menu

Code

Here is a simple code example. The fonts that I use do not look good because I favour monospace, which helps indentation and other tasks where each character is treated as equal.

Code

Breakpoint

Here is another example of code (further down from the top). This helps show how breakpoints are represented in the editor. Together with the variables panel this provides an excellent environment for debugging, so the editor is definitely not detached from the core components; It’s custom-made for it.

Breakpoint

More Components

There is a lot more under the menus, e.g. package management (see the image below). But that’s a subject for another day.

Octave packages

If you like what you see in QtOctave, then consider giving Octave a look. Both Octave and QtOctave are in the *Ubuntu and Fedora repositories, so they only take a moment to install.

Saturday, December 25th, 2010, 3:40 pm

GNU Octave a Compatible Drop-in Replacement for MATLAB

Over the past couple of months I have been assessing the combination of Octave with some other free/libre software such as Scilab and QtOctave. I did this as part of my existing job in research, as my blog posts ought to have revealed on occasions. I’ve been using MATLAB for the best part of a decade and was at one time ranked #1 in the world for my contributions to MATLAB Central. That, however, changed several years ago when I came to grips with the fact that my free/libre code for MATLAB only helped promote the underlying stack which included MATLAB, a nasty piece of highly expensive proprietary software with BSA bullies behind it. MathWorks is exploiting free labour of many people to sell its non-free software. I can vividly recall Slashdot comments stressing this point, which profoundly changed my attitude towards MATLAB. So I turned to Octave, as I did half a decade ago, but this time it was a lot more mature. People recommended to me programs other than Octave, too. I checked these under different distributions of GNU/Linux and even Windows, which many people out there continue to use, especially on their desktop. I helped some people dump MATLAB. I saw how easy it was.

MATLAB is used extensively in research and in the industry, sometimes even in hospitals (when I was 22 I was asked to help a professor with that). In many cases, it boasts more features than anyone would ever need*. Does a university student really ever use more than the basic functions? Are companies really willing to spend thousands of dollars per year just ‘renting’ a licence for one or two copies of MATLAB, which keeps nagging them for it assumes they are so-called ‘pirates’ (and the BSA comes knocking to ensure there are up-to-date licensing instances)? The answer is usually “no”, but users of MATLAB may not know that software already exists to offer them an alternative, just as Firefox helps replace Internet Explorer and also outperform it in many technical ways. Since MATLAB and Octave are mostly compatible, moving from one to the other is not hard and this reduces risk of being too dependent on one single company, especially if one switches over to Octave and then uses the no-cost redistribution rights to just expand operations to as many machines as are available. Octave runs exceptionally well on GNU/Linux, so no licence of Windows is required, either. In the coming days I’ll continue to post examples of what can be achieved with the more advanced functionality of Octave, including 3-D and video. It’s impressive and it by far exceeds my expectations given what I found in it around 5 years ago.
____
* There is a famous saying that goes like, “80% of the users of Microsoft Office only ever use 20% of its features.”

Friday, December 24th, 2010, 4:55 pm

Making Videos With Animate

A few weeks ago I wrote about turning image sequences into real videos using The GIMP, which is more than just an image editor and my favourite tool for simple videos. But I sought to automate more of the process, so I wrote some Octave code to number the sequence of figures, save them all in raster space under a newly-created directory, and then pass them all using a UNIX-style system call to animate, which is a utility I’ve used for this purpose since 2004. Animate is built in a way that makes it compatible with just about any environment sitting on top of X Server. It allows videos to be saved in so many different formats, including GIF, which makes it easy to open in a lot of programs including Web browsers. Animate also has PDF as an output option — one where frames are separated by pages. This makes it a very powerful tool, which would have been even more powerful had it been possible to save the resultant video from the command line (no such option exists based on the man page). As it stands, making it scriptable is a case of “close, but no cigar” (little human intervention needed). One of this blog’s readers, Twitter, has suggested some other programs that can turn sequences of images into videos without any GUI obstruction. Yes, GUI is trouble in these cases.

The bottom line is, there are many tools for Linux/UNIX which make video composition rather simple and even scriptable (necessary when handling many sets, or sets of 3-D slices). For turning videos into a set of images I use Avidemux. It’s small and simple.

As some example output, here is a video showing how a rough and incorrect estimate deals with cardiac cycle. The crosses represent radii of best circle fit to the surrounding points. There is no constraint in place yet to ensure diffeomorphism.

Slices and frames 220-240 of heart

Expansion accumulator

Directions accumulator

Here is a more properly placed (at least initially) set of landmark points adjusting to fit the heart’s walls.

Slices and frames 200-220 of heart

Expansion accumulator for tracked heart

Directions accumulator for tracked heart

The figures where values are plotted as a function of frame # basically say how much the points move further away from the centre and whether they move clockwise or counterclockwise. These figures correspond to the two videos, where the latter (*tracked.png) belong to the second video.

Friday, December 24th, 2010, 7:46 am

Winter of Code

Creek in December

IT HAS been a week or so since I last made a research-related post, so here is a quick update. I am currently coding some bits that can detect and measure rotation in the heart, including tangential/centrifugal components. The goal is to calculate the twist and also the scale changes separately, giving a figure indicative of each. The notions found in flow/vortex mathematics ought to enable this to be calculated from a set (or matrix) of points, each of which being a vector of directions around a central point. To quote Wikipedia on vortex: “A vortex (plural: vortices) is a spinning, often turbulent, flow of fluid. Any spiral motion with closed streamlines is vortex flow. The motion of the fluid swirling rapidly around a center is called a vortex. The speed and rate of rotation of the fluid in a free (irrotational) vortex are greatest at the center, and decrease progressively with distance from the center, whereas the speed of a forced (rotational) vortex is zero at the center and increases proportional to the distance from the center. Both types of vortices exhibit a pressure minimum at the center, though the pressure minimum in a free vortex is much lower.”

My implementation of this is simplistic as it merely uses an accumulator whose value increases for each point that moves in a given direction (e.g. for each clockwise arrow) and decreases for the opposite.

An issue we face here is that circular motion in the heart walls is far from trivial to see. A careful look at image sequences taken with about 20 frames for each cycle and each slice does not quite expose a ‘squeeze’ of the heart, not unless there is tagging of the image which also enables reconstruction of a higher quality. So, to calculate rotation of the sides based on just intensity is rather hard, unless there is something in the signal that can be detected. Generally, looking at the tracking typically carried out, there is hardly a tendency to pick up any traces of tangential motion and where it does exist it is not consistent. Assuming a direction is known and then estimated with a probabilistic model, there is room for improvement, maybe even a significant change in contrast. Different slices show different directions for the twist and it requires a look inside the heart too, in order to visually compare intensities and assume a rotation of some sort. I will post some images soon to illustrate this.

Additional code was completed to calculate and plot the centre of the points around the heart, based on the fitting of a circle to all the surrounding points (best match). At the end of each tracking sequence a plot if shown to give a statistical analysis of how points move around the walls and whether they move in and out throughout the cardiac cycle. The goal here is to, based on several cycle, find out if and how the algorithm can detect wall motion and quantify it. There is clearly a correlation to be found here.

Today’s addition (it’s a holiday, so lots of spare time for coding and also to read literature) will soon be uploaded along with more material, all of which will be shared not just for the sake of transparency. I’ll post results shortly.

As a side note, I’ve begun looking into the possibility of writing a book about Novell and another possibility I’m looking into is initiating a startup around the code I’ve been writing since 2003 to achieve something nobody achieved before, even with free/libre software (the whole stack). I’m currently doing cardiac analysis but still considering a situation where come back to a more CS-oriented work, at least when the existing contract is over. There are many projects on my mind and choosing just the best one/s is not easy. Then again, it’s good to have possibilities and I’m still in my twenties, so there is no pressure.

Monday, December 20th, 2010, 11:38 pm

TechBytes 21: Hello Dolly, Trolls, Boosters, and Advocates

TechBytes

Direct download as Ogg (1:25:51, 25.6 MB) | Direct download as MP3 (39.3 MB)

Summary: Tim, Gordon, and Roy speak about many different topics including the show itself

TODAY’S show was covering many topics and OpenBytes has published the show notes.

RSS 64x64Today’s show ends with “Harold T Wilkins” by Fanfarlo (from SXSW 2009 Showcasing Artists). We hope you will join us for future shows and consider subscribing to the show via the RSS feed. You can also visit our archives for past shows. If you have an Identi.ca account, consider subscribing to TechBytes in order to keep up to date.

As embedded (HTML5):

Download:

Ogg Theora
(There is also an MP3 version)

Real-time Posts

Posts by @schestowitz

Retrieval statistics: 23 queries taking a total of 0.148 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|