Click here to Skip to main content
15,794,593 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey, I am doing a project using python and opencv(cv2). here i am calculating the dataset's image's red,green and blue mean separately and also calculating the GLCM( contrast, energy,homogeneity, and correlation) and saving it in different list's. Now i have calculated the euclidean distance between query image with DB images, but i am unable to display the images with least distance.
i have done the code partially, and it is like:
import cv2
from collections import *
import CBIR as cb
import experiment as ex
from scipy.spatial import distance
from matplotlib import pyplot as plt

result_list = list()
i = 0
a_list = list()
b_list = list()
while i < 50:
   dist = distance.euclidean(a_list,b_list[i])
   result_list_sort = OrderedDict(sorted(enumerate(result_list),key=lambda x: x[0])).keys()
   i = i + 1
res_list_sort = zip(result_list,result_list_sort)

CBIR gives red,green and blue mean with GLCM( contrast, energy,homogeneity, and correlation) of DB images and experiment will give the values of the query image.

how to display the images. Any suggestions are welcome

Updated 10-Mar-14 9:21am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900