图像上的C#多点选择 [英] c# multi - point selection on an image

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

问题描述

我正在为我的图像处理项目设计带有Visual C#的界面.我需要在图像上选择点并将这些点分类,以便在vhdl的图像处理代码中使用.

原始图像将保留在一个图片框中,而我将在另一个图片框中使用所选的图像.

我如何选择图像上的点?

I''m designing interface with visual c# for my image processing project. I need point selection on an image and classification these points for using in my image processing code at vhdl.

Original image will stay at a picturebox and I will use selected image in another picturebox.

How I can select points on an image?

推荐答案

我假设您要从图片框中选择UI中的点.在这种情况下,您可以使用MouseDown事件,检查e.Buttons == MouseButtons.Left,并为图像X/Y使用e.Location(或e.Position,无法记住属性名称)来确定图像的X/Y位置.用户点击,您可以将其添加到数组/列表中.

您还可以使用picturebox的Paint事件从阵列/列表中重新绘制先前单击的点,以向用户显示一些视觉反馈.
I''m assuming you want to select points in the UI from the picturebox. In which case, you can use the MouseDown event, check e.Buttons == MouseButtons.Left, and use e.Location (or e.Position, can''t remember the property name) for your images X/Y for where the user clicks, and you can add this to an array/list.

You can also use the picturebox Paint event to redraw previously clicked points from your array/list to show the user some visual feedback.


这篇关于图像上的C#多点选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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