0
我有一個圖像,我提取最recoverednt Web顏色,我把它們放在一張桌子。 而我有一個數據庫與圖像(藝術品)包含相同的結構。 我想知道是否有一個快速的方法(就性能而言,因爲我有很多圖像在數據庫中),以瞭解顏色發生的最接近的圖像。 我使用C#和MongoDB(用於數據)MongoDB查詢和嵌入式文檔中發生次數的順序
例如: 所測試的圖像:
{
Artist : ArtistTest
Artworks :
[
{
Title : test1,
MostColors : [
{
Color : Blue,
Occurence : 10
},
{
Color : Green,
Occurence : 5
},
{
Color : Red,
Occurence : 2
}
]
}
]
}
圖像在DB:
{
Artist : ArtistTrain1
Artworks :
[
{
Title : train11,
MostColors : [
{
Color : Black,
Occurence : 20
},
{
Color : Yellow,
Occurence : 3
},
{
Color : Green,
Occurence : 1
}
]
},
{
Title : train12,
MostColors : [
{
Color : Red,
Occurence : 30
},
{
Color : Green,
Occurence : 10
},
{
Color : Purple,
Occurence : 5
}
]
}
]
},
{
Artist : ArtistTrain2
Artworks :
[
{
Title : train21,
MostColors : [
{
Color : Green,
Occurence : 15
},
{
Color : Red,
Occurence : 5
},
{
Color : Blue,
Occurence : 1
}
]
},
{
Title : train22,
MostColors : [
{
Color : Blue,
Occurence : 30
},
{
Color : Green,
Occurence : 1
},
{
Color : Red,
Occurence : 1
}
]
},
{
Title : train23,
MostColors : [
{
Color : Red,
Occurence : 30
},
{
Color : Blue,
Occurence : 10
},
{
Color : Green,
Occurence : 5
}
]
}
]
}
在理論上的結果,以便爲(第一最接近):
ArtistTrain2.train22
ArtistTrain2.train23
ArtistTrain2.train21
ArtistTrain1.train12
ArtistTrain1.train11
您怎麼看? (我不確定訂單)
謝謝你。