instancecsのブログ -2ページ目

instancecsのブログ

ブログの説明を入力します。

Two years ago, I wrote a 'similar image search of principle', he Nike 6.0 Mavrk Mid 2 Skate Shoes Black Blue describes one of the most simple implementation. Yesterday, I was in isnowfy website to see, as well as the other two methods are very simple, do some notes here. First, each image color distribution method can generate color distribution histogram (color histogram). If the histogram is very close to the two pictures, they can be considered very similar. Any color is red, green and blue (RGB) configuration, so the figure there are four histograms (histogram + final synthesis trichromatic histogram). If each primary color can take 256 values, then the entire color space of 1,600 million colors (256 cubed). For these 16 million kinds of color in Air Max 2012 Yellow Black Grey the histogram, calculate the amount is too great, and therefore need to adopt a simplified method. Can be divided into four zones 0 to 255: 0 to 63 0 for the first area, 64 to 127 for the 1st district, 128 to 191 for Zone 2, from 192 to 255 for the 3rd district. This means that the red, green and blue, respectively, four areas, constituting a total of 64 combinations (4 to the third power). Any color must belong to these 64 kinds of combinations thereof, so that you can count the number of pixels contained in each combination. The figure is a picture of the color distribution table, the last column of the table is extracted to form a 64-dimensional vector (7414, 230, 0, 0, 8, ..., 109, 0, 0, 3415, 53929). This vector is the characteristic value or 'fingerprint' of this picture. So, look for similar picture becomes to find the most similar vectors. This can be used Pearson correlation or cosine similarity is calculated. Second, the content features French in addition to the color composition, it can also start from the similarity comparison picture content. First, turn the picture into a grayscale image smaller, assuming 50 × 50 pixels. Then, determine a threshold value, will turn into a black and white picture gray image. If two pictures are very similar, they 2015 Nike Free 5.0 are black and white outline should be similar. So, the question becomes, how to determine a reasonable first step threshold, the correct outline presented photos? Obviously, the greater the contrast between Air Max 2012 White Grey Blue the foreground and background color, outline more obvious. This means that if we find a value, you can make the foreground and background colors their 'inner class difference between the minimum' (minimizing the intra-class variance), or 'the biggest difference between the Class' (maximizing the inter-class variance), then this value is the desired threshold. In 1979, Black Air Max 2012 Purple Black Green Women Air Cushion Jordan High Heels Sale Nike 6.0 Mavrk Mid 2 Skate Shoes Red Black Japanese scholars Otsu exhibition of proof, 'the difference between the minimum inner class' and 'the biggest difference between the class' is the same thing, which corresponds with a threshold value. He proposed a simple algorithm that can find this threshold, this is called 'Otsu' (Otsu's method). Here is his method of New Womens Nike Free 3 V3 Trainers Black Grey calculation. A picture is assumed there are n pixels, wherein the gradation value is less than the threshold value n1 a pixel, the pixel is greater than the threshold value is equal Air Max 2012 Womens Navy Blue White to a n2 (n1 + n2 = n). w1 and w2 indicate the proportion of each of these two pixels. w1 = n1 / nw2 = n2 / n and then assume that all gray value is less than the threshold value Nike Dunk Heels of the mean and variance of pixels is Air Jordan Outlet μ1 and σ1, all gray value is greater than or equal to the value of the pixel of the mean and variance were μ2 and σ2 ʱ?? So, you can get within the class difference = w1 (σ1 squared) + w2 (σ2 squared) difference between class = w1w2 (μ1-μ2) ^ 2 can attest, these two formulas are equivalent: get 'category within difference 'minimum, equivalent to get' the maximum difference between the class, 'the. However, from the computational difficulty, the latter is easier to Nike Air Max calculate. Next with the 'exhaustive', the threshold value of the gradation from the lowest to the highest value, followed by taking over, are substituted into the above formula. Making Nike Dunk Heels the 'difference between the minimum inner class' or 'class difference between the maximum' of that value, is the final threshold. Specific examples and Java algorithm, link here. With 50 × 50 pixel black and white thumbnail, it is equivalent to have a 50 BHM PE Black History Month Nike Lunar Hyperdunk Low Online × 50 matrix 0-1. Each value matrix corresponds to one pixel of the original image, 0 is black, 1 white. This matrix is ​​a picture of the feature matrix. The difference between the two characteristic matrix of the less, on behalf Air Jordan Heel of the more similar the two pictures. This can be used, 'XOR' to achieve (ie only one of two values ​​is 1, the operation result is 1, otherwise the operation result is 0). Different pictures feature matrix 'XOR', the result of a the less is more similar images.similar image search of principle (ii)