MPEG-7 Texture: Edge Histogram Descriptor

The main descriptors discussed in MPEG-7 for the case of video / still images are Texture, Colour, Shape and Motion. We shall start this series of posts with the analysis of Texture.

Texture and Colour are by far the most important and yet simple features that are most intuitive for describing objects or pictures. MPEG-7 has three main descriptors related to texture. Two of them are related to Homogeneous Texture Descriptor while another is the Edge Histogram Descriptor (EHD). This post shall deal with the analysis of the latter which can be quite useful for scene classification in a video sequence, specially that of sports videos.

C.S. Won et. al. describe the main implementation of the EHD and one of the major applications – Image Retrieval. It also has nice figures to get a clear idea of the procedure.

The idea is that of local processing. The image is divided into 4×4 sub-images. Each sub-image is further divided into smaller image blocks (typically 4×4 pixels). The standard allows for the having vertical, horizontal, diagonal (45 and 135 degrees) and non-directional edges. If the image block is a monotone, no edge is counted. Simple filtering of the image blocks allows to obtain the most prominent edge in the block. A histogram of 5 bins (1 for each edge type) is computed over all the image blocks in the sub-image. This procedure is repeated for all the 16 sub-images and hence we obtain 80 histogram coefficients. The standard proposes non-linear quantisation for the sake of storage (3 bits / coefficient).

Edges are quite important for our visual system, and these coefficients quantify them in a proper way. It is definitely a basis for Image Retrieval – querying for images by example.


16 thoughts on “MPEG-7 Texture: Edge Histogram Descriptor

      1. Makarand Tapaswi Post author

        You should be able to replace gaussianFilter(11, 1.5) by this fspecial(‘gaussian’, 11, 1.5);

      2. jenifer

        thank u for your guidance sir….. there is an another one error in this line eoh(j,i,:) = permute(hist(makelinear(clip), 0:5), [1 3 2]);
        error in makelinear i think….

      3. Makarand Tapaswi Post author

        i guess the makelinear can be fixed by matlab’s indexing using hist(clip(:), 0:5) and so on. Have not looked with detail.

      4. Makarand Tapaswi Post author

        You cannot imshow a double matrix of dimension 4x4x5! Please read the Matlab doc too! In general, you cannot imshow histograms. Just plot them. Also in this case, what you obtain is basically a 5 dimension histogram for each of the image blocks (16 blocks =4×4). So depending on your application, typically you just want to linearize it (eoh(:)) and compare it by some distance measures (like euclidean) to other image eoh vectors, then threshold this distance and say whether the images are similar or not.

      5. Makarand Tapaswi Post author

        Which link exactly do you mean? The paper pdf or the matlab code? Both seem to work fine for me.

    1. Makarand Tapaswi Post author

      You have to try multiple values and see which works best for your case. In case of formal learning, you can try it on different data, learn a “good” threshold on training data, and try it out on a held-out test data.

  1. habbachi saber

    hi for all i need ur help about this
    implementation fpga for edge histogram
    somme one can help me


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s