Planeta

  • I have been hacking on some new and cool features on OCRFeeder for a while and now it is time to show them to the world in a new release.

    These features I’m talking about fall mainly in 2 areas: improving the a11y of the UI and improving the recognition of documents.

    A11y Improvement

    The improvement of the a11y has the typical UI changes to include mnemonics, missing labels and relations, but also other approaches that have more to do with UX like using a progress dialog to inform users that time-taking operations are being carried. This means that now, the PDF importation and OCR won’t block the UI.
    Other changes in this category were the navigation through the content boxes (before, these could only be selected by clicking on them), the selection of all boxes and the deletion of selected boxes.

    The following screenshot shows the box editor area of OCRFeeder with its mnemonics highlighted:

    Box edition area

    Box edition area

    Recognition Improvements

    Sometimes, text columns are so close to each other that they end up being recognized as a single paragraph, so I added a post-detection method to solve this issue. This feature is optional and can be toggled from the Preferences dialog.

    Here’s an example of the difference it makes:

    Before columns' detection improvements

    Before columns' detection improvements

    After columns' detection improvements

    After columns' detection improvements

    Scanned document images are usually skewed and this makes it more difficult for the contents to be successfully detected and “OCRed”. I decided to implement an algorithm to deskew these images. The algorithm uses the Hough transform to try to find lines in the image and their angles and, while it is a bit slow, it works well:

    Skewed image

    Skewed image

    Deskewed image

    Deskewed image

    This action can be used in a loaded image but can also be configured to be automatically performed before the images are added. The Unpaper tool can now also be set to be clean images before adding them.
    This makes it much easier to successfully recognize images obtained from a scanner device.

    Some fine tunning of the content boxes’ bounds was done by trying to shorten their margins, that is, lowering the distance between the boxes and their actual contents.

    The font size recognition was also tweaked to solve the problem of having paragraphs with initials (you know, the huge starting characters) which were influencing the whole paragraphs’ font size.

    To finish the recognition’s improvements, I have added an optional action to find and fix the text’s line breaks. Usually, OCR engines don’t consider “semantic line-breaks”, that is, OCR engines always insert a newline in the end of each line.
    Using some regular expressions, I try to find these “fake” line-breaks and recover the original flow of the text. Like some of the features mentioned above, this one can also be turned on/off from the Preferences dialog.

    Here’s how the Preferences dialog looks like now:

    Preferences_dialog

    Preferences_dialog_recognition

    To finish, images can now be dragged and dropped onto the pages’ area and the mouse wheel can be used to scroll horizontally combining it with the Shift key, thanks to Stefan Löffler, and of course, several bugs were corrected and code was improved.

    As you see, this is a “rich” new version of OCRFeeder that keeps being the easiest way to use OCR in a desktop. You are welcome to file bugs in bugzilla or to send patches and features’ requests to its mailing list or approaching me if you’re in GUADEC.

    Download: OCRFeeder 0.7 tarball on GNOME FTP

  • It’s been a while now since I released the last version of SeriesFinale.
    The truth is that I’ve been busier than usual these days and of course, this is reflected on pet projects.

    As some of you may have experienced, there was a kind of a nasty bug in SeriesFinale’s last version: it wouldn’t update certain shows (when they had been added long ago)… and the good news is that this is one of the things that got fixed in this new version.

    One of the good things Juan introduced for this version is how the next episodes to be watched are shown. Before, the episodes were shown according to their “first aired” date and in case of the same date for two or more episodes, the highest index one would be marked as the one to be watched. In this 0.6.1 version, the episodes are shown according to their number and season, so, if episode #3 has the same air date as episode #4, #3 will always be shown as the next one to be watched.

    It is now using a priority queue to download the series’ covers and info that gives priority to the info. This means you won’t have to wait for the info AND covers to download when you hit the Update All menu but instead wait only for the info; the covers will then be downloaded in the background while you use the app normally.

    I’m now introducing the new Russian translation, which Misha Ketslah had kindly sent to me a while ago but that I hadn’t had the time to integrate.

    Here’s the list of major changes for this new version:

    * Add Russian translation (thanks to Misha Ketslah)
    * Fix updating of shows
    * Use a priority queue to differentiate the downloads of covers or series’ info
    * Use only one AsyncWorker at most to deal with the series
    * Prevent the download and usage of images to generate problems
    * Fix showing next episode
    * Add TheTVDB credits
    * Add THANKS file

    So… what about that GNOME version, you ask? I’ve already started to port it to GNOME but couldn’t dedicate much time to it and taking into account that I’ll be on vacation very soon, it’s likely it will take a little longer. But I’m looking forward to use SeriesFinale on GNOME!

    As for the N900 owners, I’ve just promoted the package to Extras-Testing so either use the Extras-Devel repo as usual or wait ~10 days for it to appear in Extras.

  • Grilo is getting really interesting and one of its newest nice things is the DBUS interface Juan has been working on lately.

    This DBUS interface is currently known as Rygel-Grilo (it was originally intended to be a source for Rygel) and uses the MediaServerSpec to allow developers to retrieve the media objects Grilo provides.

    Since there aren’t still Python bindings for Grilo, I decided to use the Rygel-Grilo to be able to use Grilo from Python.
    So I developed a Rhythmbox plugin that shows every MediaServer1 object available and lets the use browse through the contents of these. Needless to say, although this plugin provides a very generic basic and usage, it’s easy to see how applications like Rhythmbox could be using Grilo to get their media.
    The philosophy is: Grilo gives you content, GStreamer plays that content, and you’re free to focus in the rest of your app’s details.

    Here’s a video of Rygel-Grilo and the Rhythmbox MediaServer1 plugin in action:

    Grilo MediaServer1 Rhythmbox Plugin from Joaquim Rocha on Vimeo.

    You can find this plugin under the MediaServer1 Plugins project on Gitorious.

    Juan did also developed a cool plugin for Totem similar to this one. Take a look at this post to see the plugin working and a more detailed explanation of what Rygel-Grilo is.

  • Igalia, a Free Software Galician company, offers for the ninth consecutive year the possibility of undertaking internships for twelve to fourteen weeks from early June to early September, at its offices in A Coruña and Pontevedra (Spain).

    This opportunity is offered to Computer Engineers or Computer Technical Engineers who have completed over 50% of their degrees.

    Why do it?

    * Most of us undertook internships when we were students.
    * It is a good way to give back something to the university from which we come.
    * It is also a good way to hire people. Almost 50% of the people who made undertook internships with us in the past are part of the company today.

    How are the internships?

    * 350 hours with flextime, with a minimum of 5 hours/day and a maximum of 8 hours/day during July, August and September.
    * 325 hours working on a Free Software project and 25 hours to write the report.
    * Help 1500 €.

    If you are interested in applying for the internship, the period for receiving of applications starts from May 14th to May 28th.
    Please, fill this form.

  • It’s been a while since last SeriesFinale’s version and I have been a bit busy meanwhile but still got time, together with Juan, to pull up some nice new features. In the end, we had so many changes and the app felt so smooth that we nicknamed it “Xmas Comes Earlier”!

    So what can you find in this new version?

    * The covers are now downloaded in the background which allows users to keep using the application and improves idle times when adding/updating shows.
    * No more database deletions. Many people complained that sometimes it would suddenly delete all the database. We have now introduced a few verifications that make it harder for the database to be deleted unless you do it yourself.
    * The format of the JSON of the database and the way the serialization is done is now faster which allows faster load and save times.
    * The impossibility to delete shows is also fixed.
    * No more problems with characters like & on the episodes and shows’ names.
    * Already added shows are now marked with color when searching for shows.
    * The highlight of episodes is now fixed, when marking them.
    * A new logo that works in a black background has been added.
    * Images are now downloaded to temporary files which allows a safer assignment to the shows/seasons.
    * The images are now deleted if it’s not being used anymore (when shows are deleted), and are not downloaded more than once (when a show is added twice).
    * The removal of the application now deletes the images folder.
    * AUTHORS, README and THANKS files were added to the package.
    * Translations were updated.
    * The search dialog now allows you to search shows in a chosen language.
    * The About dialog was added. Here are a few screenshots:

    Shows when no cover has been added

    Shows when no cover has been added

    Temporary image when downloading cover

    Temporary image when downloading cover

    Search dialog with Language choices

    Search dialog with Language choices

    About dialog

    About dialog

    Two other things that are new are the creation of two mailing lists for SeriesFinale:
    seriesfinale-general for general discussion, help and feature requests
    seriesfinale-development for discussions related to features development and bug tracking

    You should be able to upgrade SeriesFinale from the extras-devel repository. I’ll promote it extras later.

    Enjoy!

  • Last Friday I gave an introduction to Python as class in Master in Free Software.
    In this session I tried to cover Python from the very basics to decorators, properties and PDB. All covered only as an overview, not in deep detail.

    After the introduction we did a simple PyGTK application to list the files from a folder the user gives it; it will hopefully come in handy when they start to develop their project’s UI.

    So I’m sharing here the presentation I created for it. If you’re thinking of learning Python or have started learning it recently it might be helpful for you.

  • OCRFeeder version 0.6.6 has been released.

    This version has no big improvements and exists mainly to introduce the fix of a bug that prevented using the algorithm for recognizing documents automatically.

    The copyright was updated to include the proper copyright and license notices of ODFPy, which ships with OCRFeeder.
    It also features some improvements to Debian related files (thanks to Alberto Garcia, who is creating the official deb package for Debian) and a few translation updates.

    See the whole list of changes here.

    Your usual links:
    OCRFeeder’s git
    OCRFeeder’s bugzilla
    OCRFeeder’s Tarball from GNOME’s FTP
    OCRFeeder 0.6.6 Debian package

  • I have been wanting to show how Caribou can be used with the Text Predictor Input Mode I wrote a while ago and finally today I took the time to do it.

    Caribou with Text Predictor Input Mode from Joaquim Rocha on Vimeo.

    Okay, the shortcuts  to accept prediction candidates or scroll through them can be changed into some that are quickly accessible.
    With the changes I did to Caribou, one can even easily provide a special button, such as “ACCEPT”, like the screenshot below shows:

    Caribou with Accept key

    The changes I’m talking about and that you see in the video and the QWERTY keyboard layout I used can be found in Caribou’s bug #613229.

    I wrote these changes because the current way of writing layouts for Caribou doesn’t seem very flexible nor appropriate for non programmers, in my opinion.
    These changes drop the current usage of Python files with tuples as a way to configure Caribou’s layouts. Instead, json files should be used and more functionality that wasn’t implemented before is also possible with the mentioned patch.

    Basically, instead of having either character keys or symbol, label pairs that Caribou understands, each key should be a set of attributes that define it, which Caribou then interprets accordingly.

    For a basic key, all one needs to have is the value attribute, which can receive a string (for example a character) or the name of a key in GDK (you can easily figure them out from the GDK key syms file).
    So:

    {”value”: “a”} will create a key labeled a that inputs the character a
    {”value”: “BackSpace”} will create a backspace key but labeled with “BackSpace”

    You can override the label of a key using the attribute “label”, as:

    {”value”: “BackSpace”,
    “label”: “⌫”}
    will create a backspace key but labeled with “⌫”

    Labels can use Pango Markup to change its text style, for example: {”label”: “<small><b>Small Bold Text Key</b></small>”, …}

    A width attribute is also introduced and means the width relative to a usual key’s width. A width of 3 will generate a key that fills the space of 3 keys whereas 0.25 fills a quarter of a regular key’s space.

    A key can be of a given type which indicates how it behaviors. There is 5 types of keys: normal, layout_switcher, preferences, mask and dummy.
    A normal key type indicates it is a regular “you-press-you-input” key and is the default type, which is why it wasn’t specified in the examples above.
    A layout_switcher key, when pressed, will change the keyboard sublayout to the one given by the value attribute (and must exist in the layout file), so, if we are in the “lowercase” layout and we want a key labeled “UP” to change to the “uppercase” layout:
    {”label”: “UP”, “key_type”: “layout_switcher”, “value”: “uppercase”}

    The preferences key type brings up the preferences menu.
    A mask key means that you set a mask indicated by the value attribute when you press it. For the Alt key:
    {”label”: “Alt”, “key_type”: “mask”, “value”: “mod1″} again, the “mod1″ is the mask name from GDK.

    Finally, there’s the dummy key type which is used basically to set spacer keys and allow to separate some keys from others in order to improve visual grouping. Rows that don’t have the number of keys in any row (including dummy keys) will be centered horizontally.

    These let you play with keyboards’ layouts and design any kind of layout in a flexible and easy way.

    At the moment, the patch is still pending review. Let’s hope it gets a green light and is applied.

  • For those who didn’t notice, last week SeriesFinale finally got promoted to Extras which are very good news and now SeriesFinale 0.5 has been just released!

    Why is this edition so special? Because it will from now on retrieve images for the shows and its seasons.
    This morning I finally took the time to check how to retrieve those and I really like the way SeriesFinale looks like now. Of course, this means that the next shows update you do will start retrieving all the images for your shows and seasons which might take, let’s say, a while. Still, don’t worry because once it gets the images, next time you update, only the general information will be retrieved.

    I’ve also fixed the slowness when panning the different content views. Panning should now be much more fluid.

    Another good thing in this edition is that the tiny episodes’ checkbox still looks tiny but it’s in fact larger and this means you can much more easily tap on it to mark episodes.

    Juan, the maintainer of the Diablo version and a colleague of mine at Igalia, sent patches for including the season number together with the episode number, so it shows like “2×05″ which is more useful than just the episode’s number.
    He also pointed a bug when adding a show  manually, which got fixed for this release as well.

    Here are a couple of screenshots showing what you’ll see soon (I just finished sending the packages to the server) in your favorite mobile phone:

    SeriesFinale with shows' art

    SeriesFinale with shows' art


    SeriesFinale with seasons' art

    SeriesFinale with seasons' art

    (I didn’t have time to update or integrate any translations in this version but I’m planning to have it done for the next one so I apologize for any inconvenience.)
  • I have just released OCRFeeder version 0.6.5!

    Here are the main changes in this version:

    * Importing PDF files is now faster
    * The OCR engines manager dialog now allows to detect and choose to use system-wide OCR engines (this action is also used when the application is started with no engines configured)
    * Multiple content areas in OCRFeeder’s canvas can now be selected using Shift+Click
    * Introduces Ctrl+a shortcut to select all content areas in OCRFeeder’s canvas
    * The Tools menu now has the new action “Recognize Selected Areas” which will perform the automatic recognition on selected content areas of OCRFeeder’s canvas

    Also, a few bugs were fixed:

    * Removed PDF files’ extension from the images generated from them
    * Sorts images when adding them from a folder
    * Selection areas are now getting selected after creating them
    * Fixed problem when quitting the application

    (You can also read the full list of changes)

    Recognize All Areas action

    Recognize All Areas action

    You can download the new tarball from GNOME’s FTP or a Debian package from here.

    I’d also would like to thank the GNOME i18n Team for their work translating OCRFeeder.