Welcome![Sign In][Sign Up]
Location:
Search - GDI G

Search list

[Graph Recognize车牌识别

Description:


需要注意的地方:

使用VC++6.0做开发工具, 采用简单的SDI框架结构 ,一次处理一幅位图(有兴趣的可以作成MDI)

1)位图信息的数据是从左下往右下为一行,一行一行往上排的。

2)每行像素应该是4的倍数,不足的地方用空点补齐,读的时候注意跳过冗余点。

3)主要数据都存在Doc里面,BMP的主要数据存在一个由ImgData指向的BYTE型的内存空间(根据位图的大小,动态分配的)。

4)数据读进来以后,注意向内存中贴图,以保证刷新的效率。

5)程序执行流程

应用程序生成--》打开--》CDipView的OnFileOpen 函数--》

调用CDipDoc的FileOpen 函数--》并使用myDoc->UpdateAllViews(NULL); 刷新

自动调用CDipView的OnPaint函数--》调用CDipView的OnDraw函数----一个像素点一个像素点的画

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

比较重要的地方

读BMP文件,只能打开256色   (可以是灰度)

显示和内存贴图技术

关于调色板: 调色板实际上是一个数组,4个BYTE 分别是 B,G,R,和 Reserved
每一个像素点都有一个相应的数组。


关于VC和windows 的绘图机制:
使用GDI(图形设备接口)对象,通常使用CDC 类,CPaintDC也一样(device-context)设备上下文

windows下的MFC编程机制,消息驱动,事件等待!

全局的app(应用程序对象)

注意 手工分配内存的清除 和CDC对象的删除 以释放系统的GDI资源
每一个new操作符都要对应一个delete

虽然已经弄出来了,还是希望大家好好读读源程序。

你们以后的工作:

在菜单中添加菜单项,通过ClassWizzard 生成消息响应函数(当然也可手动添加),
所有的操作应当是对 BYTE* ImgData;进行的。
在完成相应的功能后 将 isnewfile 和 isnewiamge 置为真 ,并使用myDoc->UpdateAllViews(NULL); 刷新

当然,可以更加有个性化一点,有能力的同学可以自己完成。
随着课程的进行,菜单功能逐渐丰富,最后完成基本的数字图像处理的功能,而不必最后一下完成一个大的作业。

 

 


Platform: | Size: 295054 | Author: tata80808 | Hits:

