• C#,深度学习OpenCV目标检测级联分类器数据集的自主制作方法与《层级分类器集成生成环境》源代码


    一、目标识别技术概述

    1、摘要

    目标检测是计算机视觉中最基本和最具挑战性的问题之一,它试图从自然图像中的大量预定义类别中定位目标实例。深度学习技术已成为直接从数据中学习特征表示的强大策略,并在通用目标检测领域取得了显著突破。鉴于这一快速发展时期,本文的目标是全面综述深度学习技术在这一领域的最新成就。这项调查包括300多项研究贡献,涵盖了通用对象检测的许多方面:检测框架、对象特征表示、对象提议生成、上下文建模、训练策略和评估指标。我们通过确定未来研究的前景来完成调查。

    2、介绍

    作为计算机视觉中的一个长期、基本和具有挑战性的问题,目标检测(如图1所示)几十年来一直是一个活跃的研究领域(Fischler和Elschlager 1973)。目标检测的目标是确定图像中是否存在来自给定类别(如人类、汽车、自行车、狗或猫)的任何对象实例,如果存在,则返回每个对象实例的空间位置和范围(例如,通过边界框Everingham等人2010;Russakovsky等人2015)。作为图像理解和计算机视觉的基石,目标检测是解决复杂或高级视觉任务的基础,例如分割、场景理解、目标跟踪、图像字幕、事件检测和活动识别。目标检测支持广泛的应用,包括机器人视觉、消费电子、安全、自动驾驶、人机交互、基于内容的图像检索、智能视频监控和增强现实。

    最近,深度学习技术(Hinton和Salakhutdinov 2006;LeCun等人,2015)已成为从数据中自动学习特征表示的强大方法。特别是,如图3所示,这些技术在对象检测方面提供了重大改进。

    如图2所示,物体检测可以分为两种类型之一(Grauman和Leibe 2011;Zhang等人,2013):特定实例的检测与广泛类别的检测。第一种类型旨在检测特定对象的实例(例如唐纳德·特朗普的脸、埃菲尔铁塔或邻居的狗),本质上是一个匹配问题。第二种类型的目标是检测某些预定义对象类别(例如人、汽车、自行车和狗)的实例(通常以前未看到)。历史上,目标检测领域的大部分工作都集中在单个类别(通常是人脸和行人)或几个特定类别的检测上。相比之下,在过去几年中,研究界已开始朝着更具挑战性的目标迈进,即建立通用目标检测系统,在该系统中,目标检测能力的广度与人类相当。

    Krizhevsky等人(2012a)提出了一种称为AlexNet的深度卷积神经网络(DCNN),该网络在大规模视觉识别挑战(ILSVRC)中实现了破纪录的图像分类精度(Russakovsky等人,2015)。自那时以来,计算机视觉的大多数方面的研究重点都是深度学习方法,实际上包括通用对象检测领域(Girshick等人2014;He等人2014;Girshick 2015;Sermanet al.2014;Ren等人2017)。虽然已经取得了巨大的进步,如图3所示,但我们不知道在过去5年中对这一主题进行了全面的调查。鉴于进展速度异常迅速,本文试图跟踪最新进展并总结其成果,以便更清楚地了解通用目标检测中的当前全景。

    3、与之前算法的比较

    如表1所示,已经发布了许多著名的物体检测调查。其中包括许多关于特定物体检测问题的优秀调查,例如行人检测(Enzweiler和Gavrila 2009;Geronimo等人2010;Dollar等人2012)、人脸检测(Yang等人2002;Zafeiriou等人2015)、车辆检测(Sun等人2006)和文本检测(Ye和Doermann 2015)。除了张等人(2013)就对象类检测主题进行的调查外,最近直接关注一般对象检测问题的调查相对较少。然而,在Grauman和Leibe(2011)、Andreopoulos和Tsotsos(2013)以及Zhang等人(2013)中回顾的研究大多是在2012年之前,因此在深度学习和相关方法最近取得显著成功并占据主导地位之前。

    深度学习允许计算模型学习极其复杂、微妙和抽象的表示,推动了广泛问题的重大进展,如视觉识别、物体检测、语音识别、自然语言处理、医学图像分析、药物发现和基因组学。在不同类型的深度神经网络中,DCNN(LeCun等人,1998、2015;Krizhevsky等人,2012a)在处理图像、视频、语音和音频方面取得了突破。可以肯定的是,已经发表了许多关于深度学习的调查,包括Bengio等人(2013)、LeCun等人(2015)、Litjens等人(2017)、Gu等人(2018),以及最近在ICCV和CVPR的教程中发表的调查。

    相比之下,虽然已经提出了许多基于深度学习的目标检测方法,但我们不知道最近有任何全面的调查。全面回顾和总结现有工作对于目标检测的进一步进展至关重要,特别是对于希望进入该领域的研究人员而言。由于我们的重点是一般物体检测,因此将不考虑针对特定物体检测的DCNN的广泛工作,例如人脸检测(李等人2015a;张等人2016a;胡等人2017)、行人检测(张等人2016b;何桑等人2015)、车辆检测(周等人2016b)和交通标志检测(朱等人2016b)。

    4、范围

    基于深度学习的通用目标检测的论文数量惊人。事实上,有如此之多的内容,以至于对最新技术的任何全面综述都超出了任何合理篇幅的论文的范围。因此,有必要制定选择标准,将我们的重点限制在顶级期刊和会议论文上。由于这些局限性,我们真诚地向那些作品未包含在本文中的作者道歉。有关相关主题工作的调查,读者请参阅表1中的文章。本综述主要关注过去5年的主要进展,我们将注意力限制在静态图片上,将视频对象检测这一重要课题作为未来单独考虑的主题。

    二、OpenCV级联分类器(CascadeClassifier)生成方法

    OpenCV级联分类器数据(比如:cascade.xml)用于实现目标识别的核心数据。

    CascadeClassifier则是opencv下objdetect模块中用来做目标检测的级联分类器的一个类;简而言之是滑动窗口机制+级联分类器的方式;早期opencv版本仅支持haar特征的目标检测,分别在opencv2.2和2.4之后开始支持LBP和HOG特征的目标检测。

    使用现成的级联分类器数据局限性太多了,工业软件都是自己制作。

    1、级联分类器数据的制作流程

    2、图片准备与预处理

    (1)图片最好用现场拍摄的照片,尽量不要过多的处理,原本最好!

    (2)文件夹、文件名等,最好不要有汉字等,数字与字母最好;文件夹最好不要有空格!

    (3)本文的《层级分类器集成生成环境》可以帮助你一键生成同样大小、黑白以及按数字命名的正样本图片及负样本图片。

    3、正样本 Positive Images(Samples)

    正样本图片,是告诉程序,这些 或 接近的就是目标!

    (1)正样本 一般要求 20x20,24x24,64x64;

    (2)现在有了本文的《层级分类器集成生成环境》,你随便,正样本只要截取的是正方形(其实也不一定)的即可。

    (3)彩色?黑白?无所谓。

    (4)正样本文件 pos.txt 是为了生成 正样本矢量化数据 pos.vec 准备的;

    1. posdata/001.jpg 1 0 0 20 20
    2. posdata/002.jpg 1 0 0 20 20
    3. posdata/003.jpg 1 0 0 20 20
    4. posdata/004.jpg 1 0 0 20 20
    5. posdata/005.jpg 1 0 0 20 20
    6. posdata/006.jpg 1 0 0 20 20
    7. posdata/007.jpg 1 0 0 20 20
    8. posdata/008.jpg 1 0 0 20 20
    9. posdata/009.jpg 1 0 0 20 20
    10. posdata/010.jpg 1 0 0 20 20
    11. posdata/011.jpg 1 0 0 20 20
    12. posdata/012.jpg 1 0 0 20 20

     正样本文件 pos.txt 每行的格式是:

    文件名 样本目标数 起点x 起点 y 宽度 高度

    文件名可以用相对路径。样本数建议为1。起点建议为(0,0)。

    本文的《层级分类器集成生成环境》可以帮助你一键生成 pos.txt 文件。图片尺寸自动提取。

    4、正样本 矢量化

    正样本矢量化数据 pos.vec 是训练必须的基础数据,是归一化、标准化、矢量化的 正样本数据,可以不再使用正样本图片及其数据,因而大大提高训练效率。

    正样本矢量化数据 pos.vec 用 opencv_createsamples.exe 生成。

    Windows cmd:

    opencv_createsamples.exe -vec pos.vec -info pos.txt -num 12 -w 20 -h 20

    Windows PowerShell:

    .\opencv_createsamples.exe -vec pos.vec -info pos.txt -num 12 -w 20 -h 20

    参数简要说明:

    1. -vec pos.vec 生成的矢量文件
    2. -info pos.txt 正样本文件
    3. -num 12 正样本数量
    4. -w 20 正样本尺寸(宽)
    5. -h 20 正样本尺寸(高)

    本文的《层级分类器集成生成环境》可以帮助你一键生成 pos.vec 文件。不需要进入 cmd 或 PowerShell 去敲键盘!

    5、负样本 Negative Images(Samples)

    (1)负样本 是告诉识别程序,哪些元素是目标中没有的!

    (2)负样本,大小无所谓;唯一的要求是不能含有正样本的物体;建议尺寸为 320x240 -- 640x480 ;

    (3)负样本文件 neg.txt

    1. C:/Downloads/Baidu/opencv_bin/negdata/001.jpeg
    2. C:/Downloads/Baidu/opencv_bin/negdata/002.jpeg
    3. C:/Downloads/Baidu/opencv_bin/negdata/003.jpeg
    4. C:/Downloads/Baidu/opencv_bin/negdata/004.jpeg
    5. C:/Downloads/Baidu/opencv_bin/negdata/005.jpeg
    6. C:/Downloads/Baidu/opencv_bin/negdata/006.jpeg
    7. C:/Downloads/Baidu/opencv_bin/negdata/007.jpeg
    8. C:/Downloads/Baidu/opencv_bin/negdata/008.jpeg
    9. C:/Downloads/Baidu/opencv_bin/negdata/009.jpeg
    10. C:/Downloads/Baidu/opencv_bin/negdata/010.jpeg
    11. C:/Downloads/Baidu/opencv_bin/negdata/011.jpeg
    12. C:/Downloads/Baidu/opencv_bin/negdata/012.jpeg
    13. C:/Downloads/Baidu/opencv_bin/negdata/013.jpeg
    14. C:/Downloads/Baidu/opencv_bin/negdata/014.jpeg
    15. C:/Downloads/Baidu/opencv_bin/negdata/015.jpeg
    16. C:/Downloads/Baidu/opencv_bin/negdata/016.jpeg
    17. C:/Downloads/Baidu/opencv_bin/negdata/017.jpeg
    18. C:/Downloads/Baidu/opencv_bin/negdata/018.jpeg
    19. C:/Downloads/Baidu/opencv_bin/negdata/019.jpeg
    20. C:/Downloads/Baidu/opencv_bin/negdata/020.jpeg
    21. C:/Downloads/Baidu/opencv_bin/negdata/021.jpeg
    22. C:/Downloads/Baidu/opencv_bin/negdata/022.jpeg
    23. C:/Downloads/Baidu/opencv_bin/negdata/023.jpeg
    24. C:/Downloads/Baidu/opencv_bin/negdata/024.jpeg
    25. C:/Downloads/Baidu/opencv_bin/negdata/025.jpeg
    26. C:/Downloads/Baidu/opencv_bin/negdata/026.jpeg
    27. C:/Downloads/Baidu/opencv_bin/negdata/027.jpeg
    28. C:/Downloads/Baidu/opencv_bin/negdata/028.jpeg
    29. C:/Downloads/Baidu/opencv_bin/negdata/029.jpeg
    30. C:/Downloads/Baidu/opencv_bin/negdata/030.jpeg
    31. C:/Downloads/Baidu/opencv_bin/negdata/031.jpeg
    32. C:/Downloads/Baidu/opencv_bin/negdata/032.jpeg
    33. C:/Downloads/Baidu/opencv_bin/negdata/033.jpeg
    34. C:/Downloads/Baidu/opencv_bin/negdata/034.jpeg
    35. C:/Downloads/Baidu/opencv_bin/negdata/035.jpeg
    36. C:/Downloads/Baidu/opencv_bin/negdata/036.jpeg
    37. C:/Downloads/Baidu/opencv_bin/negdata/037.jpeg

    负样本文件,只需要指定用于训练的 负样本图片即可。绝对地址!绝对地址!绝对地址!

    本文的《层级分类器集成生成环境》可以帮助你一键生成 neg.txt 文件。

    正样本数 :负样本数 至少是 1:3

    6、训练 Cascade Trainning

    有了  pos.vec 与 neg.txt 文件,就可以进行训练了。这个过程 坑 比较多。

    Windows cmd:

    opencv_traincascaded.exe -data xml -vec pos.vec -bg neg.txt -numPos 12 -numNeg 37 -numStages 20 -w 20 -h 20 -maxFalseAlarmRate 0.5 -mode ALL

    Windows PowerShell:

    .\opencv_traincascaded.exe -data xml -vec pos.vec -bg neg.txt -numPos 12 -numNeg 37 -numStages 20 -w 20 -h 20 -maxFalseAlarmRate 0.5 -mode ALL

    注意几点:

    (1)先检查  pos.vec ,neg.txt 文件是否存在?是否符合要求?

    (2)建议创建子目录 posdata 放置 正样本 图片;子目录 negdata 放置 负样本图片;

    (3)必须创建 xml 子目录;生成结果就在这个子目录下;

    (4)无需生成 neg.vec

    这个过程很吃资源,很慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢慢,要花很长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长的时间。

    敲击这些参数,很麻烦的。经过漫长的等待,最终生成 xml/cascade.xml 文件,大功告成!

    本文的《层级分类器集成生成环境》可以帮助你一键做好上述工作,自动完成训练,生成 cascade.xml 文件!!!!!

    三、《层级分类器集成生成环境》源代码

    1、老老程序员的唠叨

    自己制作 级联分类器数据 不是一件轻松、简单的事情,但没有级联分类器数据几乎无法开展后续的工作。因而不得不硬着头皮做下去。

    看到大多数朋友都喜欢进入 cmd 去 key key key,效率实在是太低了。

    我们这些从 DOS 过来的骨灰级程序员,有了 Windows 或 iOS 的 GUI ,终于摆脱了 KEY KEY KEY ,看到没有 GUI 的程序简直是受罪。关键是效率太低了。3天的活,本来1小时可以搞掂。

    很多 Short-finger Boy 热衷于敲键盘,自以为很 Cool !

    为了提高效率,很多年前就写了 《层级分类器集成生成环境》,现在按 Visual Studio 2022 做些改动与改进,放出来分享。

    永远别指望深度混淆的代码与文章、下载会收费或改作 VIP!

    因为深度混淆主要用C#编程,赚钱很容易,不求名不求利,更不在乎这点毛毛雨。

    2、准备工作

    首先需要有 openCV 训练器相关程序:

    (1)使用 openCV 开源,自己或使用别人编译好的 build ;

    (2)去 OpenCV 官网下载:

    OpenCV 官网下载https://opencv.org/releases/

    (3)(多动症儿童〄的博客_CSDN博客-百度AI,笔记领域博主)提供的下载:

    https://pan.baidu.com/s/1vCdmWnRRjRNmOCKm30602w?pwd=zur8https://pan.baidu.com/s/1vCdmWnRRjRNmOCKm30602w?pwd=zur8

    反正,你需要准备下面这些文件,并且复制到 Visual Studio 项目文件的 bin/debug/opencv_bin 目录下。

    1. opencv_annotation.exe
    2. opencv_annotationd.exe
    3. opencv_aruco341.dll
    4. opencv_aruco341d.dll
    5. opencv_bgsegm341.dll
    6. opencv_bgsegm341d.dll
    7. opencv_bioinspired341.dll
    8. opencv_bioinspired341d.dll
    9. opencv_calib3d341.dll
    10. opencv_calib3d341d.dll
    11. opencv_ccalib341.dll
    12. opencv_ccalib341d.dll
    13. opencv_core341.dll
    14. opencv_core341d.dll
    15. opencv_createsamples.exe
    16. opencv_createsamplesd.exe
    17. opencv_datasets341.dll
    18. opencv_datasets341d.dll
    19. opencv_dnn341.dll
    20. opencv_dnn341d.dll
    21. opencv_dnn_objdetect341.dll
    22. opencv_dnn_objdetect341d.dll
    23. opencv_dpm341.dll
    24. opencv_dpm341d.dll
    25. opencv_face341.dll
    26. opencv_face341d.dll
    27. opencv_features2d341.dll
    28. opencv_features2d341d.dll
    29. opencv_ffmpeg341_64.dll
    30. opencv_flann341.dll
    31. opencv_flann341d.dll
    32. opencv_fuzzy341.dll
    33. opencv_fuzzy341d.dll
    34. opencv_hfs341.dll
    35. opencv_hfs341d.dll
    36. opencv_highgui341.dll
    37. opencv_highgui341d.dll
    38. opencv_img_hash341.dll
    39. opencv_img_hash341d.dll
    40. opencv_imgcodecs341.dll
    41. opencv_imgcodecs341d.dll
    42. opencv_imgproc341.dll
    43. opencv_imgproc341d.dll
    44. opencv_interactive-calibration.exe
    45. opencv_interactive-calibrationd.exe
    46. opencv_line_descriptor341.dll
    47. opencv_line_descriptor341d.dll
    48. opencv_ml341.dll
    49. opencv_ml341d.dll
    50. opencv_objdetect341.dll
    51. opencv_objdetect341d.dll
    52. opencv_optflow341.dll
    53. opencv_optflow341d.dll
    54. opencv_phase_unwrapping341.dll
    55. opencv_phase_unwrapping341d.dll
    56. opencv_photo341.dll
    57. opencv_photo341d.dll
    58. opencv_plot341.dll
    59. opencv_plot341d.dll
    60. opencv_reg341.dll
    61. opencv_reg341d.dll
    62. opencv_rgbd341.dll
    63. opencv_rgbd341d.dll
    64. opencv_saliency341.dll
    65. opencv_saliency341d.dll
    66. opencv_shape341.dll
    67. opencv_shape341d.dll
    68. opencv_stereo341.dll
    69. opencv_stereo341d.dll
    70. opencv_stitching341.dll
    71. opencv_stitching341d.dll
    72. opencv_structured_light341.dll
    73. opencv_structured_light341d.dll
    74. opencv_superres341.dll
    75. opencv_superres341d.dll
    76. opencv_surface_matching341.dll
    77. opencv_surface_matching341d.dll
    78. opencv_text341.dll
    79. opencv_text341d.dll
    80. opencv_tracking341.dll
    81. opencv_tracking341d.dll
    82. opencv_traincascade.exe
    83. opencv_version.exe
    84. opencv_versiond.exe
    85. opencv_video341.dll
    86. opencv_video341d.dll
    87. opencv_videoio341.dll
    88. opencv_videoio341d.dll
    89. opencv_videostab341.dll
    90. opencv_videostab341d.dll
    91. opencv_visualisation.exe
    92. opencv_visualisationd.exe
    93. opencv_waldboost_detector.exe
    94. opencv_waldboost_detectord.exe
    95. opencv_xfeatures2d341.dll
    96. opencv_xfeatures2d341d.dll
    97. opencv_ximgproc341.dll
    98. opencv_ximgproc341d.dll
    99. opencv_xobjdetect341.dll
    100. opencv_xobjdetect341d.dll
    101. opencv_xphoto341.dll
    102. opencv_xphoto341d.dll

    特别注意,有些下载得到的文件 

    opencv_traincascaded.exe

    而不是:

    opencv_traincascade.exe

     请修改为:opencv_traincascade.exe

    CVTrainer项目的目录结构是:

    3、图片预处理源代码

    功能包括:批量处理;统一尺寸;统一名称;统一后缀; 

    1. #region 图片批量转换
    2. /// <summary>
    3. /// 原始文件夹
    4. /// </summary>
    5. private string FromFolder { get; set; } = "";
    6. /// <summary>
    7. /// 目标文件夹
    8. /// </summary>
    9. private string SaveFolder { get; set; } = "";
    10. /// <summary>
    11. /// 图片尺寸信息
    12. /// </summary>
    13. private int[] SaveSizes { get; set; }
    14. /// <summary>
    15. /// 数字型文件名的序列号
    16. /// </summary>
    17. private int SaveIndex { get; set; } = 1;
    18. private void tpNormalize_SizeChanged(object sender, EventArgs e)
    19. {
    20. txtFrom.Width = tpNormalize.Width - txtFrom.Left - btnFrom.Width - 60;
    21. btnFrom.Left = txtFrom.Left + txtFrom.Width + 5;
    22. btnFrom.Top = txtFrom.Top;
    23. btnFrom.Height = txtFrom.Height;
    24. }
    25. /// <summary>
    26. /// 浏览原始文件夹
    27. /// </summary>
    28. /// <param name="sender"></param>
    29. /// <param name="e"></param>
    30. private void btnFrom_Click(object sender, EventArgs e)
    31. {
    32. if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
    33. {
    34. FromFolder = folderBrowserDialog1.SelectedPath;
    35. txtFrom.Text = FromFolder;
    36. SaveSizes = ImageSizes(FromFolder);
    37. if (SaveSizes[0] != SaveSizes[1]) txtFromWidth.Text = SaveSizes[0] + "..." + SaveSizes[1];
    38. else txtFromWidth.Text = SaveSizes[0] + "";
    39. if (SaveSizes[2] != SaveSizes[3]) txtFromHeight.Text = SaveSizes[2] + "..." + SaveSizes[3];
    40. else txtFromHeight.Text = SaveSizes[2] + "";
    41. txtSaveWidth.Text = SaveSizes[0] + "";
    42. txtSaveHeight.Text = SaveSizes[2] + "";
    43. }
    44. }
    45. /// <summary>
    46. /// 浏览并指定目标文件夹
    47. /// </summary>
    48. /// <param name="sender"></param>
    49. /// <param name="e"></param>
    50. private void btnSave_Click(object sender, EventArgs e)
    51. {
    52. if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
    53. {
    54. SaveFolder = folderBrowserDialog1.SelectedPath;
    55. txtSave.Text = SaveFolder;
    56. }
    57. }
    58. /// <summary>
    59. /// 图片的批量处理
    60. /// </summary>
    61. /// <param name="sender"></param>
    62. /// <param name="e"></param>
    63. private void btnNormalize_Click(object sender, EventArgs e)
    64. {
    65. if (FromFolder.Length < 1)
    66. {
    67. MessageBox.Show("browse the source folder.");
    68. return;
    69. }
    70. if (SaveFolder.Length < 1)
    71. {
    72. MessageBox.Show("browse the destination folder.");
    73. return;
    74. }
    75. int w = int.Parse("0" + txtSaveWidth.Text);
    76. int h = int.Parse("0" + txtSaveHeight.Text);
    77. try
    78. {
    79. int idx = 0;
    80. SaveIndex = 1;
    81. DirectoryInfo fd = new DirectoryInfo(FromFolder);
    82. FileInfo[] xfiles = fd.GetFiles();
    83. progressBar1.Maximum = xfiles.Count();
    84. progressBar1.Visible = true;
    85. foreach (FileInfo fx in xfiles)
    86. {
    87. progressBar1.Value = idx;
    88. progressBar1.Refresh();
    89. if (IsImageFile(fx.Extension))
    90. {
    91. string filename = Path.Combine(SaveFolder, fx.Name);
    92. if (cbNumericName.Checked)
    93. {
    94. filename = Path.Combine(SaveFolder, GetNumericalName());
    95. }
    96. // 如果只是复制
    97. if (w == SaveSizes[0] && h == SaveSizes[2] && txtSaveExt.Text.Length == 0)
    98. {
    99. File.Copy(fx.FullName, filename);
    100. continue;
    101. }
    102. else
    103. {
    104. Image img = Image.FromFile(fx.FullName);
    105. if (txtSaveExt.Text.Length > 0)
    106. {
    107. filename = Path.Combine(SaveFolder, fx.Name.Replace(fx.Extension, "") + txtSaveExt.Text);
    108. }
    109. if (w > 0 && h > 0)
    110. {
    111. Bitmap bmp = new Bitmap(w, h);
    112. Graphics g = Graphics.FromImage(bmp);
    113. g.DrawImage(img, 0, 0, w, h);
    114. if(cbGray.Checked)
    115. {
    116. ToGrayImage(ref bmp);
    117. }
    118. bmp.Save(filename);
    119. }
    120. else if (w > 0 && h == 0)
    121. {
    122. h = (int)(w * (double)img.Height / (double)img.Width);
    123. Bitmap bmp = new Bitmap(w, h);
    124. Graphics g = Graphics.FromImage(bmp);
    125. g.DrawImage(img, 0, 0, w, h);
    126. if (cbGray.Checked)
    127. {
    128. ToGrayImage(ref bmp);
    129. }
    130. bmp.Save(filename);
    131. }
    132. else
    133. {
    134. w = (int)(h * (double)img.Width / (double)img.Height);
    135. Bitmap bmp = new Bitmap(w, h);
    136. Graphics g = Graphics.FromImage(bmp);
    137. g.DrawImage(img, 0, 0, w, h);
    138. if (cbGray.Checked)
    139. {
    140. ToGrayImage(ref bmp);
    141. }
    142. bmp.Save(filename);
    143. }
    144. }
    145. }
    146. }
    147. progressBar1.Visible = false;
    148. MessageBox.Show("OK!");
    149. }
    150. catch (Exception ex)
    151. {
    152. MessageBox.Show(ex.Message);
    153. }
    154. }
    155. /// <summary>
    156. /// 计算下一个可使用的数字型图片文件名
    157. /// </summary>
    158. /// <returns></returns>
    159. private string GetNumericalName()
    160. {
    161. while (true)
    162. {
    163. string sname = String.Format("{0:D5}", SaveIndex);
    164. if (!File.Exists(Path.Combine(SaveFolder, sname)))
    165. {
    166. return sname;
    167. }
    168. SaveIndex++;
    169. }
    170. }
    171. #endregion

    4、正样本处理相关源代码

    一键生成 pos.txt 文件;一键生成 pos.vec 文件。 

    1. #region 正样本
    2. private void tabPage1_SizeChanged(object sender, EventArgs e)
    3. {
    4. txtPosFolder.Width = tabPage1.Width - txtPosFolder.Left - btnPosFolder.Width - 60;
    5. btnPosFolder.Left = txtPosFolder.Left + txtPosFolder.Width + 5;
    6. btnPosFolder.Top = txtPosFolder.Top;
    7. }
    8. /// <summary>
    9. /// 浏览并指定 正样本 文件夹
    10. /// </summary>
    11. /// <param name="sender"></param>
    12. /// <param name="e"></param>
    13. private void btnPosFolder_Click(object sender, EventArgs e)
    14. {
    15. if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
    16. {
    17. txtPosFolder.Text = folderBrowserDialog1.SelectedPath;
    18. txtPosCount.Text = CountImageFile(txtPosFolder.Text) + "";
    19. }
    20. }
    21. /// <summary>
    22. /// 生成 pos.txt 文件
    23. /// </summary>
    24. /// <param name="sender"></param>
    25. /// <param name="e"></param>
    26. private void btnPosTxt_Click(object sender, EventArgs e)
    27. {
    28. if (txtPosFolder.Text.Length < 1)
    29. {
    30. MessageBox.Show("Please browse the folder contains positive images!");
    31. return;
    32. }
    33. try
    34. {
    35. // 为复制图片做准备
    36. string imgPosFolder = Path.Combine(WorkFolder, @"posdata");
    37. if (cbPosCopy.Checked)
    38. {
    39. if (!Directory.Exists(imgPosFolder))
    40. {
    41. Directory.CreateDirectory(imgPosFolder);
    42. }
    43. }
    44. StringBuilder sb = new StringBuilder();
    45. DirectoryInfo fd = new DirectoryInfo(txtPosFolder.Text);
    46. FileInfo[] xfiles = fd.GetFiles();
    47. foreach (FileInfo fx in xfiles)
    48. {
    49. if (IsImageFile(fx.Extension))
    50. {
    51. // 将样本图片文件复制到工作文件夹/posdata
    52. if (cbPosCopy.Checked)
    53. {
    54. string df = Path.Combine(imgPosFolder, fx.Name);
    55. File.Copy(fx.FullName, df);
    56. }
    57. sb.Append("posdata/");
    58. sb.Append(fx.Name + " ");
    59. sb.Append(txtSampleCount.Text + " ");
    60. sb.Append(txtOriginX.Text + " ");
    61. sb.Append(txtOriginY.Text + " ");
    62. // 自动获取图片尺寸
    63. Image img = Image.FromFile(fx.FullName);
    64. sb.Append(img.Width + " ");
    65. sb.AppendLine(img.Height + "");
    66. // 按最小的图片设置 vector 参数
    67. if (txtSampleWidth.Text.Length == 0)
    68. txtSampleWidth.Text = img.Width + "";
    69. else if (Int32.Parse(txtSampleWidth.Text) > img.Width)
    70. txtSampleWidth.Text = img.Width + "";
    71. if (txtSampleHeight.Text.Length == 0)
    72. txtSampleHeight.Text = img.Height + "";
    73. else if (Int32.Parse(txtSampleHeight.Text) > img.Height)
    74. txtSampleHeight.Text = img.Height + "";
    75. }
    76. }
    77. if (!Directory.Exists(WorkFolder))
    78. {
    79. Directory.CreateDirectory(WorkFolder);
    80. }
    81. File.WriteAllText(Path.Combine(WorkFolder, @"pos.txt"), sb.ToString(), Encoding.Default);
    82. webBrowser1.DocumentText = sb.ToString().Replace("\r\n", "<br>\r\n");
    83. MessageBox.Show(Path.Combine(WorkFolder, @"pos.txt") + " OK!");
    84. }
    85. catch (Exception ex)
    86. {
    87. MessageBox.Show(ex.Message);
    88. }
    89. }
    90. /// <summary>
    91. /// 生成 pos.vec 矢量文件
    92. /// </summary>
    93. /// <param name="sender"></param>
    94. /// <param name="e"></param>
    95. private void btnPosVec_Click(object sender, EventArgs e)
    96. {
    97. string filename = Path.Combine(WorkFolder, @"pos.txt");
    98. if (!File.Exists(filename))
    99. {
    100. MessageBox.Show("Should first create pos.txt !");
    101. return;
    102. }
    103. Directory.SetCurrentDirectory(WorkFolder);
    104. StringBuilder sb = new StringBuilder();
    105. //sb.Append(WorkFolder + "\\");
    106. //sb.Append("opencv_createsamples.exe ");
    107. sb.Append("-vec pos.vec ");
    108. sb.Append("-info pos.txt ");
    109. sb.Append("-num " + txtPosCount.Text + " ");
    110. sb.Append("-w " + txtSampleWidth.Text + " ");
    111. sb.Append("-h " + txtSampleHeight.Text);
    112. Process p = new Process();
    113. p.StartInfo.FileName = Path.Combine(WorkFolder, @"opencv_createsamples.exe");
    114. p.StartInfo.Arguments = sb.ToString();
    115. //是否使用操作系统shell启动
    116. p.StartInfo.UseShellExecute = false;
    117. //接受来自调用程序的输入信息
    118. p.StartInfo.RedirectStandardInput = false;
    119. //由调用程序获取输出信息
    120. p.StartInfo.RedirectStandardOutput = true;
    121. //重定向标准错误输出
    122. p.StartInfo.RedirectStandardError = true;
    123. //不显示程序窗口
    124. p.StartInfo.CreateNoWindow = true;
    125. //启动程序
    126. p.Start();
    127. //p.StandardInput.AutoFlush = false;
    128. string output = p.StandardOutput.ReadToEnd();
    129. //等待程序执行完退出进程
    130. p.WaitForExit();
    131. p.Close();
    132. webBrowser1.DocumentText = output.Replace("\n", "<br>\n");
    133. string filenname = Path.Combine(WorkFolder, @"pos.vec");
    134. if (File.Exists(filename))
    135. {
    136. MessageBox.Show(filename + " OK!");
    137. }
    138. }
    139. #endregion

    5、负样本处理相关源代码

    一键生成 neg.txt 文件; 

    1. #region 负样本
    2. private void tabPage2_SizeChanged(object sender, EventArgs e)
    3. {
    4. txtNegFolder.Width = tabPage2.Width - txtNegFolder.Left - btnNegFolder.Width - 60;
    5. btnNegFolder.Left = txtNegFolder.Left + txtNegFolder.Width + 5;
    6. btnNegFolder.Top = txtNegFolder.Top;
    7. }
    8. /// <summary>
    9. /// 浏览并指定 负样本 文件夹
    10. /// </summary>
    11. /// <param name="sender"></param>
    12. /// <param name="e"></param>
    13. private void btnNegFolder_Click(object sender, EventArgs e)
    14. {
    15. if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
    16. {
    17. txtNegFolder.Text = folderBrowserDialog1.SelectedPath;
    18. txtNegCount.Text = CountImageFile(txtNegFolder.Text) + "";
    19. }
    20. }
    21. /// <summary>
    22. /// 生成负样本 neg.txt 文件
    23. /// </summary>
    24. /// <param name="sender"></param>
    25. /// <param name="e"></param>
    26. private void btnNegTxt_Click(object sender, EventArgs e)
    27. {
    28. string imgNegFolder = Path.Combine(WorkFolder, @"negdata");
    29. StringBuilder sb = new StringBuilder();
    30. DirectoryInfo fd = new DirectoryInfo(txtNegFolder.Text);
    31. FileInfo[] xfiles = fd.GetFiles();
    32. foreach (FileInfo fx in xfiles)
    33. {
    34. if (IsImageFile(fx.Extension))
    35. {
    36. // 将样本图片文件复制到工作文件夹/negdata
    37. if (cbNegCopy.Checked)
    38. {
    39. string df = Path.Combine(imgNegFolder, fx.Name);
    40. File.Copy(fx.FullName, df);
    41. sb.AppendLine(Path.Combine(imgNegFolder, fx.Name).Replace("\\", "/"));
    42. }
    43. else
    44. {
    45. sb.AppendLine(fx.FullName.Replace("\\", "/"));
    46. }
    47. }
    48. }
    49. if (!Directory.Exists(WorkFolder))
    50. {
    51. Directory.CreateDirectory(WorkFolder);
    52. }
    53. File.WriteAllText(Path.Combine(WorkFolder, @"neg.txt"), sb.ToString(), Encoding.Default);
    54. webBrowser1.DocumentText = sb.ToString().Replace("\r\n", "<br>\r\n");
    55. MessageBox.Show(Path.Combine(WorkFolder, @"neg.txt") + " OK!");
    56. }
    57. #endregion

    6、训练源代码

    一键生成 xml/cascade.xml 文件;

    1. #region 训练
    2. private void btnTrainning_Click(object sender, EventArgs e)
    3. {
    4. string filename = Path.Combine(WorkFolder, @"pos.vec");
    5. if (!File.Exists(filename))
    6. {
    7. MessageBox.Show("Should first create pos.vec !");
    8. return;
    9. }
    10. filename = Path.Combine(WorkFolder, @"neg.txt");
    11. if (!File.Exists(filename))
    12. {
    13. MessageBox.Show("Should first create neg.txt !");
    14. return;
    15. }
    16. Directory.SetCurrentDirectory(WorkFolder);
    17. StringBuilder sb = new StringBuilder();
    18. sb.Append("-data xml ");
    19. sb.Append("-vec " + txtVecFile.Text + " ");
    20. sb.Append("-bg " + txtNegFile.Text + " ");
    21. sb.Append("-numPos " + txtNumPos.Text + " ");
    22. sb.Append("-numNeg " + txtNumNeg.Text + " ");
    23. sb.Append("-numStages 20 ");
    24. sb.Append("-w " + txtPosWidth.Text + " ");
    25. sb.Append("-h " + txtPosHeight.Text + " ");
    26. sb.Append("-minHitRate " + txtHitRate.Text + " ");
    27. sb.Append("-weightTrimRate " + txtTrimRate.Text + " ");
    28. sb.Append("-maxFalseAlarmRate " + txtFalseAlarm.Text + " ");
    29. sb.Append("-stagetype " + txtStage.Text + " ");
    30. sb.Append("-boosttype " + cxBoost.SelectedItem.ToString() + " ");
    31. sb.Append("-featuretype " + cxFeature.SelectedItem.ToString() + " ");
    32. sb.Append("-mode " + cxMode.SelectedItem.ToString() + " ");
    33. Process p = new Process();
    34. p.StartInfo.FileName = Path.Combine(WorkFolder, @"opencv_traincascade.exe");
    35. p.StartInfo.Arguments = sb.ToString();
    36. //是否使用操作系统shell启动
    37. p.StartInfo.UseShellExecute = false;
    38. //接受来自调用程序的输入信息
    39. p.StartInfo.RedirectStandardInput = false;
    40. //由调用程序获取输出信息
    41. p.StartInfo.RedirectStandardOutput = true;
    42. //重定向标准错误输出
    43. p.StartInfo.RedirectStandardError = true;
    44. //不显示程序窗口
    45. p.StartInfo.CreateNoWindow = true;
    46. //启动程序
    47. this.Cursor = Cursors.WaitCursor;
    48. p.Start();
    49. //p.StandardInput.AutoFlush = false;
    50. string output = p.StandardOutput.ReadToEnd();
    51. //等待程序执行完退出进程
    52. p.WaitForExit();
    53. p.Close();
    54. this.Cursor = Cursors.Default;
    55. webBrowser1.DocumentText = output.Replace("\n", "<br>\n");
    56. string xmlname = Path.Combine(WorkFolder, @"xml", @"cascade.xml");
    57. if (File.Exists(xmlname))
    58. {
    59. MessageBox.Show(xmlname + " OK!");
    60. }
    61. }
    62. #endregion

    7、基础函数

    Form1.cs

    1. using System;
    2. using System.IO;
    3. using System.Text;
    4. using System.Linq;
    5. using System.Drawing;
    6. using System.Diagnostics;
    7. using System.Collections.Generic;
    8. using System.ComponentModel;
    9. using System.Threading.Tasks;
    10. using System.Windows.Forms;
    11. using System.Runtime.InteropServices;
    12. namespace Legalsoft.CVTrainer
    13. {
    14. /// <summary>
    15. /// OpenCV 训练集继承生成环境
    16. /// 北京联高软件开发有限公司
    17. /// Beijing Legal Software Ltd.
    18. /// </summary>
    19. public partial class Form1 : Form
    20. {
    21. /// <summary>
    22. /// 工作目录
    23. /// 一般是 CVTrainer.exe 下的 opencv_bin
    24. /// </summary>
    25. private string WorkFolder { get; set; } = "";
    26. public Form1()
    27. {
    28. InitializeComponent();
    29. #region 正样本相关
    30. btnPosFolder.Height = txtPosFolder.Height;
    31. WorkFolder = Path.Combine(Application.StartupPath, "opencv_bin");
    32. lbWorkFolderValue.Text = WorkFolder;
    33. cbPosCopy.Checked = true;
    34. cbPosCopy.Cursor = Cursors.Hand;
    35. btnPosTxt.Cursor = Cursors.Hand;
    36. btnPosVec.Cursor = Cursors.Hand;
    37. #endregion
    38. #region 负样本相关
    39. label14.Text = WorkFolder;
    40. cbNegCopy.Cursor = Cursors.Hand;
    41. btnNegTxt.Cursor = Cursors.Hand;
    42. #endregion
    43. #region 训练相关
    44. label17.Text = WorkFolder;
    45. btnTrainning.Cursor = Cursors.Hand;
    46. cxBoost.SelectedIndex = 0;
    47. cxFeature.SelectedIndex = 0;
    48. cxMode.SelectedIndex = 2;
    49. #endregion
    50. #region 图片预处理相关
    51. cbGray.Cursor = Cursors.Hand;
    52. txtSaveExt.Text = "";
    53. cbNumericName.Cursor = Cursors.Hand;
    54. btnNormalize.Cursor = Cursors.Hand;
    55. txtFrom.ReadOnly = true;
    56. txtFromWidth.ReadOnly = true;
    57. txtFromHeight.ReadOnly = true;
    58. btnFrom.Cursor = Cursors.Hand;
    59. txtSave.ReadOnly = true;
    60. btnSave.Cursor = Cursors.Hand;
    61. progressBar1.Visible = false;
    62. #endregion
    63. tabPage1.Text = " Positive Images ";
    64. tabPage2.Text = " Negative Images ";
    65. tabPage3.Text = " Cascade Train ";
    66. tpNormalize.Text = " Image Normalization ";
    67. panel1.Dock = DockStyle.Top;
    68. tabControl1.Dock = DockStyle.Fill;
    69. panel2.Dock = DockStyle.Fill;
    70. webBrowser1.Dock = DockStyle.Fill;
    71. this.Text = "C#,OpenCV Object Detect Images Trainer ——BEIJING LEGAL SOFTWARE LTD.";
    72. this.StartPosition = FormStartPosition.CenterScreen;
    73. }
    74. private void Form1_Load(object sender, EventArgs e)
    75. {
    76. Summary();
    77. }
    78. private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
    79. {
    80. if (tabControl1.SelectedIndex != 0)
    81. {
    82. Summary();
    83. }
    84. }
    85. /// <summary>
    86. /// 计算一些概要信息
    87. /// </summary>
    88. private void Summary()
    89. {
    90. StringBuilder sb = new StringBuilder();
    91. sb.AppendLine("<style>b { font-weight:bold;color:#AA0000; } </style>");
    92. sb.AppendLine("Work folder: " + WorkFolder + "<br>");
    93. string folder = WorkFolder;
    94. if (!Directory.Exists(folder))
    95. {
    96. sb.AppendLine("!Create Work folder " + WorkFolder + "<br>");
    97. MessageBox.Show("Work folder not exist!\nYou can do nothing!");
    98. return;
    99. }
    100. folder = Path.Combine(WorkFolder, "xml");
    101. sb.AppendLine("Parameters folder: " + folder + "<br>");
    102. if (!Directory.Exists(folder))
    103. {
    104. sb.AppendLine("!Create parameter(xml) folder " + folder + "<br>");
    105. Directory.CreateDirectory(folder);
    106. }
    107. folder = Path.Combine(WorkFolder, "posdata");
    108. sb.AppendLine("Positive folder: " + folder + "<br>");
    109. if (!Directory.Exists(folder))
    110. {
    111. sb.AppendLine("!Create Positive folder " + folder + "<br>");
    112. Directory.CreateDirectory(folder);
    113. }
    114. else
    115. {
    116. int count = CountImageFile(folder);
    117. if (count > 0)
    118. {
    119. sb.AppendLine("There have " + count + " images<br>");
    120. txtPosCount.Text = count + "";
    121. txtNumPos.Text = count + "";
    122. txtPosFolder.Text = folder;
    123. }
    124. if (File.Exists(Path.Combine(WorkFolder, @"pos.txt")))
    125. {
    126. sb.AppendLine("There have <b>pos.txt</b><br>");
    127. int[] sz = ImageSizes(Path.Combine(WorkFolder, @"posdata"));
    128. txtSampleWidth.Text = sz[0] + "";
    129. txtSampleHeight.Text = sz[2] + "";
    130. txtPosWidth.Text = sz[0] + "";
    131. txtPosHeight.Text = sz[2] + "";
    132. sb.AppendLine("Image size: " + sz[0] + "," + sz[2] + "<br>");
    133. }
    134. else
    135. {
    136. sb.AppendLine("There have't <b>pos.txt</b><br>");
    137. }
    138. if (File.Exists(Path.Combine(WorkFolder, @"pos.vec")))
    139. {
    140. sb.AppendLine("There have <b>pos.vec</b><br>");
    141. }
    142. else
    143. {
    144. sb.AppendLine("There have <b>not pos.vec</b><br>");
    145. }
    146. cbPosCopy.Checked = (count == 0);
    147. }
    148. folder = Path.Combine(WorkFolder, "negdata");
    149. sb.AppendLine("Negative folder: " + folder + "<br>");
    150. if (!Directory.Exists(folder))
    151. {
    152. sb.AppendLine("!Create Negative folder " + folder + "<br>");
    153. Directory.CreateDirectory(folder);
    154. }
    155. else
    156. {
    157. int count = CountImageFile(folder);
    158. if (count > 0)
    159. {
    160. sb.AppendLine("There have " + count + " images<br>");
    161. txtNegCount.Text = count + "";
    162. txtNumNeg.Text = count + "";
    163. txtNegFolder.Text = folder;
    164. }
    165. if (File.Exists(Path.Combine(WorkFolder, @"neg.txt")))
    166. {
    167. sb.AppendLine("There have <b>neg.txt</b><br>");
    168. }
    169. else
    170. {
    171. sb.AppendLine("There have <b>not neg.txt</b><br>");
    172. }
    173. cbNegCopy.Checked = (count == 0);
    174. }
    175. webBrowser1.DocumentText = sb.ToString();
    176. }
    177. //...
    178. // 这里添加上面的其他代码
    179. }
    180. }

    基础函数:

    1. #region 基础函数
    2. /// <summary>
    3. /// 文件是图片吗?
    4. /// 按文件后缀判别;可自行添加;
    5. /// </summary>
    6. /// <param name="ext"></param>
    7. /// <returns></returns>
    8. private bool IsImageFile(string ext)
    9. {
    10. ext = ext.ToLower();
    11. if (ext == ".bmp") return true;
    12. if (ext == ".gif") return true;
    13. if (ext == ".png") return true;
    14. if (ext == ".jpg" || ext == ".jpeg") return true;
    15. return false;
    16. }
    17. /// <summary>
    18. /// 统计指定目录下的图片文件数量
    19. /// </summary>
    20. /// <param name="folder"></param>
    21. /// <returns></returns>
    22. private int CountImageFile(string folder)
    23. {
    24. DirectoryInfo fd = new DirectoryInfo(folder);
    25. int count = 0;
    26. FileInfo[] xfiles = fd.GetFiles();
    27. foreach (FileInfo fx in xfiles)
    28. {
    29. if (IsImageFile(fx.Extension))
    30. {
    31. count++;
    32. }
    33. }
    34. return count;
    35. }
    36. /// <summary>
    37. /// 提取指定文件夹下图片的尺寸(最小、最大的高度、宽度)
    38. /// </summary>
    39. /// <param name="folder"></param>
    40. /// <returns></returns>
    41. private int[] ImageSizes(string folder)
    42. {
    43. int min_width = Int16.MaxValue;
    44. int max_width = 0;
    45. int min_height = Int16.MaxValue;
    46. int max_height = 0;
    47. DirectoryInfo fd = new DirectoryInfo(folder);
    48. FileInfo[] xfiles = fd.GetFiles();
    49. foreach (FileInfo fx in xfiles)
    50. {
    51. if (IsImageFile(fx.Extension))
    52. {
    53. Image img = Image.FromFile(fx.FullName);
    54. if (img.Width > max_width) max_width = img.Width;
    55. if (img.Width < min_width) min_width = img.Width;
    56. if (img.Height > max_height) max_height = img.Height;
    57. if (img.Height < min_height) min_height = img.Height;
    58. }
    59. }
    60. return new int[] { min_width, max_width, min_height, max_height };
    61. }
    62. /// <summary>
    63. /// 图片转为黑白的
    64. /// 简单的代码,看得懂一些;效率低下;
    65. /// 不过,图片不多的够用了。
    66. /// </summary>
    67. /// <param name="bmp"></param>
    68. private void ToGrayImage(ref Bitmap bmp)
    69. {
    70. for (int y = 0; y < bmp.Height; y++)
    71. {
    72. for (int x = 0; x < bmp.Width; x++)
    73. {
    74. Color cc = bmp.GetPixel(x, y);
    75. int cx = Math.Min(255, (int)(cc.R * 0.299 + cc.G * 0.587 + cc.B * 0.114));
    76. bmp.SetPixel(x, y, Color.FromArgb(cx, cx, cx));
    77. }
    78. }
    79. }
    80. #endregion

    8、界面相关代码

    1. namespace Legalsoft.CVTrainer
    2. {
    3. partial class Form1
    4. {
    5. /// <summary>
    6. /// 必需的设计器变量。
    7. /// </summary>
    8. private System.ComponentModel.IContainer components = null;
    9. /// <summary>
    10. /// 清理所有正在使用的资源。
    11. /// </summary>
    12. /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
    13. protected override void Dispose(bool disposing)
    14. {
    15. if (disposing && (components != null))
    16. {
    17. components.Dispose();
    18. }
    19. base.Dispose(disposing);
    20. }
    21. #region Windows 窗体设计器生成的代码
    22. /// <summary>
    23. /// 设计器支持所需的方法 - 不要修改
    24. /// 使用代码编辑器修改此方法的内容。
    25. /// </summary>
    26. private void InitializeComponent()
    27. {
    28. this.panel1 = new System.Windows.Forms.Panel();
    29. this.tabControl1 = new System.Windows.Forms.TabControl();
    30. this.tpNormalize = new System.Windows.Forms.TabPage();
    31. this.progressBar1 = new System.Windows.Forms.ProgressBar();
    32. this.cbNumericName = new System.Windows.Forms.CheckBox();
    33. this.txtSaveExt = new System.Windows.Forms.TextBox();
    34. this.cbGray = new System.Windows.Forms.CheckBox();
    35. this.btnNormalize = new System.Windows.Forms.Button();
    36. this.label35 = new System.Windows.Forms.Label();
    37. this.txtSaveHeight = new System.Windows.Forms.TextBox();
    38. this.txtSaveWidth = new System.Windows.Forms.TextBox();
    39. this.label33 = new System.Windows.Forms.Label();
    40. this.txtFromHeight = new System.Windows.Forms.TextBox();
    41. this.txtFromWidth = new System.Windows.Forms.TextBox();
    42. this.btnSave = new System.Windows.Forms.Button();
    43. this.txtSave = new System.Windows.Forms.TextBox();
    44. this.lbSave = new System.Windows.Forms.Label();
    45. this.btnFrom = new System.Windows.Forms.Button();
    46. this.txtFrom = new System.Windows.Forms.TextBox();
    47. this.lbFrom = new System.Windows.Forms.Label();
    48. this.tabPage1 = new System.Windows.Forms.TabPage();
    49. this.txtBgColor = new System.Windows.Forms.TextBox();
    50. this.lbBgColor = new System.Windows.Forms.Label();
    51. this.label11 = new System.Windows.Forms.Label();
    52. this.txtPosCount = new System.Windows.Forms.TextBox();
    53. this.lbPosCount = new System.Windows.Forms.Label();
    54. this.lbWorkFolderValue = new System.Windows.Forms.Label();
    55. this.lbWorkFolder = new System.Windows.Forms.Label();
    56. this.cbPosCopy = new System.Windows.Forms.CheckBox();
    57. this.label7 = new System.Windows.Forms.Label();
    58. this.btnPosVec = new System.Windows.Forms.Button();
    59. this.btnPosTxt = new System.Windows.Forms.Button();
    60. this.label5 = new System.Windows.Forms.Label();
    61. this.txtSampleHeight = new System.Windows.Forms.TextBox();
    62. this.txtSampleWidth = new System.Windows.Forms.TextBox();
    63. this.lbSample = new System.Windows.Forms.Label();
    64. this.label4 = new System.Windows.Forms.Label();
    65. this.txtOriginY = new System.Windows.Forms.TextBox();
    66. this.txtOriginX = new System.Windows.Forms.TextBox();
    67. this.lbOriginal = new System.Windows.Forms.Label();
    68. this.txtSampleCount = new System.Windows.Forms.TextBox();
    69. this.lbSampleCount = new System.Windows.Forms.Label();
    70. this.btnPosFolder = new System.Windows.Forms.Button();
    71. this.txtPosFolder = new System.Windows.Forms.TextBox();
    72. this.lbPosFolder = new System.Windows.Forms.Label();
    73. this.tabPage2 = new System.Windows.Forms.TabPage();
    74. this.label12 = new System.Windows.Forms.Label();
    75. this.txtNegCount = new System.Windows.Forms.TextBox();
    76. this.lbNegCount = new System.Windows.Forms.Label();
    77. this.label14 = new System.Windows.Forms.Label();
    78. this.lbNegWorkFolder = new System.Windows.Forms.Label();
    79. this.cbNegCopy = new System.Windows.Forms.CheckBox();
    80. this.btnNegTxt = new System.Windows.Forms.Button();
    81. this.btnNegFolder = new System.Windows.Forms.Button();
    82. this.txtNegFolder = new System.Windows.Forms.TextBox();
    83. this.lbNegFolder = new System.Windows.Forms.Label();
    84. this.tabPage3 = new System.Windows.Forms.TabPage();
    85. this.label1 = new System.Windows.Forms.Label();
    86. this.txtPosHeight = new System.Windows.Forms.TextBox();
    87. this.txtPosWidth = new System.Windows.Forms.TextBox();
    88. this.lbMode = new System.Windows.Forms.Label();
    89. this.lbNumNeg = new System.Windows.Forms.Label();
    90. this.lbNumPos = new System.Windows.Forms.Label();
    91. this.txtTrimRate = new System.Windows.Forms.TextBox();
    92. this.lbWeightTrimRate = new System.Windows.Forms.Label();
    93. this.txtFalseAlarm = new System.Windows.Forms.TextBox();
    94. this.lbMasFalseAlarmRate = new System.Windows.Forms.Label();
    95. this.txtHitRate = new System.Windows.Forms.TextBox();
    96. this.lbMinHitRate = new System.Windows.Forms.Label();
    97. this.lbBoostType = new System.Windows.Forms.Label();
    98. this.txtNumNeg = new System.Windows.Forms.TextBox();
    99. this.txtNumPos = new System.Windows.Forms.TextBox();
    100. this.lbFeatureType = new System.Windows.Forms.Label();
    101. this.txtStage = new System.Windows.Forms.TextBox();
    102. this.lbStageType = new System.Windows.Forms.Label();
    103. this.txtNegFile = new System.Windows.Forms.TextBox();
    104. this.lbBgFileName = new System.Windows.Forms.Label();
    105. this.txtVecFile = new System.Windows.Forms.TextBox();
    106. this.lbVecFileName = new System.Windows.Forms.Label();
    107. this.txtXml = new System.Windows.Forms.TextBox();
    108. this.lbCascadeDirName = new System.Windows.Forms.Label();
    109. this.label17 = new System.Windows.Forms.Label();
    110. this.lbTrWorkFolder = new System.Windows.Forms.Label();
    111. this.btnTrainning = new System.Windows.Forms.Button();
    112. this.panel2 = new System.Windows.Forms.Panel();
    113. this.webBrowser1 = new System.Windows.Forms.WebBrowser();
    114. this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
    115. this.label2 = new System.Windows.Forms.Label();
    116. this.txtStageNumber = new System.Windows.Forms.TextBox();
    117. this.label3 = new System.Windows.Forms.Label();
    118. this.cxMode = new System.Windows.Forms.ComboBox();
    119. this.cxFeature = new System.Windows.Forms.ComboBox();
    120. this.cxBoost = new System.Windows.Forms.ComboBox();
    121. this.panel1.SuspendLayout();
    122. this.tabControl1.SuspendLayout();
    123. this.tpNormalize.SuspendLayout();
    124. this.tabPage1.SuspendLayout();
    125. this.tabPage2.SuspendLayout();
    126. this.tabPage3.SuspendLayout();
    127. this.panel2.SuspendLayout();
    128. this.SuspendLayout();
    129. //
    130. // panel1
    131. //
    132. this.panel1.Controls.Add(this.tabControl1);
    133. this.panel1.Location = new System.Drawing.Point(12, 12);
    134. this.panel1.Name = "panel1";
    135. this.panel1.Size = new System.Drawing.Size(1530, 666);
    136. this.panel1.TabIndex = 0;
    137. //
    138. // tabControl1
    139. //
    140. this.tabControl1.Controls.Add(this.tpNormalize);
    141. this.tabControl1.Controls.Add(this.tabPage1);
    142. this.tabControl1.Controls.Add(this.tabPage2);
    143. this.tabControl1.Controls.Add(this.tabPage3);
    144. this.tabControl1.Cursor = System.Windows.Forms.Cursors.Arrow;
    145. this.tabControl1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    146. this.tabControl1.ItemSize = new System.Drawing.Size(108, 41);
    147. this.tabControl1.Location = new System.Drawing.Point(12, 13);
    148. this.tabControl1.Name = "tabControl1";
    149. this.tabControl1.SelectedIndex = 0;
    150. this.tabControl1.Size = new System.Drawing.Size(1457, 639);
    151. this.tabControl1.TabIndex = 0;
    152. this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
    153. //
    154. // tpNormalize
    155. //
    156. this.tpNormalize.Controls.Add(this.label2);
    157. this.tpNormalize.Controls.Add(this.progressBar1);
    158. this.tpNormalize.Controls.Add(this.cbNumericName);
    159. this.tpNormalize.Controls.Add(this.txtSaveExt);
    160. this.tpNormalize.Controls.Add(this.cbGray);
    161. this.tpNormalize.Controls.Add(this.btnNormalize);
    162. this.tpNormalize.Controls.Add(this.label35);
    163. this.tpNormalize.Controls.Add(this.txtSaveHeight);
    164. this.tpNormalize.Controls.Add(this.txtSaveWidth);
    165. this.tpNormalize.Controls.Add(this.label33);
    166. this.tpNormalize.Controls.Add(this.txtFromHeight);
    167. this.tpNormalize.Controls.Add(this.txtFromWidth);
    168. this.tpNormalize.Controls.Add(this.btnSave);
    169. this.tpNormalize.Controls.Add(this.txtSave);
    170. this.tpNormalize.Controls.Add(this.lbSave);
    171. this.tpNormalize.Controls.Add(this.btnFrom);
    172. this.tpNormalize.Controls.Add(this.txtFrom);
    173. this.tpNormalize.Controls.Add(this.lbFrom);
    174. this.tpNormalize.Location = new System.Drawing.Point(8, 49);
    175. this.tpNormalize.Name = "tpNormalize";
    176. this.tpNormalize.Padding = new System.Windows.Forms.Padding(3);
    177. this.tpNormalize.Size = new System.Drawing.Size(1441, 582);
    178. this.tpNormalize.TabIndex = 3;
    179. this.tpNormalize.Text = "tabPage4";
    180. this.tpNormalize.UseVisualStyleBackColor = true;
    181. this.tpNormalize.SizeChanged += new System.EventHandler(this.tpNormalize_SizeChanged);
    182. //
    183. // progressBar1
    184. //
    185. this.progressBar1.Location = new System.Drawing.Point(527, 439);
    186. this.progressBar1.Name = "progressBar1";
    187. this.progressBar1.Size = new System.Drawing.Size(375, 74);
    188. this.progressBar1.TabIndex = 45;
    189. //
    190. // cbNumericName
    191. //
    192. this.cbNumericName.AutoSize = true;
    193. this.cbNumericName.Location = new System.Drawing.Point(564, 376);
    194. this.cbNumericName.Name = "cbNumericName";
    195. this.cbNumericName.Size = new System.Drawing.Size(646, 32);
    196. this.cbNumericName.TabIndex = 44;
    197. this.cbNumericName.Text = "Rename filename to Numerical serial names ?";
    198. this.cbNumericName.UseVisualStyleBackColor = true;
    199. //
    200. // txtSaveExt
    201. //
    202. this.txtSaveExt.Location = new System.Drawing.Point(298, 306);
    203. this.txtSaveExt.Name = "txtSaveExt";
    204. this.txtSaveExt.Size = new System.Drawing.Size(215, 39);
    205. this.txtSaveExt.TabIndex = 43;
    206. //
    207. // cbGray
    208. //
    209. this.cbGray.AutoSize = true;
    210. this.cbGray.Location = new System.Drawing.Point(298, 376);
    211. this.cbGray.Name = "cbGray";
    212. this.cbGray.Size = new System.Drawing.Size(240, 32);
    213. this.cbGray.TabIndex = 41;
    214. this.cbGray.Text = "To Gray Image?";
    215. this.cbGray.UseVisualStyleBackColor = true;
    216. //
    217. // btnNormalize
    218. //
    219. this.btnNormalize.Location = new System.Drawing.Point(298, 439);
    220. this.btnNormalize.Name = "btnNormalize";
    221. this.btnNormalize.Size = new System.Drawing.Size(215, 74);
    222. this.btnNormalize.TabIndex = 40;
    223. this.btnNormalize.Text = "Normalize";
    224. this.btnNormalize.UseVisualStyleBackColor = true;
    225. this.btnNormalize.Click += new System.EventHandler(this.btnNormalize_Click);
    226. //
    227. // label35
    228. //
    229. this.label35.AutoSize = true;
    230. this.label35.Location = new System.Drawing.Point(522, 252);
    231. this.label35.Name = "label35";
    232. this.label35.Size = new System.Drawing.Size(26, 28);
    233. this.label35.TabIndex = 39;
    234. this.label35.Text = "x";
    235. //
    236. // txtSaveHeight
    237. //
    238. this.txtSaveHeight.Location = new System.Drawing.Point(554, 241);
    239. this.txtSaveHeight.Name = "txtSaveHeight";
    240. this.txtSaveHeight.Size = new System.Drawing.Size(215, 39);
    241. this.txtSaveHeight.TabIndex = 38;
    242. //
    243. // txtSaveWidth
    244. //
    245. this.txtSaveWidth.Location = new System.Drawing.Point(298, 241);
    246. this.txtSaveWidth.Name = "txtSaveWidth";
    247. this.txtSaveWidth.Size = new System.Drawing.Size(215, 39);
    248. this.txtSaveWidth.TabIndex = 37;
    249. //
    250. // label33
    251. //
    252. this.label33.AutoSize = true;
    253. this.label33.Location = new System.Drawing.Point(522, 114);
    254. this.label33.Name = "label33";
    255. this.label33.Size = new System.Drawing.Size(26, 28);
    256. this.label33.TabIndex = 35;
    257. this.label33.Text = "x";
    258. //
    259. // txtFromHeight
    260. //
    261. this.txtFromHeight.Location = new System.Drawing.Point(554, 103);
    262. this.txtFromHeight.Name = "txtFromHeight";
    263. this.txtFromHeight.Size = new System.Drawing.Size(215, 39);
    264. this.txtFromHeight.TabIndex = 34;
    265. //
    266. // txtFromWidth
    267. //
    268. this.txtFromWidth.Location = new System.Drawing.Point(298, 103);
    269. this.txtFromWidth.Name = "txtFromWidth";
    270. this.txtFromWidth.Size = new System.Drawing.Size(215, 39);
    271. this.txtFromWidth.TabIndex = 33;
    272. //
    273. // btnSave
    274. //
    275. this.btnSave.Location = new System.Drawing.Point(689, 179);
    276. this.btnSave.Name = "btnSave";
    277. this.btnSave.Size = new System.Drawing.Size(223, 44);
    278. this.btnSave.TabIndex = 30;
    279. this.btnSave.Text = "browse...";
    280. this.btnSave.UseVisualStyleBackColor = true;
    281. this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
    282. //
    283. // txtSave
    284. //
    285. this.txtSave.Location = new System.Drawing.Point(298, 179);
    286. this.txtSave.Name = "txtSave";
    287. this.txtSave.Size = new System.Drawing.Size(375, 39);
    288. this.txtSave.TabIndex = 29;
    289. //
    290. // lbSave
    291. //
    292. this.lbSave.AutoSize = true;
    293. this.lbSave.Location = new System.Drawing.Point(112, 182);
    294. this.lbSave.Name = "lbSave";
    295. this.lbSave.Size = new System.Drawing.Size(180, 28);
    296. this.lbSave.TabIndex = 28;
    297. this.lbSave.Text = "Save folder:";
    298. //
    299. // btnFrom
    300. //
    301. this.btnFrom.Location = new System.Drawing.Point(689, 44);
    302. this.btnFrom.Name = "btnFrom";
    303. this.btnFrom.Size = new System.Drawing.Size(223, 44);
    304. this.btnFrom.TabIndex = 27;
    305. this.btnFrom.Text = "browse...";
    306. this.btnFrom.UseVisualStyleBackColor = true;
    307. this.btnFrom.Click += new System.EventHandler(this.btnFrom_Click);
    308. //
    309. // txtFrom
    310. //
    311. this.txtFrom.Location = new System.Drawing.Point(298, 44);
    312. this.txtFrom.Name = "txtFrom";
    313. this.txtFrom.Size = new System.Drawing.Size(375, 39);
    314. this.txtFrom.TabIndex = 26;
    315. //
    316. // lbFrom
    317. //
    318. this.lbFrom.AutoSize = true;
    319. this.lbFrom.Location = new System.Drawing.Point(84, 47);
    320. this.lbFrom.Name = "lbFrom";
    321. this.lbFrom.Size = new System.Drawing.Size(208, 28);
    322. this.lbFrom.TabIndex = 25;
    323. this.lbFrom.Text = "Source folder:";
    324. //
    325. // tabPage1
    326. //
    327. this.tabPage1.Controls.Add(this.txtBgColor);
    328. this.tabPage1.Controls.Add(this.lbBgColor);
    329. this.tabPage1.Controls.Add(this.label11);
    330. this.tabPage1.Controls.Add(this.txtPosCount);
    331. this.tabPage1.Controls.Add(this.lbPosCount);
    332. this.tabPage1.Controls.Add(this.lbWorkFolderValue);
    333. this.tabPage1.Controls.Add(this.lbWorkFolder);
    334. this.tabPage1.Controls.Add(this.cbPosCopy);
    335. this.tabPage1.Controls.Add(this.label7);
    336. this.tabPage1.Controls.Add(this.btnPosVec);
    337. this.tabPage1.Controls.Add(this.btnPosTxt);
    338. this.tabPage1.Controls.Add(this.label5);
    339. this.tabPage1.Controls.Add(this.txtSampleHeight);
    340. this.tabPage1.Controls.Add(this.txtSampleWidth);
    341. this.tabPage1.Controls.Add(this.lbSample);
    342. this.tabPage1.Controls.Add(this.label4);
    343. this.tabPage1.Controls.Add(this.txtOriginY);
    344. this.tabPage1.Controls.Add(this.txtOriginX);
    345. this.tabPage1.Controls.Add(this.lbOriginal);
    346. this.tabPage1.Controls.Add(this.txtSampleCount);
    347. this.tabPage1.Controls.Add(this.lbSampleCount);
    348. this.tabPage1.Controls.Add(this.btnPosFolder);
    349. this.tabPage1.Controls.Add(this.txtPosFolder);
    350. this.tabPage1.Controls.Add(this.lbPosFolder);
    351. this.tabPage1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
    352. this.tabPage1.Location = new System.Drawing.Point(8, 49);
    353. this.tabPage1.Name = "tabPage1";
    354. this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
    355. this.tabPage1.Size = new System.Drawing.Size(1441, 582);
    356. this.tabPage1.TabIndex = 0;
    357. this.tabPage1.Text = "tabPage1";
    358. this.tabPage1.UseVisualStyleBackColor = true;
    359. this.tabPage1.SizeChanged += new System.EventHandler(this.tabPage1_SizeChanged);
    360. //
    361. // txtBgColor
    362. //
    363. this.txtBgColor.Location = new System.Drawing.Point(905, 157);
    364. this.txtBgColor.Name = "txtBgColor";
    365. this.txtBgColor.Size = new System.Drawing.Size(118, 39);
    366. this.txtBgColor.TabIndex = 23;
    367. this.txtBgColor.Text = "0";
    368. //
    369. // lbBgColor
    370. //
    371. this.lbBgColor.AutoSize = true;
    372. this.lbBgColor.Location = new System.Drawing.Point(551, 164);
    373. this.lbBgColor.Name = "lbBgColor";
    374. this.lbBgColor.Size = new System.Drawing.Size(348, 28);
    375. this.lbBgColor.TabIndex = 22;
    376. this.lbBgColor.Text = "Background Color(0-255):";
    377. //
    378. // label11
    379. //
    380. this.label11.AutoSize = true;
    381. this.label11.Location = new System.Drawing.Point(528, 103);
    382. this.label11.Name = "label11";
    383. this.label11.Size = new System.Drawing.Size(96, 28);
    384. this.label11.TabIndex = 21;
    385. this.label11.Text = "images";
    386. //
    387. // txtPosCount
    388. //
    389. this.txtPosCount.Location = new System.Drawing.Point(298, 100);
    390. this.txtPosCount.Name = "txtPosCount";
    391. this.txtPosCount.Size = new System.Drawing.Size(215, 39);
    392. this.txtPosCount.TabIndex = 20;
    393. //
    394. // lbPosCount
    395. //
    396. this.lbPosCount.AutoSize = true;
    397. this.lbPosCount.Location = new System.Drawing.Point(112, 103);
    398. this.lbPosCount.Name = "lbPosCount";
    399. this.lbPosCount.Size = new System.Drawing.Size(180, 28);
    400. this.lbPosCount.TabIndex = 19;
    401. this.lbPosCount.Text = "Image Count:";
    402. //
    403. // lbWorkFolderValue
    404. //
    405. this.lbWorkFolderValue.AutoSize = true;
    406. this.lbWorkFolderValue.ForeColor = System.Drawing.Color.BlueViolet;
    407. this.lbWorkFolderValue.Location = new System.Drawing.Point(292, 347);
    408. this.lbWorkFolderValue.Name = "lbWorkFolderValue";
    409. this.lbWorkFolderValue.Size = new System.Drawing.Size(96, 28);
    410. this.lbWorkFolderValue.TabIndex = 18;
    411. this.lbWorkFolderValue.Text = "label9";
    412. //
    413. // lbWorkFolder
    414. //
    415. this.lbWorkFolder.AutoSize = true;
    416. this.lbWorkFolder.Location = new System.Drawing.Point(112, 347);
    417. this.lbWorkFolder.Name = "lbWorkFolder";
    418. this.lbWorkFolder.Size = new System.Drawing.Size(180, 28);
    419. this.lbWorkFolder.TabIndex = 17;
    420. this.lbWorkFolder.Text = "Work Folder:";
    421. //
    422. // cbPosCopy
    423. //
    424. this.cbPosCopy.AutoSize = true;
    425. this.cbPosCopy.Location = new System.Drawing.Point(298, 398);
    426. this.cbPosCopy.Name = "cbPosCopy";
    427. this.cbPosCopy.Size = new System.Drawing.Size(674, 32);
    428. this.cbPosCopy.TabIndex = 16;
    429. this.cbPosCopy.Text = "Copy positive images to {Work Folder}/posdata";
    430. this.cbPosCopy.UseVisualStyleBackColor = true;
    431. //
    432. // label7
    433. //
    434. this.label7.AutoSize = true;
    435. this.label7.Location = new System.Drawing.Point(421, 164);
    436. this.label7.Name = "label7";
    437. this.label7.Size = new System.Drawing.Size(96, 28);
    438. this.label7.TabIndex = 15;
    439. this.label7.Text = "/image";
    440. //
    441. // btnPosVec
    442. //
    443. this.btnPosVec.Location = new System.Drawing.Point(524, 453);
    444. this.btnPosVec.Name = "btnPosVec";
    445. this.btnPosVec.Size = new System.Drawing.Size(215, 74);
    446. this.btnPosVec.TabIndex = 14;
    447. this.btnPosVec.Text = "=> pos.vec";
    448. this.btnPosVec.UseVisualStyleBackColor = true;
    449. this.btnPosVec.Click += new System.EventHandler(this.btnPosVec_Click);
    450. //
    451. // btnPosTxt
    452. //
    453. this.btnPosTxt.Location = new System.Drawing.Point(298, 453);
    454. this.btnPosTxt.Name = "btnPosTxt";
    455. this.btnPosTxt.Size = new System.Drawing.Size(215, 74);
    456. this.btnPosTxt.TabIndex = 13;
    457. this.btnPosTxt.Text = "=> pos.txt";
    458. this.btnPosTxt.UseVisualStyleBackColor = true;
    459. this.btnPosTxt.Click += new System.EventHandler(this.btnPosTxt_Click);
    460. //
    461. // label5
    462. //
    463. this.label5.AutoSize = true;
    464. this.label5.Location = new System.Drawing.Point(519, 287);
    465. this.label5.Name = "label5";
    466. this.label5.Size = new System.Drawing.Size(26, 28);
    467. this.label5.TabIndex = 12;
    468. this.label5.Text = "x";
    469. //
    470. // txtSampleHeight
    471. //
    472. this.txtSampleHeight.Location = new System.Drawing.Point(556, 276);
    473. this.txtSampleHeight.Name = "txtSampleHeight";
    474. this.txtSampleHeight.Size = new System.Drawing.Size(215, 39);
    475. this.txtSampleHeight.TabIndex = 11;
    476. //
    477. // txtSampleWidth
    478. //
    479. this.txtSampleWidth.Location = new System.Drawing.Point(297, 276);
    480. this.txtSampleWidth.Name = "txtSampleWidth";
    481. this.txtSampleWidth.Size = new System.Drawing.Size(215, 39);
    482. this.txtSampleWidth.TabIndex = 10;
    483. //
    484. // lbSample
    485. //
    486. this.lbSample.AutoSize = true;
    487. this.lbSample.Location = new System.Drawing.Point(41, 279);
    488. this.lbSample.Name = "lbSample";
    489. this.lbSample.Size = new System.Drawing.Size(250, 28);
    490. this.lbSample.TabIndex = 9;
    491. this.lbSample.Text = "Sample Size(WxH):";
    492. //
    493. // label4
    494. //
    495. this.label4.AutoSize = true;
    496. this.label4.Location = new System.Drawing.Point(519, 227);
    497. this.label4.Name = "label4";
    498. this.label4.Size = new System.Drawing.Size(26, 28);
    499. this.label4.TabIndex = 8;
    500. this.label4.Text = ",";
    501. //
    502. // txtOriginY
    503. //
    504. this.txtOriginY.Location = new System.Drawing.Point(556, 216);
    505. this.txtOriginY.Name = "txtOriginY";
    506. this.txtOriginY.Size = new System.Drawing.Size(215, 39);
    507. this.txtOriginY.TabIndex = 7;
    508. this.txtOriginY.Text = "0";
    509. //
    510. // txtOriginX
    511. //
    512. this.txtOriginX.Location = new System.Drawing.Point(298, 216);
    513. this.txtOriginX.Name = "txtOriginX";
    514. this.txtOriginX.Size = new System.Drawing.Size(215, 39);
    515. this.txtOriginX.TabIndex = 6;
    516. this.txtOriginX.Text = "0";
    517. //
    518. // lbOriginal
    519. //
    520. this.lbOriginal.AutoSize = true;
    521. this.lbOriginal.Location = new System.Drawing.Point(84, 219);
    522. this.lbOriginal.Name = "lbOriginal";
    523. this.lbOriginal.Size = new System.Drawing.Size(208, 28);
    524. this.lbOriginal.TabIndex = 5;
    525. this.lbOriginal.Text = "Original(X,Y):";
    526. //
    527. // txtSampleCount
    528. //
    529. this.txtSampleCount.Location = new System.Drawing.Point(297, 157);
    530. this.txtSampleCount.Name = "txtSampleCount";
    531. this.txtSampleCount.Size = new System.Drawing.Size(118, 39);
    532. this.txtSampleCount.TabIndex = 4;
    533. this.txtSampleCount.Text = "1";
    534. //
    535. // lbSampleCount
    536. //
    537. this.lbSampleCount.AutoSize = true;
    538. this.lbSampleCount.Location = new System.Drawing.Point(83, 160);
    539. this.lbSampleCount.Name = "lbSampleCount";
    540. this.lbSampleCount.Size = new System.Drawing.Size(208, 28);
    541. this.lbSampleCount.TabIndex = 3;
    542. this.lbSampleCount.Text = "Sample Number:";
    543. //
    544. // btnPosFolder
    545. //
    546. this.btnPosFolder.Location = new System.Drawing.Point(689, 44);
    547. this.btnPosFolder.Name = "btnPosFolder";
    548. this.btnPosFolder.Size = new System.Drawing.Size(223, 44);
    549. this.btnPosFolder.TabIndex = 2;
    550. this.btnPosFolder.Text = "browse...";
    551. this.btnPosFolder.UseVisualStyleBackColor = true;
    552. this.btnPosFolder.Click += new System.EventHandler(this.btnPosFolder_Click);
    553. //
    554. // txtPosFolder
    555. //
    556. this.txtPosFolder.Location = new System.Drawing.Point(298, 44);
    557. this.txtPosFolder.Name = "txtPosFolder";
    558. this.txtPosFolder.Size = new System.Drawing.Size(375, 39);
    559. this.txtPosFolder.TabIndex = 1;
    560. //
    561. // lbPosFolder
    562. //
    563. this.lbPosFolder.AutoSize = true;
    564. this.lbPosFolder.Location = new System.Drawing.Point(56, 47);
    565. this.lbPosFolder.Name = "lbPosFolder";
    566. this.lbPosFolder.Size = new System.Drawing.Size(236, 28);
    567. this.lbPosFolder.TabIndex = 0;
    568. this.lbPosFolder.Text = "Positive Folder:";
    569. //
    570. // tabPage2
    571. //
    572. this.tabPage2.Controls.Add(this.label12);
    573. this.tabPage2.Controls.Add(this.txtNegCount);
    574. this.tabPage2.Controls.Add(this.lbNegCount);
    575. this.tabPage2.Controls.Add(this.label14);
    576. this.tabPage2.Controls.Add(this.lbNegWorkFolder);
    577. this.tabPage2.Controls.Add(this.cbNegCopy);
    578. this.tabPage2.Controls.Add(this.btnNegTxt);
    579. this.tabPage2.Controls.Add(this.btnNegFolder);
    580. this.tabPage2.Controls.Add(this.txtNegFolder);
    581. this.tabPage2.Controls.Add(this.lbNegFolder);
    582. this.tabPage2.Location = new System.Drawing.Point(8, 49);
    583. this.tabPage2.Name = "tabPage2";
    584. this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
    585. this.tabPage2.Size = new System.Drawing.Size(1441, 582);
    586. this.tabPage2.TabIndex = 1;
    587. this.tabPage2.Text = "tabPage2";
    588. this.tabPage2.UseVisualStyleBackColor = true;
    589. this.tabPage2.SizeChanged += new System.EventHandler(this.tabPage2_SizeChanged);
    590. //
    591. // label12
    592. //
    593. this.label12.AutoSize = true;
    594. this.label12.Location = new System.Drawing.Point(528, 103);
    595. this.label12.Name = "label12";
    596. this.label12.Size = new System.Drawing.Size(96, 28);
    597. this.label12.TabIndex = 31;
    598. this.label12.Text = "images";
    599. //
    600. // txtNegCount
    601. //
    602. this.txtNegCount.Location = new System.Drawing.Point(298, 100);
    603. this.txtNegCount.Name = "txtNegCount";
    604. this.txtNegCount.Size = new System.Drawing.Size(215, 39);
    605. this.txtNegCount.TabIndex = 30;
    606. //
    607. // lbNegCount
    608. //
    609. this.lbNegCount.AutoSize = true;
    610. this.lbNegCount.Location = new System.Drawing.Point(48, 103);
    611. this.lbNegCount.Name = "lbNegCount";
    612. this.lbNegCount.Size = new System.Drawing.Size(236, 28);
    613. this.lbNegCount.TabIndex = 29;
    614. this.lbNegCount.Text = "Negative Images:";
    615. //
    616. // label14
    617. //
    618. this.label14.AutoSize = true;
    619. this.label14.ForeColor = System.Drawing.Color.BlueViolet;
    620. this.label14.Location = new System.Drawing.Point(292, 166);
    621. this.label14.Name = "label14";
    622. this.label14.Size = new System.Drawing.Size(110, 28);
    623. this.label14.TabIndex = 28;
    624. this.label14.Text = "label14";
    625. //
    626. // lbNegWorkFolder
    627. //
    628. this.lbNegWorkFolder.AutoSize = true;
    629. this.lbNegWorkFolder.Location = new System.Drawing.Point(104, 166);
    630. this.lbNegWorkFolder.Name = "lbNegWorkFolder";
    631. this.lbNegWorkFolder.Size = new System.Drawing.Size(180, 28);
    632. this.lbNegWorkFolder.TabIndex = 27;
    633. this.lbNegWorkFolder.Text = "Work Folder:";
    634. //
    635. // cbNegCopy
    636. //
    637. this.cbNegCopy.AutoSize = true;
    638. this.cbNegCopy.Location = new System.Drawing.Point(298, 217);
    639. this.cbNegCopy.Name = "cbNegCopy";
    640. this.cbNegCopy.Size = new System.Drawing.Size(674, 32);
    641. this.cbNegCopy.TabIndex = 26;
    642. this.cbNegCopy.Text = "Copy negative images to {Work Folder}/negdata";
    643. this.cbNegCopy.UseVisualStyleBackColor = true;
    644. //
    645. // btnNegTxt
    646. //
    647. this.btnNegTxt.Location = new System.Drawing.Point(297, 279);
    648. this.btnNegTxt.Name = "btnNegTxt";
    649. this.btnNegTxt.Size = new System.Drawing.Size(215, 74);
    650. this.btnNegTxt.TabIndex = 25;
    651. this.btnNegTxt.Text = "=> neg.txt";
    652. this.btnNegTxt.UseVisualStyleBackColor = true;
    653. this.btnNegTxt.Click += new System.EventHandler(this.btnNegTxt_Click);
    654. //
    655. // btnNegFolder
    656. //
    657. this.btnNegFolder.Location = new System.Drawing.Point(689, 44);
    658. this.btnNegFolder.Name = "btnNegFolder";
    659. this.btnNegFolder.Size = new System.Drawing.Size(223, 44);
    660. this.btnNegFolder.TabIndex = 24;
    661. this.btnNegFolder.Text = "browse...";
    662. this.btnNegFolder.UseVisualStyleBackColor = true;
    663. this.btnNegFolder.Click += new System.EventHandler(this.btnNegFolder_Click);
    664. //
    665. // txtNegFolder
    666. //
    667. this.txtNegFolder.Location = new System.Drawing.Point(298, 44);
    668. this.txtNegFolder.Name = "txtNegFolder";
    669. this.txtNegFolder.Size = new System.Drawing.Size(375, 39);
    670. this.txtNegFolder.TabIndex = 23;
    671. //
    672. // lbNegFolder
    673. //
    674. this.lbNegFolder.AutoSize = true;
    675. this.lbNegFolder.Location = new System.Drawing.Point(76, 47);
    676. this.lbNegFolder.Name = "lbNegFolder";
    677. this.lbNegFolder.Size = new System.Drawing.Size(208, 28);
    678. this.lbNegFolder.TabIndex = 22;
    679. this.lbNegFolder.Text = "Source Folder:";
    680. //
    681. // tabPage3
    682. //
    683. this.tabPage3.Controls.Add(this.cxBoost);
    684. this.tabPage3.Controls.Add(this.cxFeature);
    685. this.tabPage3.Controls.Add(this.cxMode);
    686. this.tabPage3.Controls.Add(this.txtStageNumber);
    687. this.tabPage3.Controls.Add(this.label3);
    688. this.tabPage3.Controls.Add(this.label1);
    689. this.tabPage3.Controls.Add(this.txtPosHeight);
    690. this.tabPage3.Controls.Add(this.txtPosWidth);
    691. this.tabPage3.Controls.Add(this.lbMode);
    692. this.tabPage3.Controls.Add(this.lbNumNeg);
    693. this.tabPage3.Controls.Add(this.lbNumPos);
    694. this.tabPage3.Controls.Add(this.txtTrimRate);
    695. this.tabPage3.Controls.Add(this.lbWeightTrimRate);
    696. this.tabPage3.Controls.Add(this.txtFalseAlarm);
    697. this.tabPage3.Controls.Add(this.lbMasFalseAlarmRate);
    698. this.tabPage3.Controls.Add(this.txtHitRate);
    699. this.tabPage3.Controls.Add(this.lbMinHitRate);
    700. this.tabPage3.Controls.Add(this.lbBoostType);
    701. this.tabPage3.Controls.Add(this.txtNumNeg);
    702. this.tabPage3.Controls.Add(this.txtNumPos);
    703. this.tabPage3.Controls.Add(this.lbFeatureType);
    704. this.tabPage3.Controls.Add(this.txtStage);
    705. this.tabPage3.Controls.Add(this.lbStageType);
    706. this.tabPage3.Controls.Add(this.txtNegFile);
    707. this.tabPage3.Controls.Add(this.lbBgFileName);
    708. this.tabPage3.Controls.Add(this.txtVecFile);
    709. this.tabPage3.Controls.Add(this.lbVecFileName);
    710. this.tabPage3.Controls.Add(this.txtXml);
    711. this.tabPage3.Controls.Add(this.lbCascadeDirName);
    712. this.tabPage3.Controls.Add(this.label17);
    713. this.tabPage3.Controls.Add(this.lbTrWorkFolder);
    714. this.tabPage3.Controls.Add(this.btnTrainning);
    715. this.tabPage3.Location = new System.Drawing.Point(8, 49);
    716. this.tabPage3.Name = "tabPage3";
    717. this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
    718. this.tabPage3.Size = new System.Drawing.Size(1441, 582);
    719. this.tabPage3.TabIndex = 2;
    720. this.tabPage3.Text = "tabPage3";
    721. this.tabPage3.UseVisualStyleBackColor = true;
    722. //
    723. // label1
    724. //
    725. this.label1.AutoSize = true;
    726. this.label1.Location = new System.Drawing.Point(1028, 167);
    727. this.label1.Name = "label1";
    728. this.label1.Size = new System.Drawing.Size(180, 28);
    729. this.label1.TabIndex = 60;
    730. this.label1.Text = "Sample Size:";
    731. //
    732. // txtPosHeight
    733. //
    734. this.txtPosHeight.Location = new System.Drawing.Point(1309, 164);
    735. this.txtPosHeight.Name = "txtPosHeight";
    736. this.txtPosHeight.Size = new System.Drawing.Size(88, 39);
    737. this.txtPosHeight.TabIndex = 59;
    738. //
    739. // txtPosWidth
    740. //
    741. this.txtPosWidth.Location = new System.Drawing.Point(1214, 164);
    742. this.txtPosWidth.Name = "txtPosWidth";
    743. this.txtPosWidth.Size = new System.Drawing.Size(89, 39);
    744. this.txtPosWidth.TabIndex = 58;
    745. //
    746. // lbMode
    747. //
    748. this.lbMode.AutoSize = true;
    749. this.lbMode.Location = new System.Drawing.Point(648, 404);
    750. this.lbMode.Name = "lbMode";
    751. this.lbMode.Size = new System.Drawing.Size(166, 28);
    752. this.lbMode.TabIndex = 56;
    753. this.lbMode.Text = "Train Mode:";
    754. //
    755. // lbNumNeg
    756. //
    757. this.lbNumNeg.AutoSize = true;
    758. this.lbNumNeg.Location = new System.Drawing.Point(578, 228);
    759. this.lbNumNeg.Name = "lbNumNeg";
    760. this.lbNumNeg.Size = new System.Drawing.Size(236, 28);
    761. this.lbNumNeg.TabIndex = 55;
    762. this.lbNumNeg.Text = "Negative Number:";
    763. //
    764. // lbNumPos
    765. //
    766. this.lbNumPos.AutoSize = true;
    767. this.lbNumPos.Location = new System.Drawing.Point(578, 167);
    768. this.lbNumPos.Name = "lbNumPos";
    769. this.lbNumPos.Size = new System.Drawing.Size(236, 28);
    770. this.lbNumPos.TabIndex = 54;
    771. this.lbNumPos.Text = "Positive Number:";
    772. //
    773. // txtTrimRate
    774. //
    775. this.txtTrimRate.Location = new System.Drawing.Point(298, 404);
    776. this.txtTrimRate.Name = "txtTrimRate";
    777. this.txtTrimRate.Size = new System.Drawing.Size(196, 39);
    778. this.txtTrimRate.TabIndex = 53;
    779. this.txtTrimRate.Text = "0.95";
    780. //
    781. // lbWeightTrimRate
    782. //
    783. this.lbWeightTrimRate.AutoSize = true;
    784. this.lbWeightTrimRate.Location = new System.Drawing.Point(37, 407);
    785. this.lbWeightTrimRate.Name = "lbWeightTrimRate";
    786. this.lbWeightTrimRate.Size = new System.Drawing.Size(250, 28);
    787. this.lbWeightTrimRate.TabIndex = 52;
    788. this.lbWeightTrimRate.Text = "Weight Trim Rate:";
    789. //
    790. // txtFalseAlarm
    791. //
    792. this.txtFalseAlarm.Location = new System.Drawing.Point(820, 346);
    793. this.txtFalseAlarm.Name = "txtFalseAlarm";
    794. this.txtFalseAlarm.Size = new System.Drawing.Size(158, 39);
    795. this.txtFalseAlarm.TabIndex = 51;
    796. this.txtFalseAlarm.Text = "0.5";
    797. //
    798. // lbMasFalseAlarmRate
    799. //
    800. this.lbMasFalseAlarmRate.AutoSize = true;
    801. this.lbMasFalseAlarmRate.Location = new System.Drawing.Point(513, 349);
    802. this.lbMasFalseAlarmRate.Name = "lbMasFalseAlarmRate";
    803. this.lbMasFalseAlarmRate.Size = new System.Drawing.Size(306, 28);
    804. this.lbMasFalseAlarmRate.TabIndex = 50;
    805. this.lbMasFalseAlarmRate.Text = "Max False Alarm Rate:";
    806. //
    807. // txtHitRate
    808. //
    809. this.txtHitRate.Location = new System.Drawing.Point(298, 346);
    810. this.txtHitRate.Name = "txtHitRate";
    811. this.txtHitRate.Size = new System.Drawing.Size(196, 39);
    812. this.txtHitRate.TabIndex = 49;
    813. this.txtHitRate.Text = "0.995";
    814. //
    815. // lbMinHitRate
    816. //
    817. this.lbMinHitRate.AutoSize = true;
    818. this.lbMinHitRate.Location = new System.Drawing.Point(51, 349);
    819. this.lbMinHitRate.Name = "lbMinHitRate";
    820. this.lbMinHitRate.Size = new System.Drawing.Size(236, 28);
    821. this.lbMinHitRate.TabIndex = 48;
    822. this.lbMinHitRate.Text = "Minium Hit Rate:";
    823. //
    824. // lbBoostType
    825. //
    826. this.lbBoostType.AutoSize = true;
    827. this.lbBoostType.Location = new System.Drawing.Point(648, 289);
    828. this.lbBoostType.Name = "lbBoostType";
    829. this.lbBoostType.Size = new System.Drawing.Size(166, 28);
    830. this.lbBoostType.TabIndex = 46;
    831. this.lbBoostType.Text = "Boost Type:";
    832. //
    833. // txtNumNeg
    834. //
    835. this.txtNumNeg.Location = new System.Drawing.Point(820, 225);
    836. this.txtNumNeg.Name = "txtNumNeg";
    837. this.txtNumNeg.Size = new System.Drawing.Size(158, 39);
    838. this.txtNumNeg.TabIndex = 43;
    839. //
    840. // txtNumPos
    841. //
    842. this.txtNumPos.Location = new System.Drawing.Point(820, 161);
    843. this.txtNumPos.Name = "txtNumPos";
    844. this.txtNumPos.Size = new System.Drawing.Size(158, 39);
    845. this.txtNumPos.TabIndex = 42;
    846. //
    847. // lbFeatureType
    848. //
    849. this.lbFeatureType.AutoSize = true;
    850. this.lbFeatureType.Location = new System.Drawing.Point(1017, 289);
    851. this.lbFeatureType.Name = "lbFeatureType";
    852. this.lbFeatureType.Size = new System.Drawing.Size(194, 28);
    853. this.lbFeatureType.TabIndex = 40;
    854. this.lbFeatureType.Text = "Feature Type:";
    855. //
    856. // txtStage
    857. //
    858. this.txtStage.Location = new System.Drawing.Point(298, 286);
    859. this.txtStage.Name = "txtStage";
    860. this.txtStage.ReadOnly = true;
    861. this.txtStage.Size = new System.Drawing.Size(196, 39);
    862. this.txtStage.TabIndex = 39;
    863. this.txtStage.Text = "BOOST";
    864. //
    865. // lbStageType
    866. //
    867. this.lbStageType.AutoSize = true;
    868. this.lbStageType.Location = new System.Drawing.Point(121, 289);
    869. this.lbStageType.Name = "lbStageType";
    870. this.lbStageType.Size = new System.Drawing.Size(166, 28);
    871. this.lbStageType.TabIndex = 38;
    872. this.lbStageType.Text = "Stage Type:";
    873. //
    874. // txtNegFile
    875. //
    876. this.txtNegFile.Location = new System.Drawing.Point(298, 225);
    877. this.txtNegFile.Name = "txtNegFile";
    878. this.txtNegFile.Size = new System.Drawing.Size(196, 39);
    879. this.txtNegFile.TabIndex = 37;
    880. this.txtNegFile.Text = "neg.txt";
    881. //
    882. // lbBgFileName
    883. //
    884. this.lbBgFileName.AutoSize = true;
    885. this.lbBgFileName.Location = new System.Drawing.Point(23, 228);
    886. this.lbBgFileName.Name = "lbBgFileName";
    887. this.lbBgFileName.Size = new System.Drawing.Size(264, 28);
    888. this.lbBgFileName.TabIndex = 36;
    889. this.lbBgFileName.Text = "Negative Filename:";
    890. //
    891. // txtVecFile
    892. //
    893. this.txtVecFile.Location = new System.Drawing.Point(298, 161);
    894. this.txtVecFile.Name = "txtVecFile";
    895. this.txtVecFile.Size = new System.Drawing.Size(196, 39);
    896. this.txtVecFile.TabIndex = 35;
    897. this.txtVecFile.Text = "pos.vec";
    898. //
    899. // lbVecFileName
    900. //
    901. this.lbVecFileName.AutoSize = true;
    902. this.lbVecFileName.Location = new System.Drawing.Point(51, 164);
    903. this.lbVecFileName.Name = "lbVecFileName";
    904. this.lbVecFileName.Size = new System.Drawing.Size(236, 28);
    905. this.lbVecFileName.TabIndex = 34;
    906. this.lbVecFileName.Text = "Vector Filename:";
    907. //
    908. // txtXml
    909. //
    910. this.txtXml.Location = new System.Drawing.Point(298, 100);
    911. this.txtXml.Name = "txtXml";
    912. this.txtXml.Size = new System.Drawing.Size(196, 39);
    913. this.txtXml.TabIndex = 33;
    914. this.txtXml.Text = "xml";
    915. //
    916. // lbCascadeDirName
    917. //
    918. this.lbCascadeDirName.AutoSize = true;
    919. this.lbCascadeDirName.Location = new System.Drawing.Point(28, 103);
    920. this.lbCascadeDirName.Name = "lbCascadeDirName";
    921. this.lbCascadeDirName.Size = new System.Drawing.Size(264, 28);
    922. this.lbCascadeDirName.TabIndex = 32;
    923. this.lbCascadeDirName.Text = "Parameters Folder:";
    924. //
    925. // label17
    926. //
    927. this.label17.AutoSize = true;
    928. this.label17.ForeColor = System.Drawing.Color.BlueViolet;
    929. this.label17.Location = new System.Drawing.Point(293, 44);
    930. this.label17.Name = "label17";
    931. this.label17.Size = new System.Drawing.Size(110, 28);
    932. this.label17.TabIndex = 31;
    933. this.label17.Text = "label17";
    934. //
    935. // lbTrWorkFolder
    936. //
    937. this.lbTrWorkFolder.AutoSize = true;
    938. this.lbTrWorkFolder.Location = new System.Drawing.Point(107, 44);
    939. this.lbTrWorkFolder.Name = "lbTrWorkFolder";
    940. this.lbTrWorkFolder.Size = new System.Drawing.Size(180, 28);
    941. this.lbTrWorkFolder.TabIndex = 30;
    942. this.lbTrWorkFolder.Text = "Work Folder:";
    943. //
    944. // btnTrainning
    945. //
    946. this.btnTrainning.Location = new System.Drawing.Point(298, 467);
    947. this.btnTrainning.Name = "btnTrainning";
    948. this.btnTrainning.Size = new System.Drawing.Size(274, 74);
    949. this.btnTrainning.TabIndex = 29;
    950. this.btnTrainning.Text = "=> Cascade.xml";
    951. this.btnTrainning.UseVisualStyleBackColor = true;
    952. this.btnTrainning.Click += new System.EventHandler(this.btnTrainning_Click);
    953. //
    954. // panel2
    955. //
    956. this.panel2.Controls.Add(this.webBrowser1);
    957. this.panel2.Location = new System.Drawing.Point(13, 707);
    958. this.panel2.Name = "panel2";
    959. this.panel2.Size = new System.Drawing.Size(1173, 256);
    960. this.panel2.TabIndex = 1;
    961. //
    962. // webBrowser1
    963. //
    964. this.webBrowser1.Location = new System.Drawing.Point(15, 33);
    965. this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
    966. this.webBrowser1.Name = "webBrowser1";
    967. this.webBrowser1.Size = new System.Drawing.Size(880, 240);
    968. this.webBrowser1.TabIndex = 0;
    969. //
    970. // label2
    971. //
    972. this.label2.AutoSize = true;
    973. this.label2.Location = new System.Drawing.Point(59, 309);
    974. this.label2.Name = "label2";
    975. this.label2.Size = new System.Drawing.Size(236, 28);
    976. this.label2.TabIndex = 46;
    977. this.label2.Text = "Unity Extension:";
    978. //
    979. // txtStageNumber
    980. //
    981. this.txtStageNumber.Location = new System.Drawing.Point(1214, 401);
    982. this.txtStageNumber.Name = "txtStageNumber";
    983. this.txtStageNumber.Size = new System.Drawing.Size(89, 39);
    984. this.txtStageNumber.TabIndex = 62;
    985. this.txtStageNumber.Text = "20";
    986. //
    987. // label3
    988. //
    989. this.label3.AutoSize = true;
    990. this.label3.Location = new System.Drawing.Point(1014, 404);
    991. this.label3.Name = "label3";
    992. this.label3.Size = new System.Drawing.Size(194, 28);
    993. this.label3.TabIndex = 61;
    994. this.label3.Text = "Stage Number:";
    995. //
    996. // cxMode
    997. //
    998. this.cxMode.FormattingEnabled = true;
    999. this.cxMode.Items.AddRange(new object[] {
    1000. "BASIC",
    1001. "CORE",
    1002. "ALL"});
    1003. this.cxMode.Location = new System.Drawing.Point(820, 401);
    1004. this.cxMode.Name = "cxMode";
    1005. this.cxMode.Size = new System.Drawing.Size(158, 36);
    1006. this.cxMode.TabIndex = 63;
    1007. //
    1008. // cxFeature
    1009. //
    1010. this.cxFeature.FormattingEnabled = true;
    1011. this.cxFeature.Items.AddRange(new object[] {
    1012. "HAAR",
    1013. "LBP",
    1014. "HOG"});
    1015. this.cxFeature.Location = new System.Drawing.Point(1214, 286);
    1016. this.cxFeature.Name = "cxFeature";
    1017. this.cxFeature.Size = new System.Drawing.Size(183, 36);
    1018. this.cxFeature.TabIndex = 64;
    1019. //
    1020. // cxBoost
    1021. //
    1022. this.cxBoost.FormattingEnabled = true;
    1023. this.cxBoost.Items.AddRange(new object[] {
    1024. "GAB",
    1025. "RAB",
    1026. "DAB",
    1027. "LB"});
    1028. this.cxBoost.Location = new System.Drawing.Point(820, 284);
    1029. this.cxBoost.Name = "cxBoost";
    1030. this.cxBoost.Size = new System.Drawing.Size(158, 36);
    1031. this.cxBoost.TabIndex = 65;
    1032. //
    1033. // Form1
    1034. //
    1035. this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
    1036. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    1037. this.ClientSize = new System.Drawing.Size(1771, 975);
    1038. this.Controls.Add(this.panel2);
    1039. this.Controls.Add(this.panel1);
    1040. this.Name = "Form1";
    1041. this.Text = "Form1";
    1042. this.Load += new System.EventHandler(this.Form1_Load);
    1043. this.panel1.ResumeLayout(false);
    1044. this.tabControl1.ResumeLayout(false);
    1045. this.tpNormalize.ResumeLayout(false);
    1046. this.tpNormalize.PerformLayout();
    1047. this.tabPage1.ResumeLayout(false);
    1048. this.tabPage1.PerformLayout();
    1049. this.tabPage2.ResumeLayout(false);
    1050. this.tabPage2.PerformLayout();
    1051. this.tabPage3.ResumeLayout(false);
    1052. this.tabPage3.PerformLayout();
    1053. this.panel2.ResumeLayout(false);
    1054. this.ResumeLayout(false);
    1055. }
    1056. #endregion
    1057. private System.Windows.Forms.Panel panel1;
    1058. private System.Windows.Forms.TabControl tabControl1;
    1059. private System.Windows.Forms.TabPage tabPage1;
    1060. private System.Windows.Forms.TabPage tabPage2;
    1061. private System.Windows.Forms.TabPage tabPage3;
    1062. private System.Windows.Forms.TabPage tpNormalize;
    1063. private System.Windows.Forms.Panel panel2;
    1064. private System.Windows.Forms.WebBrowser webBrowser1;
    1065. private System.Windows.Forms.Button btnPosTxt;
    1066. private System.Windows.Forms.Label label5;
    1067. private System.Windows.Forms.TextBox txtSampleHeight;
    1068. private System.Windows.Forms.TextBox txtSampleWidth;
    1069. private System.Windows.Forms.Label lbSample;
    1070. private System.Windows.Forms.Label label4;
    1071. private System.Windows.Forms.TextBox txtOriginY;
    1072. private System.Windows.Forms.TextBox txtOriginX;
    1073. private System.Windows.Forms.Label lbOriginal;
    1074. private System.Windows.Forms.TextBox txtSampleCount;
    1075. private System.Windows.Forms.Label lbSampleCount;
    1076. private System.Windows.Forms.Button btnPosFolder;
    1077. private System.Windows.Forms.TextBox txtPosFolder;
    1078. private System.Windows.Forms.Label lbPosFolder;
    1079. private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
    1080. private System.Windows.Forms.Button btnPosVec;
    1081. private System.Windows.Forms.CheckBox cbPosCopy;
    1082. private System.Windows.Forms.Label label7;
    1083. private System.Windows.Forms.Label lbWorkFolderValue;
    1084. private System.Windows.Forms.Label lbWorkFolder;
    1085. private System.Windows.Forms.Label label11;
    1086. private System.Windows.Forms.TextBox txtPosCount;
    1087. private System.Windows.Forms.Label lbPosCount;
    1088. private System.Windows.Forms.Label label12;
    1089. private System.Windows.Forms.TextBox txtNegCount;
    1090. private System.Windows.Forms.Label lbNegCount;
    1091. private System.Windows.Forms.Label label14;
    1092. private System.Windows.Forms.Label lbNegWorkFolder;
    1093. private System.Windows.Forms.CheckBox cbNegCopy;
    1094. private System.Windows.Forms.Button btnNegTxt;
    1095. private System.Windows.Forms.Button btnNegFolder;
    1096. private System.Windows.Forms.TextBox txtNegFolder;
    1097. private System.Windows.Forms.Label lbNegFolder;
    1098. private System.Windows.Forms.Label lbMode;
    1099. private System.Windows.Forms.Label lbNumNeg;
    1100. private System.Windows.Forms.Label lbNumPos;
    1101. private System.Windows.Forms.TextBox txtTrimRate;
    1102. private System.Windows.Forms.Label lbWeightTrimRate;
    1103. private System.Windows.Forms.TextBox txtFalseAlarm;
    1104. private System.Windows.Forms.Label lbMasFalseAlarmRate;
    1105. private System.Windows.Forms.TextBox txtHitRate;
    1106. private System.Windows.Forms.Label lbMinHitRate;
    1107. private System.Windows.Forms.Label lbBoostType;
    1108. private System.Windows.Forms.TextBox txtNumNeg;
    1109. private System.Windows.Forms.TextBox txtNumPos;
    1110. private System.Windows.Forms.Label lbFeatureType;
    1111. private System.Windows.Forms.TextBox txtStage;
    1112. private System.Windows.Forms.Label lbStageType;
    1113. private System.Windows.Forms.TextBox txtNegFile;
    1114. private System.Windows.Forms.Label lbBgFileName;
    1115. private System.Windows.Forms.TextBox txtVecFile;
    1116. private System.Windows.Forms.Label lbVecFileName;
    1117. private System.Windows.Forms.TextBox txtXml;
    1118. private System.Windows.Forms.Label lbCascadeDirName;
    1119. private System.Windows.Forms.Label label17;
    1120. private System.Windows.Forms.Label lbTrWorkFolder;
    1121. private System.Windows.Forms.Button btnTrainning;
    1122. private System.Windows.Forms.CheckBox cbNumericName;
    1123. private System.Windows.Forms.TextBox txtSaveExt;
    1124. private System.Windows.Forms.CheckBox cbGray;
    1125. private System.Windows.Forms.Button btnNormalize;
    1126. private System.Windows.Forms.Label label35;
    1127. private System.Windows.Forms.TextBox txtSaveHeight;
    1128. private System.Windows.Forms.TextBox txtSaveWidth;
    1129. private System.Windows.Forms.Label label33;
    1130. private System.Windows.Forms.TextBox txtFromHeight;
    1131. private System.Windows.Forms.TextBox txtFromWidth;
    1132. private System.Windows.Forms.Button btnSave;
    1133. private System.Windows.Forms.TextBox txtSave;
    1134. private System.Windows.Forms.Label lbSave;
    1135. private System.Windows.Forms.Button btnFrom;
    1136. private System.Windows.Forms.TextBox txtFrom;
    1137. private System.Windows.Forms.Label lbFrom;
    1138. private System.Windows.Forms.ProgressBar progressBar1;
    1139. private System.Windows.Forms.TextBox txtBgColor;
    1140. private System.Windows.Forms.Label lbBgColor;
    1141. private System.Windows.Forms.Label label1;
    1142. private System.Windows.Forms.TextBox txtPosHeight;
    1143. private System.Windows.Forms.TextBox txtPosWidth;
    1144. private System.Windows.Forms.Label label2;
    1145. private System.Windows.Forms.TextBox txtStageNumber;
    1146. private System.Windows.Forms.Label label3;
    1147. private System.Windows.Forms.ComboBox cxFeature;
    1148. private System.Windows.Forms.ComboBox cxMode;
    1149. private System.Windows.Forms.ComboBox cxBoost;
    1150. }
    1151. }

    以上代码经验证可用,继续享受编程的乐趣吧。

  • 相关阅读:
    gin 基本使用
    Vue中的跨域解决方案
    [ARM入门]ARM模式及其切换、异常
    【学习记录】实例分割的发展与区别
    单源最短路径
    第二章 算法
    「PAT甲级真题解析」Advanced Level 1008 Elevator
    建站过程中的踩坑记录:自定义域名、百度收录与备案
    Linux TC 流量控制介绍
    将网站域名访问从http升级到https(腾讯云/阿里云)
  • 原文地址:https://blog.csdn.net/beijinghorn/article/details/125556516