Movie Reviews Series 40 Web App

I have been working on a mobile application for Nokia Series 40 phones. This app is a Web App and is called Movie Reviews.

Movie Reviews is a Series 40 Web app which features latest movies, shows details (release date, cast, synopsis) and reviews for the selected movies, and also allows users to search for other movies from the Rotten Tomatoes movie database.

The Rotten Tomatoes API gives access to wealth of movie information, allowing anyone to build applications and widgets enriched with Rotten Tomatoes data. The API allows to get the current box office movies, new releases, upcoming movies and search for movies and retrieve detailed movie information, like cast, directors, and movie posters.

Here are some of the screenshots of the app,

Tab1   Movie Detail Page1     Movie Reviews Page

I wrote up an article on the Nokia Developer Wiki, explaining how it is developed. Check it out here. The project is an open source project available at Nokia Developer Projects.

Posted in Code Example, Nokia, Open Source, Projects, Series 40 | Tagged , , | Leave a comment

Exploring my brand new Raspberry Pi

Recently, I was lucky enough to get one of those low cost $35 Raspberry Pi boards. Thanks to the Raspberry Pi Foundation and Nokia for initiating the Qt on Pi Program and distributing the boards among developers. It took quite some time for them to ship the board to me but finally it is here and it looks like this,

Avnee's Raspberry Pi

The board came with a 4 GB SD card and a Nokia USB charger.

Here’s what I did to get started with my Raspberry Pi:
- Downloaded the Raspian(the Raspberry Pi OS) and unzipped the file using Win32DiskImager.
- Got the Raspbian .img file written on to the SD cardWrite OS to SD Card

- Once done, inserted the SD card into the Raspberry Pi
- Connected the unit with my TV by plugging in the RCA composite (yellow-to-yellow RCA cable) into the RCA video slot
- Attached mouse to the USB port
- Finally, powered the board with a Nokia USB charger

Raspberry Pi in action
- Configured the rasp pi (guidelines to this are available easily)

And aha! My Television was now showing me the awesomeness of Raspberry Pi. So, that’s it for now, much more to be done yet with this tiny chip!

Check out some of the images of the board in action:

TV connected with Raspberry Pi

Slide Puzzle

Wormy - Game

Posted in Nokia, Projects | Tagged | Leave a comment

Concluding GSoC 2012

As mentioned previously, my proposal of “Porting KDiamond(game) to Qt Quick” had been selected for Google Summer of Code (GSoC), 2012. And now the project time has almost come
to an end. KDiamond has been ported to QtQuick successfully. Of course, there’s some optimization work that I plan to do after GSoC as well. Here is the git repository where I
pushed all my code:

http://quickgit.kde.org/index.php?p=scratch%2Fnathani%2Fgsoc2012-kdiamond.git

This was my first GSoC experience and thus I got a lot of exposure to the KDE development environment. It was a great experience – The open environment in the company of really experienced developers, dealing with a lot of code and over an above being a part of a BIG community of developers. I had the pleasure to work under the guidance of really fantastic mentors,

  •  Ian Wadham for helping me set up the KDE development environment to begin with and later was really kind to give me honest pointers in my work
  •  David Edmundson for his expert advice about my project, coding style, etc.

Here are some of the screenshots from the KDiamond – QtQuick version of the game:

KDiamond - QtQucikVersion

Posted in Game, GSoC, KDE, Open Source, Projects, Qt Quick | Tagged , , , , , | Leave a comment

GSoC: Porting KDiamond (game) to Qt Quick

Yesterday, my proposal was selected by KDE for the Google Summer of Code 2012 program. So this summer I’ll be busy working under my GSoC organisation i.e. KDE with my mentor Ian Wadham and co-mentor David Edmundson.

About my project:
My project involves the idea of porting a KDE game “KDiamond” to “Qt Quick”. Here’s the abstract from my proposal

“KDiamond is one of the addictive KDE-Games. Whilst the game is very intuitive to play, I feel that the gameplay and the user interactions can be improved to make it more complelling. My proposal is to port KDiamond to Qt Quick – which would allow me to enhance the UI for better gameplay, and with the UI capabilities of QML – give a new feel of the game to the player. I also plan to add some more UI components like – dialogs, particles effect, transitions to the game to to make it more engaging and fun to play!”

Why I chose to work with KDE-Games:
Over the past 2 years I have been working with Qt/QML. The idea of developing games using Qt Quick has always attracted me. In fact, I have already developed games using Qt Quick for mobile. In the past couple of months, I have learned about KDE development environment. Hence KDE-Games seemed the perfect category to work on!

I’ll try to post more updates about my GSoC activities here. So stay tuned!

