资源简介
用vc++实现中值滤波,是冈萨雷斯图像处理书上提到的源代码,原算法。是图像处理的入门教材

代码片段和文件信息
// dibapi.cpp
//
// Source file for Device-Independent Bitmap (DIB) API. Provides
// the following functions:
//
// PaintDIB() - Painting routine for a DIB
// CreateDIBPalette() - Creates a palette from a DIB
// FindDIBBits() - Returns a pointer to the DIB bits
// DIBWidth() - Gets the width of the DIB
// DIBHeight() - Gets the height of the DIB
// PaletteSize() - Gets the size required to store the DIB‘s palette
// DIBNumColors() - Calculates the number of colors
// in the DIB‘s color table
// CopyHandle() - Makes a copy of the given global memory block
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1997 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.
#include “stdafx.h“
#include “dibapi.h“
#include
#include
#include
#define DIB_HEADER_MARKER ((WORD) (‘M‘ << 8) | ‘B‘)
#ifdef _MAC
#define SWAPWORD(x) MAKEWORD(HIBYTE(x) LOBYTE(x))
#define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)) SWAPWORD(LOWORD(x)))
void ByteSwapHeader(BITMAPFILEHEADER* bmiHeader);
void ByteSwapInfo(LPSTR lpHeader BOOL fWin30Header);
#endif
/*************************************************************************
*
* PaintDIB()
*
* Parameters:
*
* HDC hDC - DC to do output to
*
* LPRECT lpDCRect - rectangle on DC to do output to
*
* HDIB hDIB - handle to global memory with a DIB spec
* in it followed by the DIB bits
*
* LPRECT lpDIBRect - rectangle of DIB to output into lpDCRect
*
* CPalette* pPal - pointer to CPalette containing DIB‘s palette
*
* Return Value:
*
* BOOL - TRUE if DIB was drawn FALSE otherwise
*
* Description:
* Painting routine for a DIB. Calls StretchDIBits() or
* SetDIBitsToDevice() to paint the DIB. The DIB is
* output to the specified DC at the coordinates given
* in lpDCRect. The area of the DIB to be output is
* given by lpDIBRect.
*
************************************************************************/
BOOL WINAPI PaintDIB(HDC hDC
LPRECT lpDCRect
HDIB hDIB
LPRECT lpDIBRect
CPalette* pPal)
{
LPSTR lpDIBHdr; // Pointer to BITMAPINFOHEADER
LPSTR lpDIBBits; // Pointer to DIB bits
BOOL bSuccess=FALSE; // Success/fail flag
HPALETTE hPal=NULL; // Our DIB‘s palette
HPALETTE hOldPal=NULL; // Previous palette
/* Check for valid DIB handle */
if (hDIB == NULL)
return FALSE;
/* Lock down the DIB and get a pointer to the beginning of the bit
* buffer
*/
l
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 66614 2001-01-16 23:55 中值滤波\测试图片\原始lena图像(含椒盐噪声).bmp
文件 66614 2004-06-30 00:41 中值滤波\测试图片\经中值滤波后.bmp
文件 23782 2004-03-07 17:05 中值滤波\源代码\dibapi.cpp
文件 1876 2000-02-03 07:29 中值滤波\源代码\dibapi.h
文件 2506 2004-05-20 14:25 中值滤波\源代码\MainFrm.cpp
文件 1581 2004-05-20 14:25 中值滤波\源代码\MainFrm.h
文件 3157 2004-05-20 17:49 中值滤波\源代码\mydib.cpp
文件 72 2004-05-20 17:26 中值滤波\源代码\mydib.h
文件 46324 2004-06-30 00:39 中值滤波\源代码\MyDIP.aps
文件 2615 2004-06-30 00:37 中值滤波\源代码\MyDIP.clw
文件 4158 2004-05-20 14:25 中值滤波\源代码\MyDIP.cpp
文件 4781 2004-05-20 17:54 中值滤波\源代码\MyDIP.dsp
文件 533 2004-05-20 14:25 中值滤波\源代码\MyDIP.dsw
文件 1345 2004-05-20 14:25 中值滤波\源代码\MyDIP.h
文件 12279 2004-06-30 00:39 中值滤波\源代码\MyDIP.rc
文件 4007 2004-05-20 17:10 中值滤波\源代码\MyDIPDoc.cpp
文件 1830 2004-05-20 15:17 中值滤波\源代码\MyDIPDoc.h
文件 7850 2004-06-30 00:39 中值滤波\源代码\MyDIPView.cpp
文件 1852 2004-06-30 00:37 中值滤波\源代码\MyDIPView.h
文件 4287 2004-05-20 14:25 中值滤波\源代码\ReadMe.txt
文件 36864 2004-06-30 00:39 中值滤波\源代码\Release\MyDIP.exe
文件 1078 2004-05-20 14:25 中值滤波\源代码\res\MyDIP.ico
文件 397 2004-05-20 14:25 中值滤波\源代码\res\MyDIP.rc2
文件 1078 2004-05-20 14:25 中值滤波\源代码\res\MyDIPDoc.ico
文件 1078 2004-05-20 14:25 中值滤波\源代码\res\Toolbar.bmp
文件 874 2004-06-30 00:39 中值滤波\源代码\Resource.h
文件 207 2004-05-20 14:25 中值滤波\源代码\StdAfx.cpp
文件 1040 2004-05-20 17:21 中值滤波\源代码\StdAfx.h
..AD... 0 2005-11-28 19:30 中值滤波\源代码\Release
..AD... 0 2005-11-28 19:30 中值滤波\源代码\res
............此处省略6个文件信息
相关资源
- VC++实现CMD命令执行与获得返回信息
- VC++实现RSA加密算法
- MFC VC++实现Sierpinski分形图像
- 用vc++实现文件加密功能的源代码
- VC++实现两台电脑文件传输(源代码)
- VC++实现的酒店管理系统软件
- VC++实现动态创建对话框非常好的C++源
- (LSB算法)数字水印的嵌入和提取V
- 用VC++实现多媒体播放器
- VC++实现了基于图像小波变换的图像融
- 简单黑白棋VC++实现
- 简单的vc++实现winsock点对点通信
- 基于VC++实现的人脸检测
- svm算法源代码VC++实现
- (LSB算法)数字水印的VC++实现
- VC++实现打印
- vc++实现des加密和解密
- VC++实现的计算器,用MFC实现界面操作
- VC++实现悬浮窗 迅雷360悬浮球
- VC++实现的软件自动更新模块Updater源码
- VC++实现科学计算器
- VC++实现灰度图像的6种边缘检测算子
- VC++实现Contourlet图像处理
- VC++实现小波变换
- VC++实现简单的用户登录系统ADO。包括
- VC++实现简单的用户登录系统,包括修
- diffie-hellman密钥交换协议vc++实现
- 基于有线局域网语音聊天系统VC++实现
- 基于SNMP的IP流量统计(VC++实现)源代
- VC++实现电子词典
评论
共有 条评论