【问题标题】:zoom/pan in Imagebox of EmguCV在 EmguCV 的 Imagebox 中缩放/平移
【发布时间】:2017-03-11 00:13:09
【问题描述】:

有谁知道如何使用 C# 代码在 EmguCV 的图像框上缩放/平移(滚动)?使用鼠标滚动效果很好,但我想使用代码来完成。

我试过这个,但没有运气!

ImageBox1.SetZoomScale(1, new Point(400, 400));

【问题讨论】:

    标签: image scroll emgucv


    【解决方案1】:

    使用 SetZoomScale,您就走在了正确的道路上。 设置大于 1 的缩放比例放大,小于 1 的缩放比例缩小。 1 表示无缩放。 第二个参数是缩放区域相对于图像控件的中心。 因此,如果您从 ZoomScale = 1 开始,请执行以下操作:

    用固定点 (400,00) 放大

    ImageBox1.SetZoomScale(2, new Point(400, 400));
    

    重置原始缩放

    ImageBox1.SetZoomScale(1, new Point(400, 400));
    

    以固定点 (400,00) 缩小

    ImageBox1.SetZoomScale(0.5, new Point(400, 400));
    

    【讨论】:

      猜你喜欢
      • 2021-03-08
      • 2012-04-13
      • 2016-07-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-19
      • 2012-03-19
      • 2020-04-05
      相关资源
      最近更新 更多