cbir

Content-Based Image Retrieval and Precision-Recall graphs using Color Histograms in MATLAB

我只是一个虾纸丫 提交于 2019-11-27 09:35:39
So far, I have been able to plot Precision-Recall graphs for grayscale images in a CBIR system. However, I would like to know how to perform the same process for RGB images. My code: Inp1=rgb2gray(imread('D:\visionImages\c1\1.ppm')); figure, imshow(Inp1), title('Input image 1'); num_bins = 32; A = imhist(Inp1, num_bins); srcFiles = dir('D:\visionImages\c1\*.ppm'); B = zeros(num_bins, 30); ptr=1; for i = 1 : length(srcFiles) filename = strcat('D:\visionImages\c1\',srcFiles(i).name); I = imread(filename); I=rgb2gray(I); B(:,ptr) = imhist(I, num_bins); ptr=ptr+1; end % histogram intersection a =

Getting the most common color of an image

可紊 提交于 2019-11-27 00:48:48
问题 I'd like to get the most common color from an image. I use Java and I want to have the most predominant color. Are there any cbir java library to make this? Thanks 回答1: How accurate do you want this to be? You can use Bozhos's approach and loop over the entire image but this could be slow for large images. There are 16777216 possible RGB values and keeping counters for them in a Map is not very efficient. An alternative is to resample the image using getScaledInstance to scale it down to a

How to reduce the number of colors in an image with OpenCV?

喜你入骨 提交于 2019-11-26 20:21:19
I have a set of image files, and I want to reduce the number of colors of them to 64. How can I do this with OpenCV? I need this so I can work with a 64-sized image histogram. I'm implementing CBIR techniques What I want is color quantization to a 4-bit palette. Moacir Ponti There are many ways to do it. The methods suggested by jeff7 are OK, but some drawbacks are: method 1 have parameters N and M, that you must choose, and you must also convert it to another colorspace. method 2 answered can be very slow, since you should compute a 16.7 Milion bins histogram and sort it by frequency (to

Matching image to images collection

一笑奈何 提交于 2019-11-26 10:03:04
问题 I have large collecton of card images, and one photo of particular card. What tools can I use to find which image of collection is most similar to mine? Here\'s collection sample: Abundance Aggressive Urge Demystify Here\'s what I\'m trying to find: Card Photo 回答1: Thank you for posting some photos. I have coded an algorithm called Perceptual Hashing which I found by Dr Neal Krawetz. On comparing your images with the Card, I get the following percentage measures of similarity: Card vs.

Near-Duplicate Image Detection [closed]

ε祈祈猫儿з 提交于 2019-11-26 07:50:37
问题 What\'s a fast way to sort a given set of images by their similarity to each other. At the moment I have a system that does histogram analysis between two images, but this is a very expensive operation and seems too overkill. Optimally I am looking for a algorithm that would give each image a score (for example a integer score, such as the RGB Average) and I can just sort by that score. Identical Scores or scores next to each other are possible duplicates. 0299393 0599483 0499994 <- possible

How to reduce the number of colors in an image with OpenCV?

我的梦境 提交于 2019-11-26 07:35:54
问题 I have a set of image files, and I want to reduce the number of colors of them to 64. How can I do this with OpenCV? I need this so I can work with a 64-sized image histogram. I\'m implementing CBIR techniques What I want is color quantization to a 4-bit palette. 回答1: There are many ways to do it. The methods suggested by jeff7 are OK, but some drawbacks are: method 1 have parameters N and M, that you must choose, and you must also convert it to another colorspace. method 2 answered can be