[Game EngineVB_GDI_简化

Description: 这是一个基于VB6+GDI的游戏图像引擎,使用VC+VB混合开发-This is a GDI+ based on VB6 image of the game engine, the use of VC+ VB Development
Platform: | Size: 73728 | Author: boywhp | Hits:

[GDI-BitmapClock

Description: 一个vc程序 用gdi和定时器在用户区内做了一个漂亮的小钟-A vc program gdi and timers used in the user area to do a pretty small bell
Platform: | Size: 227328 | Author: 且听风吟 | Hits:

[GDI-BitmapGDI+_VC6

Description: GDI+使用说明,VC6.0版本的源码。可以编译直接使用-GDI+ Use, VC6.0 version of the source. Can be directly used to compile
Platform: | Size: 63488 | Author: 阿辉 | Hits:

[GDI-Bitmaplineditor_src

Description: 使用GDI+方式绘制直线,该示例程序中可以通过用鼠标任意拖拽该直线的两个端点。-Use GDI+ Way drawing a straight line, the sample program can use the mouse to drag any of the two endpoints of the straight line.
Platform: | Size: 62464 | Author: noryfly | Hits:

[GDI-BitmapGDI

Description: 这是VC中GDI和绘图函数的一个简单的使用示例 运行程序后点击1234这四个按钮 可分别看到绘图函数、画笔、画刷以及字体的使用示例-This is the VC in the GDI and mapping functions using a simple example of running the program after 1234 in these four button clicks can see the graphics function, brushes, painting brushes and fonts to use examples
Platform: | Size: 3509248 | Author: DM | Hits:

[Special EffectsImgView

Description: 利用GDI提供的IPicture打开jpg数据流,本代码为Com编程
Platform: | Size: 201728 | Author: 王群 | Hits:

[GUI DevelopGDI+Function(VB)

Description: GDI+函数原型-GDI+ Function prototype
Platform: | Size: 12288 | Author: 随风の追梦 | Hits:

[Windows DevelopGDI

Description: G D I绘图,用visual c++6.0开发的windows G D I图像编程-GDI graphics, using visual c 6.0 development windows GDI Graphics Programming
Platform: | Size: 95232 | Author: juege | Hits:

[Windows DevelopSonicUI_src

Description: 一个开源的基于GDI的GUI引擎,实现了不少界面特效,值得关注-An open source of the GUI-based GDI engine, to achieve a lot of interface effects is a cause of concern
Platform: | Size: 641024 | Author: 风云 | Hits:

[Embeded Linuxgdidemo

Description: minigui的GDI例子应用,用minigui实现画点画线功能!-minigui the GDI example applications, with minigui realize stipple line features!
Platform: | Size: 113664 | Author: 易剑 | Hits:

[GDI-BitmapWindows_GDI

Description: 图形设备接口(GDI,Graphics Device Interface)的主要目标之一是支持在输出设备(如视频显示器、打印机和绘图仪)上的与设备无关的图形。 GDI通过将应用程序与不同输出设备特性相隔离,使Windows应用程序能够毫无问题地在Windows支持的任何图形输出设备上运行。-Graphics Device Interface [GDI, Graphics Device Interface] one of the main objectives are to support the output device [such as video monitors, printers and plotter] on the device-independent graphics. GDI by applications with different output device characteristics of isolation, so that Windows applications can without any problem in the Windows support any graphics output devices.
Platform: | Size: 561152 | Author: 陈小敏 | Hits:

[GDI-BitmapGdiplusNeedsLib

Description: VC6.0使用GDI+功能所需要的库,包括头文件,lib文件以及gdiplus.d-VC6.0 using GDI+ functions required by the Treasury, including the header files, lib files, as well as gdiplus.dll
Platform: | Size: 848896 | Author: carekee | Hits:

[Delphi VCLDelphi_GDI_Form

Description: Delphi使用GDI+制作任意图片形状窗口代码-construct-form-with-delphi-and-GDI+
Platform: | Size: 491520 | Author: nsang | Hits:

[Windows Developvc_gdi

Description: vc不规则(动画)界面,利用gdi+动态加载png格式文件-vc irregular (animation) interface, use gdi+ dynamic loading png format
Platform: | Size: 409600 | Author: sten | Hits:

[GDI-BitmapGDI_plus

Description: VC GDI 编程,美化程序界面、开发GDI程序!-VC GDI programming
Platform: | Size: 6072320 | Author: follow | Hits:

[GDI-BitmapVC_GDI

Description: VC++环境下的GDI编程,作者在GDI上有着很深的造诣。 整个程序对于想学习GDI编程的人有很大的帮助和启发。-VC++ environment GDI programming, the authors have a deep GDI attainments. Want to learn the entire process for GDI programming has a lot of help and inspiration.
Platform: | Size: 4721664 | Author: genius | Hits:

[Embeded-SCM DevelopGDI

Description: VC版的GDI的程序设计,包含的内容相当广泛-VC version of the GDI programming, a wide range of content
Platform: | Size: 5428224 | Author: yurui | Hits:

[Graph programTurnThePageDemo

Description: 图形GDI处理 翻 页效果 -图形GDI处理 翻页效果图形GDI处理 翻页效果
Platform: | Size: 141312 | Author: 张留 | Hits:

[GDI-BitmapGDI Bitmap C++ Code

Description: #include <Windows.h> #include <gdiplus.h> using namespace Gdiplus; // Forward declarations LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Initialize GDI+ GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); // Create the window WNDCLASSEX wcex = { 0 }; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = WndProc; wcex.hInstance = hInstance; wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wcex.lpszClassName = L"MyWindowClass"; RegisterClassEx(&wcex); HWND hWnd = CreateWindow(L"MyWindowClass", L"My Window", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); // Run the message loop MSG msg = { 0 }; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } // Shutdown GDI+ GdiplusShutdown(gdiplusToken); return (int)msg.wParam; } LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hWnd, &ps); // Create a Bitmap object and draw a line on it Bitmap bmp(100, 100); Graphics g(&bmp); Pen pen(Color(255, 0, 0, 0)); // Red pen g.DrawLine(&pen, 0, 0, 99, 99); // Draw the bitmap on the window Graphics graphics(hdc); graphics.DrawImage(&bmp, 0, 0); EndPaint(h
Platform: | Size: 402171 | Author: khaledmagd73@gmail.com | Hits:
« 12 »

CodeBus www.codebus.net