1
$\begingroup$

I'm implementing a dictionary learning algorithm for doing sparse coding on images and I have a problem how to learn a dictionary corresponding to several iamges.

Let’s say X is the data matrix. If I apply dictionary learning only to one image then X is equal to the image. But what if I want to learn the dictionary for several images ? Should I in this case just put all images into X, i.e. X = [image1, image2, image3…]?

Another approach I thought of was to learn a dictionary for each image separately and then decide online which dictionary to use (by e.g. comparing histograms or some similarity measures to decide to which training image the new input image is most similar to and then choosing the corresponding dictionary).

What appraoch should I use?

$\endgroup$
  • $\begingroup$ Maybe, you can try Bag of Words. BoW $\endgroup$ – Kuo Jan 19 '15 at 14:46
1
$\begingroup$

Dictionary learning is usually done on more than one image. So yes, I would normalize and concatenate multiple images together. What I usually do is create 8x8 patches from images and vectorize them so that they represent one column (data-item) from the training set (X in your case).

$\endgroup$
0
$\begingroup$

K SVD algorithm is especially for learning Dictionary.It has a sparse coding stage and Dictionary update stage using the matrix decomposition Singular value decomposition.There are research papers which explains this Algorithm.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.