问题描述
你好,
我正在编写一个简单的图像处理程序.我在灰度图像中选择一个区域,并生成像素值的直方图.要求之一是用户应该能够选择图像中感兴趣的多边形区域.也就是说,用户在图像上单击了多次,并且每次在图像上出现一个锚点,并通过一条线连接到先前的锚点.用户可以单击多次,直到绘制任意形状并关闭多边形为止.
创建多边形后,用户应该能够修改每个锚点.例如,这类似于MS Power Point中的折线工具.
完成用户操作后,我就有了代码来仅对多边形区域内的像素进行分析和报告.
这是一个标准的Windows应用程序.
我对如何从头开始创建这样的东西有一个想法.但是我想知道是否有人知道已经存在的解决方案.似乎在Google等上找不到任何内容.
预先感谢您的支持.
Dmitry
Hello,
I am writing a simple image processing program. I select a region in an grey scale image and produce a histogram of pixel values. One of the requirements is that the user should be able to select polygon regions of interest in the image. That is, the user clicks multiple times on the image, and each time, an anchor appears on the image that connects with a line to the previous anchor. The user can click multiple times until he draws any arbitrary shape and closes the polygon.
After creating the polygon, the user should be able to modify each anchor. This would be similar to a the poly-line tools in MS Power Point, for example.
When the user is done, I have code to analyze and report on just the pixels inside the polygon region.
This is a standard Windows Application.
I have an idea about how to create such a thing from scratch. But I was wondering if anyone knew of a solution that already exists. Can''t seem to find anything on google, etc.
Thank you in advance for your support.
Dmitry
推荐答案
这篇关于使用锚点在图像中选择感兴趣的多边形区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!