EmguCV3.0几个控件的使用
值方图(Histogram)是一种统计图数据,在影像处理中最常被用来统计一张图像或是感兴趣(ROI)区域的色彩分布,在这边本人使用的EmguCV 2.4.0版的内建值方图工具只有被包含在WinForm应用程序中至于要如何在WPF绘制值方图,那就要花比较多的步骤了,我们得自己画,这部分后续文章会在介绍


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Emgu.CV;
using Emgu.CV.Structure;
using Emgu.CV.UI; namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} /*
* 第一对
* HistogramBox The control that is used to display histogram(需要事先设计位置)
* HistogramViewer A view for histogram(弹出新窗口,不需要事先设计)
* 第二对
* ImageBox An image box is a user control that is similar to picture box, but display Emgu CV IImage and provides enhenced functionalities.
* ImageViewer The Image viewer that display IImage
* 第三对
* MatrixBox A control that is used to visualize a matrix(用户控件)
* MatrixViewer A MatrixViewer that is used to visualize a matrix(弹出窗口)
*
* 第四个
* Operation An operation contains the MethodInfo and the methods parameters. It provides a way to invoke a specific method with the specific parameters.
* PanAndZoomPictureBox A picture box with pan and zoom functionality (可以事先图像的缩放)
*/
private void Form1_Load(object sender, EventArgs e)
{
Image<Bgr, byte> img = new Image<Bgr, byte>(@"C:\a2.jpg"); //Emgu.CV.UI.ImageBox 需要在窗口中设计
this.imageBox1.Image = img;
this.matrixBox1.Matrix = img;
this.panAndZoomPictureBox1.Image = Image.FromFile(@"C:\a1.jpg"); //The Imageviewer 直接弹出新的窗口
Image<Bgr, byte> loadImg = new Image<Bgr, byte>(@"C:\a1.jpg");
ImageViewer viewer = new ImageViewer(loadImg, "Loaded Image");
viewer.Show(this); //1.使用HistogramViewer不需要事先拉到设计窗口中,他是弹出窗口,你只需要直接使用便可以
HistogramViewer.Show(loadImg[], ); //image[0] 显示Blue,bin = 32
HistogramViewer.Show(loadImg, ); //显示所有信道 //2.使用HistogramBox,需要事先拉窗口中设定在窗口画面
this.histogramBox1.GenerateHistograms(loadImg, );
this.histogramBox1.Refresh(); //如果不刷新,图像显示一部分,没有自动缩放的功能
//this.histogramBox1.Show(); //如果不是刷新图像,有没有都可以
}
}
}
EmguCV3.0几个控件的使用的更多相关文章
- 与众不同 windows phone (34) - 8.0 新的控件: LongListSelector
[源码下载] 与众不同 windows phone (34) - 8.0 新的控件: LongListSelector 作者:webabcd 介绍与众不同 windows phone 8.0 之 新的 ...
- UiAutomator2.0 - 获取同行控件
目录 问题:UI测试时,在同一个界面出现相同的属性的控件(如图),对于这种控件的获取很是无奈.如果直接通过控件id去查找的话总是会返回界面该类型的第一个控件. 解决: 1.UiObject2 中已经给 ...
- VB6.0中WinSock控件属性和方法详解
原文链接:http://liweibird.blog.51cto.com/631764/653134 WinSock控件能够通过UDP协议(用户数据报协议)或TCP协议(数据传输协议)连接到远程的机器 ...
- CefSharp.v49.0.1浏览器控件完全WPF版,实现禁止弹出新窗口,在同一窗口打开链接,并且支持带type="POST" target="_blank"的链接
需求场景:在查询页面,填写查询条件,查询条件包括上传的图片,根据图片的特征查询,这就需要在提交的时候,使用POST提交,因为GET提交无法提交图片数据,提交查询条件之后,在新的窗口展示查询结果.(当然 ...
- Vue.2.0.5-表单控件绑定
基础用法 你可以用 v-model 指令在表单控件元素上创建双向数据绑定.它会根据控件类型自动选取正确的方法来更新元素.尽管有些神奇,但 v-model 本质上不过是语法糖,它负责监听用户的输入事件以 ...
- andorid 控件 Bootstrap3.0风格的控件 精美UI控件库
Bootstrap是Twitter推出的一个开源的用于前端开发的工具包.它由Twitter的设计师Mark Otto和Jacob Thornton合作开发,是一个CSS/HTML框架.Bootstra ...
- 解决Win7下VC6.0插入ActiveX控件对话框为空的问题
在Win7环境下,编写MFC应用程序,Project菜单下Add To Project子菜单中的 Components and Controls…选项,在弹出的对话框中Gallery文件为空,也就无法 ...
- FineUI(专业版)v3.2.0 发布(ASP.NET UI控件库)!
+2016-08-20 v3.2.0 +表格增强. +表格列RenderField增加属性ClientHtmlEncode,用于在客户端进行HTML编码. -增加示例:单元格编辑->杂项-> ...
- Android5.0新控件CardView的介绍和使用
CardView也是5.0的新控件,这控件其实就是一个卡片啦,当然我们自己也完全可以定义这样一个卡片,从现在的微博等社App中可以看到各式各样的自定义卡片,所以这个控件意义不是很大.suppor ...
随机推荐
- openstack havana块存储Cinder磁盘加密方法研究
http://blog.csdn.net/cloudresearch/article/details/19092219 在openstack havana的release note中有如下介绍“Att ...
- 英语发音规则---U字母-[复习中]
英语发音规则---U字母 一.总结 一句话总结:(注:本文所有//的音标为英音音标,[]的音标为美音音标) 1.U在开音节中发[ju ]/ ju: /? duty /'djuːtɪ/ ['dʊti] ...
- 如何做好App的测试工作
记得刚开始接触app测试时,可谓是一脸懵状,拿到一个功能不知道该测些什么,会因为测试范围确认不足.测试点考虑不全等导致线上问题,吃一堑才会长一智,栽过几次坑后就学会了如何避免.现总结App测试点如下, ...
- 51nod 1105 二分好题
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1105 1105 第K大的数 基准时间限制:1 秒 空间限制:131072 ...
- hdoj-3791-二叉搜索树(二叉搜索树模板题)
#include <cstring> #include <cstdio> #include <iostream> using namespace std; type ...
- Project://STARK
数据添加&编辑 删除&分页 搜索框功能 action批量操作 filter多条件过滤 pop_up弹窗
- wordpress 自定义删除后台管理菜单
<?php /* //wordpress共有5种角色:administrator(管理员) editor(编辑) author(作者) contributor(投稿者) subscriber(订 ...
- pdp 的连接方法
<?php $dsn = "mysql:host=127.0.0.1;dbname=blog_edu"; try{ $pdo = new PDO($dsn,'root','' ...
- SQL夯实基础(五):索引的数据结构
数据量达到十万级别以上的时候,索引的设置就显得异常重要,而如何才能更好的建立索引,需要了解索引的结构等基础知识.本文我们就来讨论索引的结构. 二叉搜索树:binary search tree 1.所有 ...
- 团队队列(列和map结合的经典运用)
Queues and Priority Queues are data structures which are known to most computer scientists. The Team ...