資源簡介
基于顏色特征的圖像檢索系統(tǒng)源代碼。積分已調(diào)到最低,網(wǎng)站不讓免費

代碼片段和文件信息
/******************************************************************
CqOctree.CPP
??Performing?Color?Quantization?using?Octree?algorithm
??The?2?functions?for?global?use?is
??HPALETTE?CreateOctreePalette?(HBITMAP?hImage?UINT?nMaxColors?UINT?nColorBits)
??HPALETTE?CreateOctreePalette?(LPSTR?lpDIB?UINT?nMaxColors?UINT?nColorBits)
??For?using?convenience?define?it?in?DIBAPI.H
******************************************************************/
#include?“stdafx.h“
#include?“dibapi.h“
//?structure?use?internally
//?store?the?necessary?info?of?a?node?in?octree
typedef?struct?_NODE?
{
????BOOL?bIsLeaf;???????????????//?TRUE?if?node?has?no?children
????UINT?nPixelCount;???????????//?Number?of?pixels?represented?by?this?leaf
????UINT?nRedSum;???????????????//?Sum?of?red?components
????UINT?nGreenSum;?????????????//?Sum?of?green?components
????UINT?nBlueSum;??????????????//?Sum?of?blue?components
????struct?_NODE*?pChild[8];????//?Pointers?to?child?nodes
????struct?_NODE*?pNext;????????//?Pointer?to?next?reducible?node
}?NODE;
//?Function?prototypes
//Global?use?define?it?in?dibapi.h
//HPALETTE?CreateOctreePalette?(HDIB?hDIB?UINT?nMaxColors?UINT?nColorBits)
//HPALETTE?CreateOctreePalette?(LPSTR?lpDIB?UINT?nMaxColors?UINT?nColorBits)
//Local?use?only
HPALETTE?BuildOctreePalette(HANDLE?hImage?UINT?nMaxColors?UINT?nColorBits);
void?AddColor?(NODE**?BYTE?BYTE?BYTE?UINT?UINT?UINT*?NODE**);
NODE*?CreateNode?(UINT?UINT?UINT*?NODE**);
void?ReduceTree?(UINT?UINT*?NODE**);
void?DeleteTree?(NODE**);
void?GetPaletteColors?(NODE*?PALETTEENTRY*?UINT*);
int?GetRightShiftCount?(DWORD);
int?GetLeftShiftCount?(DWORD);
//?Function?body
/*************************************************************************?
?*?
?*?CreateOctreePalette()?
?*?
?*?Parameters:?
?*?
?*?HDIB?hDIB????????-?Handle?to?source?DIB?
?*?UINT?nMaxColors??-?destination?color?number
?*?UINT?nColorBits??-?destination?color?bits
?*?
?*?Return?Value:?
?*?
?*?HPALETTE?????????-?Handle?to?the?result?palette
?*?
?*?Description:?
?*?
?*?This?function?use?Octree?color?quantization?algorithm?to?get
?*?optimal?m?kinds?of?color?to?represent?total?n?kinds?of?color?
?*?in?a?DIB?and?use?the?m?kinds?of?color?to?build?a?palette.
?*?With?the?palette?we?can?display?the?DIB?on?reasonable?accuracy.
?*?
?************************************************************************/?
HPALETTE?CreateOctreePalette(HDIB?hDIB?UINT?nMaxColors?UINT?nColorBits)
{
HANDLE?hImage;
hImage?=?DIBToDIBSection(hDIB);
if?(!?hImage)
return?NULL;
return?BuildOctreePalette(hImage?nMaxColors?nColorBits);
}
/*************************************************************************?
?*?
?*?CreateOctreePalette()?
?*?
?*?Parameters:?
?*?
?*?LPBYTE?lpDIB?????-?Pointer?to?DIB?data?buffer
?*?UINT?nMaxColors??-?destination?color?number
?*?UINT?nColorBits??-?destination?color?bits
?*?
?*?Return?Value:?
?*?
?*?HPALETTE???????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2010-03-20?13:33??基于顏色特征的圖像檢索系統(tǒng)源代碼\
?????目錄???????????0??2010-06-18?09:33??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\
?????文件???????35612??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\0.jpg
?????文件???????24182??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\1.jpg
?????文件???????32244??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\10.jpg
?????文件???????46832??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\100.jpg
?????文件???????28823??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\101.jpg
?????文件???????26552??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\102.jpg
?????文件???????24453??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\103.jpg
?????文件???????35137??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\104.jpg
?????文件???????30241??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\105.jpg
?????文件???????28958??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\191.jpg
?????文件???????24858??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\192.jpg
?????文件???????45954??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\193.jpg
?????文件???????23703??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\194.jpg
?????文件???????27456??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\195.jpg
?????文件???????49191??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\196.jpg
?????文件???????27869??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\197.jpg
?????文件???????28652??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\198.jpg
?????文件???????18617??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\199.jpg
?????文件???????42708??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\2.jpg
?????文件???????28978??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\20.jpg
?????文件???????28968??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\200.jpg
?????文件???????24443??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\201.jpg
?????文件???????25964??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\202.jpg
?????文件???????35462??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\203.jpg
?????文件???????35069??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\204.jpg
?????文件???????26014??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\205.jpg
?????文件???????32661??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\206.jpg
?????文件???????23251??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\207.jpg
?????文件???????24239??2001-07-07?04:02??基于顏色特征的圖像檢索系統(tǒng)源代碼\image.orig\208.jpg
............此處省略197個文件信息
- 上一篇:基于STM32F4的霍爾編碼器解析程序
- 下一篇:HCNA_R&S 題庫
評論
共有 條評論