Posted in Awards, Game, GSoC, KDE, Open Source, Projects | Tagged , , , , , , , | Leave a comment

Nokia Developer Champion

Nokia Developer recently announced this year’s Nokia Developer Champions and I am glad to say that I have been entitled as “Nokia Developer Champion“.

I would like to thank the Nokia Developer Community for rewarding me with such an important title and inviting me under their elite mobile developers group.

Check my Nokia Developer Wiki contibutions here.

Posted in Awards, Nokia | Tagged , , | Leave a comment

Progress with my Handwriting Recognition Project

I am back with more updates on my handwriting recognition project!

In my last post, I talked about developing Scribble-pad for accepting user input that we can process for handwriting recognition. Another way of capturing input can be by a phone camera, so the user can just click a picture of the text. I’ll post about the camera input in a separate post, but today I would like to show you how I did some image processing on the image we saved from the Scribble-pad.

Going for the complete handwritten word seemed too ambitious to me, so I’m going to start by recognizing a letter first!

Logic

First we allow the user to write a letter and save it to a file using our Scribble-pad.

A possible way to recognize the letter could be to compare the saved image with all the other english alphabets and numerals. If it matches to a threshold percentage, it’s more likely to actually be that character. There can be some errors because the style and size of the handwriting of every user would differ. We can do some amount of image processing to detect if the user’s handwriting is too small to compare and enlarge it to a working size, however nothing can be done if the user has bad handwriting. (So, my engine wouldn’t work if you have a really bad handwriting)

Implementation

So following the logic I outlined above, we would need source images of all the characters of english letters and numerals. Where do I get these from? The answer is to generate these images from Qt.

Here’s how I generated the images for upper case characters A-Z. These images were generated as follows,

ascii_counter = 65;
QFont font("Mangal",12, QFont::Bold, false);

for(int i = ascii_counter; i<91; i++)
{
QPixmap pix(20,20);
pix.fill(Qt::white);
QPainter p(&pix);
p.setPen(QColor(0,0,0));
p.setFont(font);
p.drawText(QPoint(3,18), QString(QChar(i)));
pix.toImage().convertToFormat(QImage::Format_Mono);
pix.save(FileRoot+ "img_"+ QString::number(i) +".bmp");
}

Similarly, I generated images for lower case characters a-z and numerals 0-9. I used the image size as 20x20px, just because I feel they were sufficiently good for comparison. Besides, the bigger the resolution, the bigger the size of the images!
Note, I also experimented with the font that is used to generate these images. I am using Mangal, size 12, Bold font here, but we can generate the character set for multiple fonts if we want our engine to be more efficient. For example, Lucida Console handwriting font would be good for running handwriting.

Now, to compare the user scribbled image (let’s load it in desImg) with the images that I generated. Here’s how I’ll do the comparison,

QPixmap recalculateResult()
{
QPainter::CompositionMode mode = QPainter::CompositionMode_Screen;

QPainter painter(&resImg);
painter.setCompositionMode(QPainter::CompositionMode_Source);
painter.fillRect(resImg.rect(), Qt::transparent);
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
painter.drawImage(0, 0, desImg);
painter.setCompositionMode(mode);
painter.drawImage(0, 0, sourceImg);
painter.setCompositionMode(QPainter::CompositionMode_DestinationOver);
painter.fillRect(resImg.rect(), Qt::white);
painter.end();

return QPixmap::fromImage(resImg);
}

Generated Images


Continue reading

Posted in Code Example, Nokia, Projects, Qt, Qt Quick, Symbian | Tagged , , , , , , , | Leave a comment

Scribble-pad for my Handwriting recognition project!

In my first blog post, I mentioned about my interest to work on handwriting recognition. I’ve been working on it since quite some time now, just didn’t get time to post intermittently. I thought it’s a good time to publish what I’ve been doing on this hobbistic project of mine.

In this post, I’ll share one way of accepting user input i.e. by building a scribble pad. This is one of the most intuitive ways of capturing user input for further processing.

So I decided to create a scribble-pad myself, and what better development technology could I use than Qt and QML. (Fyi, using Qt and QML in an application – gives a Qt Quick application, as they call it)  So, today I’ll be talking about this scribble-pad component in my handwriting recognition exploration.

Here’s how the scribble-pad is finally going to look like! I didn’t concentrate much on the UI part of the scribble pad, but it works well on a mobile device too – I’ve been testing it on Nokia C7.

Let’s now get into the technical implementation of the scribble-pad. The UI of the application is written with QML while some of the engine part (like saving the painted image) is done with Qt.
Continue reading

Posted in Code Example, Nokia, Projects, Qt Quick, Symbian | Tagged , , , , , , , | Leave a comment