91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 36.46MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-29
  • 語言: C/C++
  • 標簽: 圖像處理??

資源簡介

圖像處理課設,包括灰度閾值變換、灰度的窗口變換、灰度拉伸、圖像的直方圖均衡化、濾鏡、圖像的膨脹,腐蝕,開啟,閉合,求內邊界,求外邊界等操作

資源截圖

代碼片段和文件信息

//?MyDib.cpp:?implementation?of?the?CDib?class.
//
//////////////////////////////////////////////////////////////////////

#include?“stdafx.h“
#include?“Dib.h“

#include?

#ifdef?_DEBUG
#undef?THIS_FILE
static?char?THIS_FILE[]=__FILE__;
#define?new?DEBUG_NEW
#endif

/*
?*?Dib文件頭標志(字符串“BM“)
?*/
#define?DIB_MARKER???((WORD)?(‘M‘?<//////////////////////////////////////////////////////////////////////
//?Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDib::CDib()
{
InitMembers();
}

CDib::~CDib()
{
ClearMemory();
}

/*************************************************************************
?*?函數名稱:DrawDib()
?*?參數說明:
?*???HDC?hDC,輸出設備DC
?*???LPRECT?lpDCRect,繪制矩形區域
?*???HGLOBAL?hDIB?,DIB對象的句柄
?*???LPRECT?lpDIBRect?,DIB的輸出區域
?*???CPalette*?pPal,調色板的指針
?*?函數類型:BOOL
?*?函數功能:該函數主要用來繪制DIB對象???
?************************************************************************/

BOOL?CDib::DrawDib(HDC?????hDC
LPRECT??lpDCRect
HGLOBAL????hDIB
LPRECT??lpDIBRect
CPalette*?pPal)
{
BOOL?????bSuccess=FALSE;??????//?重畫成功標志
HPALETTE?hOldPal=NULL;????????//?以前的調色板
if?(hDIB?==?NULL)//?判斷是否是有效的DIB對象
{
return?FALSE;//?不是,則返回
}
lpdib??=?(LPSTR)?::GlobalLock((HGLOBAL)?hDIB);//?鎖定DIB
lpDIBBits?=?GetBits(lpdib);//?找到DIB圖象像素起始位置
if?(pPal?!=?NULL)//?獲取DIB調色板,并選取到設備環境中它
{
HPALETTE?hPal?=?(HPALETTE)?pPal->m_hobject;
hOldPal?=?::SelectPalette(hDC?hPal?TRUE);
}
::SetStretchBltMode(hDC?COLORONCOLOR);//?設置顯示模式
bSuccess?=?::StretchDIBits(hDC //?設備環境句柄
???lpDCRect->left?????????????????//目標X坐標
???lpDCRect->top??????????????????//?目標Y坐標
???GetRectWidth(lpDCRect)????????????//?目標寬度
???GetRectHeight(lpDCRect)???????????//?目標高度
???lpDIBRect->left????????????????//?源X坐標
???lpDIBRect->top?????????????????//?源Y坐標
???GetRectWidth(lpDIBRect)???????????//?源寬度
???GetRectHeight(lpDIBRect)??????????//?源高度
???lpDIBBits??????????????????????//?指向dib像素的指針
???(LPBITMAPINFO)lpdib?????????//?指向位圖信息結構的指針
???DIB_RGB_COLORS?????????????????//?使用的顏色數目
???SRCCOPY);???????????????????????//?光柵操作類型
::GlobalUnlock(hDIB); //?解除鎖定
if?(hOldPal?!=?NULL)//?恢復系統調色板
{
::SelectPalette(hDC?hOldPal?TRUE);
}
return?bSuccess;
}

/*************************************************************************
?*?函數名稱:ConstructPalette(HGLOBAL?hDIB?CPalette*?pPal)
?*?函數參數:
?*???HGLOBAL?hDIB,DIB對象的句柄
?*???CPalette*?pPal,調色板的指針
?*?函數類型:BOOL
?*?函數說明:該函數按照DIB創建一個邏輯調色板??
?************************************************************************/

BOOL?CDib::ConstructPalette(HGLOBAL?hDIB?CPalette*?pPal)
{

HANDLE?hLogPal;//?邏輯調色板的句柄
int?iLoop;//?循環變量
BOOL?bSuccess?=?FALSE;//?創建結果
if?(hDIB?==?NULL)//判斷是否是有效的DIB對象
{
return?FALSE;//?返回FALSE
}
lpdib?=?(LPSTR)?::GlobalLock((HGLOBAL)?hDIB);//?鎖定DI

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????308736??2017-09-15?23:26??imgtest\Debug\imgtest.exe

?????文件????2170620??2017-09-15?23:26??imgtest\Debug\imgtest.ilk

?????文件????5827584??2017-09-15?23:26??imgtest\Debug\imgtest.pdb

?????文件?????780831??2009-07-14?13:32??imgtest\imgtest\1.bmp

?????文件??????????1??2009-08-31?02:32??imgtest\imgtest\ClassDiagram1.cd

?????文件???????4378??2017-05-02?16:22??imgtest\imgtest\Debug\cl.command.1.tlog

?????文件??????61886??2017-05-02?16:22??imgtest\imgtest\Debug\CL.read.1.tlog

?????文件???????2410??2017-05-02?16:22??imgtest\imgtest\Debug\CL.write.1.tlog

?????文件??????29202??2017-05-02?16:22??imgtest\imgtest\Debug\Dib.obj

?????文件??????25343??2017-09-15?23:26??imgtest\imgtest\Debug\DlgDisp.obj

?????文件??????40434??2017-09-15?23:26??imgtest\imgtest\Debug\DlgInverse_V.obj

?????文件??????32676??2017-09-15?23:26??imgtest\imgtest\Debug\DlgInvert.obj

?????文件??????39348??2017-09-15?23:26??imgtest\imgtest\Debug\DlgLchan.obj

?????文件??????25219??2017-09-15?23:26??imgtest\imgtest\Debug\DlgLight.obj

?????文件??????38887??2017-09-15?23:26??imgtest\imgtest\Debug\DlgLinvert.obj

?????文件??????24818??2017-09-15?23:26??imgtest\imgtest\Debug\DlgMedian.obj

?????文件??????38764??2017-09-15?23:26??imgtest\imgtest\Debug\DlgVchan.obj

?????文件??????25506??2017-09-15?23:26??imgtest\imgtest\Debug\DSelfCtr.obj

?????文件??????????2??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.exe.embed.manifest

?????文件?????????68??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.exe.embed.manifest.res

?????文件????????640??2017-09-15?23:26??imgtest\imgtest\Debug\imgtest.exe.intermediate.manifest

?????文件?????????75??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.lastbuildstate

?????文件???????2959??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.log

?????文件??????57179??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.obj

?????文件???33685504??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.pch

?????文件??????85012??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.res

?????文件??????????0??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.unsuccessfulbuild

?????文件????????713??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.vcxprojResolveAssemblyReference.cache

?????文件??????????0??2017-05-02?16:22??imgtest\imgtest\Debug\imgtest.write.1.tlog

?????文件??????68531??2017-05-02?16:22??imgtest\imgtest\Debug\imgtestDoc.obj

............此處省略272個文件信息

評論

共有 條評論