MATLAB: How to start coding for a content based image retrieval system using color

cbircontent based image retrievalimage processingImage Processing Toolbox

i have an images folder. how to calculate the histograms of all images in the folder and compare it with the query image(image selected by the user) and display all the similar images?