Archive for February, 2013

I have been searching for some good papers which I could implement to improve  my current implementation. After lots of googling and reading few papers, my eyes were half red. It was around 3 a.m. when I came across  Ioannis Katramados and Toby Breckon’s paper on “REAL-TIME VISUAL SALIENCY BY DIVISION OF GAUSSIANS”. This was not exactly what I was looking for but it somehow seems to satisfy my need. So I thought to implement the paper. Since then I have been discussing various things with both I. Katramados and T. Breckon. They both are really helpful and so is their paper.

Coming back to implementation, the paper has been written perfectly and it seems easy to implement the paper using OpenCV (SEEMS!).

This is what I am doing:
1) I converted image to GrayScale (32F)
2) according to step one in paper: “The Gaussian pyramid U comprises of n levels,starting with an image U1 as the base with resolution w × h. Higher pyramid levels are derived via downsampling using a 5 × 5 Gaussian filter. The top pyramid level has a resolution of (w/2n−1 ) × (h/2n−1 ). Let us call this image Un .
    which means I simply have to perform pyrDown() operation in opencv. I did it 8 times.
3) according to step two paper: “U n is used as the top level Dn of a second Gaus-sian pyramid D in order to derive its base D1 . In this case, lower pyramid levels are derived via upsampling using a 5×5 Gaussian filter.”
I simply performed 8 times pyrUp image.
4) And then goes pixel by pixel division of values as according to paper.
5) I normalized the result matrix to 0-255
I. Katramados has been really generous. Both the writers of the paper have been really helpful. I guess few changes to its implementation might result in a better output.
3:41 PM = So now its time follow few more advises  Ioannis Katramados.

Finding the Hul(k)l with in

Posted: February 10, 2013 in Work

Struggle is something that should never stop. Even if I want it to stop, time constrains are not allowing it to be stopped. Implementation up till now is good. But is taking more time then calculated (3-4 seconds). Hence the struggle for a better implementation continues. Today I have been working to find convex hull. around the object in the image. The idea seems to be not so good to me. But trying it is the only option. So am being a little optimistic for now. As the time passes, my assumptions are turning right. mapping the convex hull around target to the original size image was not really so good. SO after few trials i dropped this idea. Current implementation is good enough. So tweaking it could help us. Using the concept of ROI really helped.   Now I am trying what I call another way of finding saliency map. This should reduce my run time (SHOULD).

Pdf + “Cute” [Touchulator]

Posted: February 3, 2013 in Work
Tags: , ,

So finally i have started my work on “something” new. Lets see how far this goes. So at first I was trying to read pdf file using QT. I found that QT itself does not come with any support to read pdf. However, there are many APIs available for QT. One of them being “Poppler”. Poppler (or libpoppler) is a free software library used to render PDF documents. Hence, I tried to implement poppler with QT.

If we skip the initial googling time, the task was not too difficult. All I had to do was to build poppler library. And then read pdf using this popeller library and rander pages as images. Now this image could easily be displayed thorugh QT.


Screenshot from 2013-02-03 13:34:41




For very basic implementation , this is the code:

QString filename = “/media/BACC8094CC804C97/Docs/Work Docs/PDF/IP/OReilly Learning OpenCV.pdf”;

Poppler::Document* document = Poppler::Document::load(filename);
if (!document || document->isLocked())
// … error message ….
delete document;
// Paranoid safety check
if (document == 0) {
// … error message …
// Access page of the PDF file
int pageNumber = 1;
Poppler::Page* pdfPage = document->page(pageNumber); // Document starts at page 0
if (pdfPage == 0) {
// … error message …
// Generate a QImage of the rendered page
double xres=150.0,yres=200.0;

image = pdfPage->renderToImage(xres, yres, 0, 0, 1000, 1000);
if (image.isNull()) {
// … error message …
// … use image …
// after the usage, the page must be deleted
delete pdfPage;
delete document;