资源简介
本人做的一个数字图像处理的综合性实验,用VC++编程实现6个常用的边缘检测算子:罗伯特边缘检测算子(Robert)、索贝尔边缘检测算子(Sobel)、普瑞维特边缘检测算子(Prewitt)、拉普拉斯边缘检测算子(Laplacian)、凯西边缘检测算子(Kirsch)、高斯-拉普拉斯边缘检测算子(LOG)。里边附带有源代码,同大家分享,相互学习!!

代码片段和文件信息
// 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-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.
#include “stdafx.h“
#include “dibapi.h“
#include
#include
/*************************************************************************
*
* 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
*/
lpDIBHdr = (LPSTR) ::GlobalLock((HGLOBAL) hDIB);
lpDIBBits = ::FindDIBBits(lpDIBHdr);
// Get the DIB‘s palette then select it into DC
if (pPal != NULL)
{
hPal = (HPALETTE) pPal->m_hobject;
// Select as background since we have
// already realized in forground if needed
hOldPal = ::SelectPalette(hDC hPa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 66614 2009-12-31 00:35 VC++源程序——实现6种灰度图像边缘检测算子\实验原始图片和检测结果图片\Robert.bmp
文件 66614 2009-12-31 00:35 VC++源程序——实现6种灰度图像边缘检测算子\实验原始图片和检测结果图片\Sobel.bmp
文件 66614 2004-06-29 22:59 VC++源程序——实现6种灰度图像边缘检测算子\实验原始图片和检测结果图片\原始图像.bmp
文件 66614 2009-12-31 00:36 VC++源程序——实现6种灰度图像边缘检测算子\实验原始图片和检测结果图片\Prewitt.bmp
文件 66614 2009-12-31 01:56 VC++源程序——实现6种灰度图像边缘检测算子\实验原始图片和检测结果图片\Laplacian.bmp
文件 66614 2009-12-31 00:38 VC++源程序——实现6种灰度图像边缘检测算子\实验原始图片和检测结果图片\Kirsch.bmp
文件 66614 2009-12-31 00:38 VC++源程序——实现6种灰度图像边缘检测算子\实验原始图片和检测结果图片\LOG.bmp
文件 15045 2007-11-28 01:19 VC++源程序——实现6种灰度图像边缘检测算子\diblook\dibapi.cpp
文件 1663 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\dibapi.h
文件 4958 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\dibdoc.cpp
文件 1464 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\dibdoc.h
文件 4163 2009-12-31 20:34 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.clw
文件 4013 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.cpp
文件 537 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.dsw
文件 1150 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.h
文件 6191 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.mak
文件 91136 2009-12-31 20:47 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.ncb
文件 789 2009-12-31 20:08 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.plg
文件 9333 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.rcm
文件 3355 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\mainfrm.cpp
文件 1178 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\mainfrm.h
文件 627 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\makefile
文件 5838 2007-09-22 17:15 VC++源程序——实现6种灰度图像边缘检测算子\diblook\myfile.cpp
文件 628 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\stdafx.cpp
文件 685 2001-08-29 08:00 VC++源程序——实现6种灰度图像边缘检测算子\diblook\stdafx.h
文件 952 2009-12-31 00:24 VC++源程序——实现6种灰度图像边缘检测算子\diblook\resource.h
文件 45008 2009-12-31 00:24 VC++源程序——实现6种灰度图像边缘检测算子\diblook\DibLook.aps
文件 10912 2009-12-31 00:24 VC++源程序——实现6种灰度图像边缘检测算子\diblook\DibLook.rc
文件 1747 2009-12-31 01:14 VC++源程序——实现6种灰度图像边缘检测算子\diblook\dibview.h
文件 4915 2009-12-31 01:59 VC++源程序——实现6种灰度图像边缘检测算子\diblook\diblook.dsp
............此处省略32个文件信息
- 上一篇:PageRank/C++
- 下一篇:dlib_18.18
相关资源
- VC++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- VC++MFC小游戏实例教程(实例)+MFC类库
- 用C语言进行数字图像处理
- VC++实现CMD命令执行与获得返回信息
- VC++基于OpenGL模拟的一个3维空间模型
- 基于VC++的SolidWorks二次开发SolidWorks
- 派克变换VC++源码(附文档)
- VC++ 串口
- VC++ 大富翁4_大富翁游戏源码
- VC++ 摄像头视频采集与回放源程序
- 转 VC++ 实现电子邮件(Email)发送
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- VC++ 服务程序编写及安装与卸载
- VC++6.0番茄西红柿VAXvirsual assist X完美破
- 基于改进的fcm算法的图像分割vc++
- VC++6.0 绿色版,免安装,非常好用。
- Microsoft Visual C++ 2005 Redistributable Pack
- VC++MFC课程设计的学生成绩管理系统
- 大智慧365DLL插件设计
- VC++6.0汉化包
- Visual+C++数字图像处理-谢凤英-源代码
- VC++完整商业界面源码(再上传)
- VC++编程技术600个大型项目源码.rar
- VC++实现RSA加密算法
- VC++ 中国象棋经典游戏源代码
- 郁金香VC++游戏辅助视频教程
- C语言进阶源码---基于graphics实现图书
- 摄影测量相对定向VC++程序
- VC++数字图像处理典型算法及实现
评论
共有 条评论