Having fun with C++11 — how to pass flags to a function

January 4th, 2017

I’ve never been very active posting here, and since I left academia it has been even slower. All of 2016 passed without a single post! Since I now work for a company, it’s become more difficult for me to post about the fun little things that I work with. Nevertheless, I wanted to share a C++ construct that I came up with to pass flags (a collection of yes/no options) to a function.

Read the rest of this entry »

Moving

November 26th, 2015

After seven years at the Centre for Image Analysis at Uppsala University, in Sweden, it is time again to move on. I am sad to leave this great position, my wonderful colleagues, and the fantastic Uppsala students. But such is life.

For the first time in my life, I am now working for a company. I am happy to say that I still have wonderful colleagues. I will probably miss having students around, but I certainly will not miss the grant writing.

I bother to mention this on this blog because, with my move away from Uppsala University, this blog is also relocating! The new URL is http://www.crisluengo.net/. Please update your bookmarks!

The curse of the big table

June 3rd, 2015

As an Area Editor for Pattern Recognition Letters, I’m frequently confronted with papers containing big tables of results. It is often the deblurring and denoising papers that (obviously using PSNR as a quality metric!) display lots of large tables comparing the proposed method with the state of the art on a set of images. I’m seriously tired of this. Now I’ve set my foot down, and asked an author to remove the table and provide a plot instead. In this post I will show what is wrong with the tables and propose a good alternative.

Read the rest of this entry »

No, that’s not a Gaussian filter

February 6th, 2015

I recently got a question from a reader regarding Gaussian filtering, in which he says:

I have seen some codes use 3×3 Gaussian kernel like

    h1 = [1, 2, 1]/4

to do the separate filtering.

The paper by Burt and Adelson (The Laplacian Pyramid as a Compact Image Code, IEEE Transactions on Communication, 31:532-540, 1983) seems to use 5×5 Gaussian kernel like

    h1 = [1/4 - a/2, 1/4, a, 1/4, 1/4-a/2],

and a is between 0.3-0.6. A typical value of a may be 0.375, thus the Gaussian kernel is:

    h1 = [0.0625, 0.25, 0.375, 0.25, 0.0625]

or

    h1 = [1, 4, 6, 4, 1]/16.

I have written previously about Gaussian filtering, but neither of those posts make it clear what a Gaussian filter kernel looks like.

Read the rest of this entry »

Computer vision is hard!

September 24th, 2014

Today’s xkcd comic is relevant to this blog.

xkcd comic #1425

Mouse-over text: “In the 60s, Marvin Minsky assigned a couple of undergrads to spend the summer programming a computer to use a camera to identify objects in a scene. He figured they’d have the problem solved by the end of the summer. Half a century later, we’re still working on it.”