⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dibapi.h

📁 影像融合与融合精度评价源码影像融合与融合精度评价源码
💻 H
字号:
// dibapi.h
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.


#ifndef _INC_DIBAPI
#define _INC_DIBAPI

/* Handle to a DIB */
DECLARE_HANDLE(HDIB);

/* DIB constants */
#define PALVERSION   0x300

/* DIB Macros*/

#define IS_WIN30_DIB(lpbi)  ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
#define RECTWIDTH(lpRect)     ((lpRect)->right - (lpRect)->left)
#define RECTHEIGHT(lpRect)    ((lpRect)->bottom - (lpRect)->top)

#define PIXEL_OFFSET(i,j,nWidthBytes)     (LONG)((LONG)(i)*(LONG)(nWidthBytes)+(LONG)(j)*3)

// WIDTHBYTES performs DWORD-aligning of DIB scanlines.  The "bits"
// parameter is the bit count for the scanline (biWidth * biBitCount),
// and this macro returns the number of DWORD-aligned bytes needed
// to hold those bits.

#define WIDTHBYTES(bits)    (((bits) + 31) / 32 * 4)

typedef struct _NODE
{
	BOOL bIsLeaf;
	UINT nPixelCount;
	UINT nRedSum;
	UINT nGreenSum;
	UINT nBlueSum;
	struct _NODE* pChild[8];
	struct _NODE* pNext;
}NODE;

/* Function prototypes */
BOOL      WINAPI  PaintDIB (HDC, LPRECT, HDIB, LPRECT, CPalette* pPal);
BOOL      WINAPI  CreateDIBPalette(HDIB hDIB, CPalette* cPal);
LPSTR     WINAPI  FindDIBBits (LPSTR lpbi);
DWORD     WINAPI  DIBWidth (LPSTR lpDIB);
DWORD     WINAPI  DIBHeight (LPSTR lpDIB);
WORD      WINAPI  PaletteSize (LPSTR lpbi);
WORD      WINAPI  DIBNumColors (LPSTR lpbi);
HGLOBAL   WINAPI  CopyHandle (HGLOBAL h);

BOOL      WINAPI  SaveDIB (HDIB hDib, CFile& file);
HDIB      WINAPI  ReadDIBFile(CFile& file);
HDIB      WINAPI  CreateDIB(DWORD dwWidth,DWORD dwHeight,WORD wBitCount);
HDIB      WINAPI  CreateDefaultDIB(DWORD dwWidth,DWORD dwHeight);
DWORD     WINAPI  BytesPerLine(LPBYTE lpDIB);
int       WINAPI  PalEntriesOnDevice(HDC hDC);
HDIB      WINAPI  ConvertDIBFormat(HDIB hSrcDIB,UINT nbpp,HPALETTE hPalSrc);
BOOL      WINAPI  CopyColorTable(LPBITMAPINFO lpTarget,LPBITMAPINFO lpSource,HPALETTE hPalSrc);
HPALETTE  WINAPI  CreateOctreePalette(LPBYTE lpDIB,UINT nMaxColors,UINT nColorBits);
HBITMAP   WINAPI DIBTODIBSection(LPBYTE lpDIB);
HPALETTE  WINAPI  BuildOctreePalette(HANDLE hImage,UINT nMaxColors,UINT nColorBits);
void      WINAPI  AddColor(NODE** ppNode,BYTE r,BYTE g,BYTE b,UINT nColorBits,
						   UINT nLevel,UINT* pLeafCount,NODE** pReducibleNodes);
void   WINAPI  ReduceTree(UINT nColorBits,UINT* pLeafCount,NODE** pReducibleNodes);
int    WINAPI  GetRightShiftCount(DWORD dwVal);
int    WINAPI  GetLeftShiftCount(DWORD dwVal);
void   WINAPI  DeleteTree(NODE** ppNode);
void   WINAPI  GetPaletteColors(NODE* pTree,PALETTEENTRY* pPalEntries,UINT* pIndex);
NODE*  WINAPI  CreateNode(UINT nLevel,UINT nColorBits,UINT* pLeafCount,NODE** pReducibleNodes);
void   WINAPI  Zhengtaihuawhw(unsigned char *ii, int Row, int Col);
void   WINAPI  Logtranslate(unsigned char *ii, int Row, int Col);
void   WINAPI  C_Means(int *buffer,int m_width,int m_height,int index,double *Means);
void   WINAPI  C_StandardVar(int *buffer,int m_width,int m_height,double *Means,int index,double *Function);
void   WINAPI  jacobi(double *a, int n, double *d, double* v);
void   WINAPI  eigsrt(double * d, double* v, int n,double * eva);
BOOL   WINAPI  PCA(double * v,double * Means,int n,int *multi_image,int width,int height);
void   WINAPI  Norm(double * buffer, long size);
void   WINAPI  Means(int * buffer,long size,int sp,double * means);
void   WINAPI  Variance(int * buffer,double * means,long size,int sp,double * variance);
void   WINAPI  Correlation(int * buffer,long size,int sp,double * cof);
double WINAPI  bsdet(double * a,int n);
int    WINAPI  brinv(double * a,int n);
void   WINAPI  Matricx_Mul(double a[],double b[],int m,int n,int k,double c[]);
void   WINAPI  Matricx_tMul(double a[],double b[],int m,int n,int k,double c[]);
void   WINAPI  cal_zz(double * zz,int kindsnum,int sp_no,int * images_buffer,int m_width,int m_height);
void   WINAPI   bssgj(double *a,int n);
COLORREF    WINAPI   ClassColorIndex(int n);
HDIB        WINAPI Create256GrayImage(DWORD Width,DWORD Height);
double      WINAPI  Distence(double X1[],double X2[],int n);
void        WINAPI  BWClustering(int * image,int *Y,int n,int width,int height);
void        WINAPI  KMeanClustering(int * image,int *Y,int n,int width,int height);
void        WINAPI  IsodataClustering(float * image,int *Y,int n,int width,int height);
WORD     DIBBitCount (LPSTR lpDIB); 
WORD     DIBBitCount (HDIB hDIB); 

#endif //!_INC_DIBAPI

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -