图像中的预定义区域 [英] Pre Defined Areas in an Image

查看:86
本文介绍了图像中的预定义区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的想法很简单,我有一张照片可以说是一张汽车人物图片,我想预先定义一些区域,例如左门和右门以及前门并且在'后部'。



当用户鼠标位于预定义区域时,工具提示或标签将显示该区域的描述,如果用户点击该区域将向用户显示一些参数,之后该区域将标有颜色边框。



我不知道该怎么做,以及如何开始我正在寻找白皮书好几天:)



一个想法是在图片框上为我想要标记的每个区域绘制一些矩形(如何在自由形状中绘制矩形?按代码)

如何管理调整大小图片框并安排预先定义的区域进行校正?还有很多问题



有没有人知道从哪里开始?

任何想法都会非常有用...



非常感谢...

Ok the idea is simple , I have a picture lets say a 'car figure' picture i want to pre define some areas for example on the 'Left Door' and on the 'right door' and on the 'front part' and on 'the rear part' .

When the users mouse is on an predifined area a tooltip or a label have a description of the area will be shown and if the user click on that area some parameters will be shown to the user and after that the area will be marked with a color border.

I have no idea how to do that , and how to begin i am looking to a white paper for days :)

A thought is to draw some rectangles on the picture box for each area i want to mark (how to draw rectangles in free shapes ? by code)
How to mange the resize of the picture box and arrange the pre defined areas to be corret ? and a lot of more questions

Does anyone have a clue where to start ??
Any ideas will be very usefull ...

Thank you very much ...

推荐答案

为什么不开始研究这个CodeProject这篇文章向您展示如何为WinForms构建一个'imagemap'控件:[ ^ ]



您也可以从这篇关于ImageMap for ASP.NET的CP文章中获得一些想法:[ ^ ]。



您必须做出的一些重要选择是:



1.您打算创建两个应用程序:一个用于定义叠加区域及其相关数据(鼠标悬停数据,点击数据)以及它们与图像的关系它们将出现在N;另一个应用程序是一种使用创建者应用程序的预定义结果的回放工具。



2.或者,你想要吗?创建一个应用程序,允许您导入图像,创建叠加层,添加相关数据,然后在运行时以某种模式使用它们。



3.您将不得不考虑绘图的成本(使用Paint事件)与使用某种浮动对象的成本之间的关系:如果您必须处理调整大小对于源图像,那么绘画代码的复杂性会大大增加。



听起来像是一个很大的挑战,我相信你会学到很多东西on :))
Why don't you get started by studying this CodeProject article which shows you how to build an 'imagemap' control for WinForms: [^]

You may also get some ideas from this CP article on an ImageMap for ASP.NET: [^].

Some important choices you'll have to make are:

1. are you going to create two applications: one for defining the "overlay regions" and their associated data (mouseover data, click data) and their relation to the Image they will appear on; and, the other application being a kind of "playback" facility that uses the pre-defined results of the "creator" application.

2. or, do you want to create one application that allows you import an Image, create your overlays, add their associated data, and then "use" them in some mode at run-time.

3. your going to have to consider the relationship of the "cost" of drawing (using the Paint Event) compared to the cost of using some kind of "floating objects": if you have to handle resize of the source Image, then the complexity of the code for painting increases greatly.

Sounds like a great challenge, and I'm sure you will learn a lot taking it on :)


这篇关于图像中的预定义区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