Posts tagged ‘Algorithm’

Image Blur Detection via Hough Transform — IV

In my previous three articles (1,2,3) I discussed how to use Canny edge detection and Hough transform to identify blur images. Here I will show some results from the algorithm discussed before. Continue reading ‘Image Blur Detection via Hough Transform — IV’ »

Image Blur Detection via Hough Transform — III

I will continue where I left off in my previous post. After performing Hough transform, and extracted the longest sections of lines for each corresponding Hough line detected, we will need to calculate the gradients of the image pixels luminance around the line sections. Continue reading ‘Image Blur Detection via Hough Transform — III’ »

Image Blur Detection via Hough Transform — II

In my previous post, I briefly discussed the rationale behind automated blur detection in digital imagery and did an overview of an algorithm that could be used to detect blur images. Here I will show some implementation details along with some C++ code snippets. Continue reading ‘Image Blur Detection via Hough Transform — II’ »

Image Blur Detection via Hough Transform — I

It is often necessary to identify and classify images based on their clarities. For instance, it is desirable for an automated process to locate blurred images within a large digitized image library and then automatically sharpen the blurred images via inverse filtering or blind deconvolution. In the following series of articles, I will discuss a practical method in detecting blur images using Hough Transform. Continue reading ‘Image Blur Detection via Hough Transform — I’ »

Canny Edge Detection Auto Thresholding

In the example I gave in “Interfacing IPP with Magick++“, I illustrated how to use Intel’s Integrated Performance Primitives (IPP) to perform edge detection. One issue with Canny edge detection algorithm is that we need to specify a high threshold and a low threshold. How to select those threshold values affect the quality of the detected edge greatly. And in my previous example, the threshold values were chosen manually. In this blog post, I will examine a couple of simple methods that can be used to automatically determine the threshold values. Continue reading ‘Canny Edge Detection Auto Thresholding’ »

Interfacing IPP with Magick++

Intel’s Integrated Performance Primitives (IPP) is a low level C++ library. It provides routines that are highly optimized on Intel processors. I recently started using it because its vast speed advantage in signal and image processing applications. Continue reading ‘Interfacing IPP with Magick++’ »

Matrix Multiplication Performance in C++

A few days ago, I ran across this article by Dmitri Nesteruk. In his article, he compared the performance between C# and C++ in matrix multiplication. From the data he provided, matrix multiplication using C# is two to three times slower than using C++ in comparable situations. Continue reading ‘Matrix Multiplication Performance in C++’ »

Two Level Tree and Its Applications — II

In my previous post, I discussed how to merge and split a two level tree. Before moving on to discuss its applications, let us take a look at the output of the sample program I gave before.  Continue reading ‘Two Level Tree and Its Applications — II’ »

Two Level Tree and Its Applications — I

A two level tree is a simple tree data structure. Unlike in a typical tree where the tree depths could be arbitrary, a two level tree has only two levels as its name suggests. Two level tree is also equivalent to a star. Continue reading ‘Two Level Tree and Its Applications — I’ »

Producer-Consumer: A Duplicate File Finder

Processes tend to benefit greatly from multi-core processors if they are CPU bound (i.e. computational intensive tasks). The actual speedup depends on the portion of the code that must remain sequential. Continue reading ‘Producer-Consumer: A Duplicate File Finder’ »

Same Method, Different Speed

I came across something rather interesting the other day when trying to determine what sorting algorithms .Net Framework uses in its list class: The built-in  sorting method runs much faster than the reverse-engineered and then compiled code, even though in theory the code being executed is identical. Continue reading ‘Same Method, Different Speed’ »

Generating Unique Permutations Programmatically

Download UniquePermutation.zip The numbers of permutations on a set of n elements is n! (see definition). Continue reading ‘Generating Unique Permutations Programmatically’ »

Implementing a Trie in C#

Download Trie.zip Trie is a tree like data structure that can be used for fast text search. Continue reading ‘Implementing a Trie in C#’ »

Three Ways to Reverse a String in C# – Update

In my post a week ago, I mentioned three ways to reverse a string. OK, I really meant three alternative ways to reverse a string. Continue reading ‘Three Ways to Reverse a String in C# – Update’ »

Three Ways to Reverse a String in C#

OK, conceptually, it’s quite easy. A couple of my friends got asked this question when interviewing. Here are what my solutions are: Continue reading ‘Three Ways to Reverse a String in C#’ »