翻译:A Picturebox Control to Display Both Remote Sensing and Regular Digital Images
2012-05-31 15:39
507 查看
一个可以显示普通图片和遥感影像的PictureBox
原文:http://www.codeproject.com/Articles/162595/A-Picturebox-Control-to-Display-Both-Remote-Sensin引言
数字图像分析领域长期以来关注从遥感影像中提取有用的土地利用要素,比如建筑物、道路甚至设施,现在许多软件和Web Service(例如Google earth ,Google Map,ArcMap和Bing Maps)成功的应用遥感影像中的信息帮助解决一系列的公众问题比如navigation,城市规划和环境工程。然而,和一般的数字图像相比,遥感数据通常是多波段的而且数据类型多样(有Byte,integer,float和Double)。由于遥感影像的特殊性,普通的图像浏览器不能很好的支持影像显示。例如,VS中的PictureBOX不支持遥感影像的显示。
本程序创建了一个PictureBox控件可以显示普通图像和遥感影像。与一些开源项目相比,比如MapWinGIS和SharpMap,遥感PictureBox控件是轻量级的,只包含一些简单的功能。但是,该工程为使用遥感影像的应用程序提供了影像显示控件,并且可能对使用GDAL感兴趣的初学者是有帮助的。控件使用了GDAL1.5和GDI+。GDAL是强大并且设计良好的开源资源库,可以听歌多种地理空间栅格数据的支持。GDAL的OGR库同时支持地理空间数据集vector格式,许多想Google Earth,ArcGIS,ERDAS,GRASS和IDRISI,都使用GDAL来显示和分析地理空间数据集。GDI+是一个成熟的技术,可以满足应用程序使用图形和格式化文字。被广泛应用于Windows应用程序。本工程应用GDI+来显示影像,因为他显示2D图像是有效的。
背景
应用GDI+显示遥感影像是从相应波段中读取数据创建一个BitMap对象创建Bitmap对象最直接的方法是从遥感影像数据中直接读取BitmapData对象。但是,通过导入全部遥感数据不是创建Bitmap明智的方法,因为加载遥感影像可能需要很大的内存消耗。本程序中,我使用了一个tricky(狡猾的,巧妙的)方法来显示影像,它能够显示大的影像数据。图二显示了渲染影像使用的影像金字塔,图2b描述了一种使用行和列方向多缓冲尺度渲染影像的方法。从节约内存考虑,根据内存限制和控件尺寸构建影像金字塔显示实际图层是常用的选择。但是,实际图层是在行和列方向按同样比例缩小的。真实和模糊的显示结果。此外,对于一个新手程序员,明智的调整尺度放大缩小时候的尺度是困难的。和构建影像金字塔相比,尺度影像使用不等的权重从GDAL中是可以被直接使用的。(通过Band.readraster函数)一旦空间显示的矩形确定下来,使用者可以根据控件大小导入遥感影像。为了提高数据加载速度本程序使用Unsafe代码。
![](http://pic002.cnblogs.com/images/2012/276683/2012053115365445.png)
相关文章推荐
- How to Display Image In Picturebox in VC++ from Iplimage and Mat
- How to Display Image In Picturebox in VC++ from Iplimage and Mat
- PictureEdit - How to display external images by providing links for them
- OIPF 规范翻译(DAE)-----4.1.1 Remote UI and box models (Informative)
- The servlets named [UserExit] and [com.fxh.control.UserExit] are both mapped to the url-pattern [/Us
- How to use OpenCV to capture and display images from a camera
- A Novel Approach to Data Retrieval and Instrumentation Control at Remote Field Sites using Python and Network News
- How to "enalbe mouse integration" and make screen display fully in Oracle VM VirtualBox in Ubuntu
- A solution to display Chinese(GB18030 Locale) and Japanese Fonts in Xmanager Version 2.0
- Introduction to String Searching Algorithms--Rabin-Karp and Knuth-Morris-Pratt Algorithms [翻译]
- How to set up ADB for remote machine development and local device deployment
- using web services core framework and CFNetwork to access remote soap service
- How to dd a remote disk using SSH on local machine and save to a local disk
- End-to-end LSTM-based dialog control optimized with supervised and reinforcement learning
- Animate to display a dialog message box in the right-bottom of the window screen
- Open debug mode for Tomcat and use Eclipse to remote debug the application
- 【翻译】Data Access with LINQ to SQL (1) -- New C# and VB.NET Language Features
- 20 Tips to Simplify Your Digital and Online Life
- 用序列到序列和注意模型实现的翻译:Translation with a Sequence to Sequence Network and Attention
- Adding Digital control to Dual tracking LM317 / LM337 Bench supply