image
新增專案名稱 “CameraCapture”加入 references Emgu.CV Emgu.CV.UI Emgu.Util from directory C:\Emgu\emgucv-windows-universal-cuda 3.0.0.2158\bin
 1: using System;
 2: using System.Collections.Generic;
 3: using System.ComponentModel;
 4: using System.Data;
 5: using System.Drawing;
 6: using System.Linq;
 7: using System.Text;
 8: using System.Windows.Forms;
 9:  
 10: using Emgu.CV;
 11: using Emgu.CV.CvEnum;
 12: using Emgu.CV.Structure;
 13: using Emgu.Util;

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
以下為EMGU Multiple Face Recognition using PCA and Parallel Optimisation筆記在此, 我會試著用 libemgucv-windows-universal-cuda-2.4.10.1940版本測試, 因為在上去3.0版本並不支援FaceRecognizer==========================================================
如果你是第一次使用Emgu CV, 請參考Creating Your First EMGU Image Processing Project article人臉辨識是以Multiple face detection and recognition in real time為基礎

me1237guy 發表在 痞客邦 留言(2) 人氣()

image
以下是我研究這篇技術文件的筆記 Emgu CV -Select ROI (Region Of Interest) With Mouse C#
修改部分1. 多了一個影像備份(Clone), 加快裁剪的速度; 原作者是從檔案直接再讀一次, 當載入的圖片比較大(如8192x8192)時就會發現速度超慢!2. 下圖中最右邊, 裁剪的影像外框會有紅色ROI, 已經拿掉 展示人機介面如下:1. 先拉一個splitContainer(水平), 在拉兩個splitContainer(垂直)

me1237guy 發表在 痞客邦 留言(10) 人氣()

image
加入索引標籤, 輸入 EmguCV選擇項目.NET Framework元件頁面, 點選<瀏覽>C:\Emgu\emgucv-windows-universal-cuda 3.0.0.2158\bin選擇Emgu.Util.dll開啟後, 可以在EmguCV看到新增的四個.NET framework元件

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
Emgu CV版本: libemgucv-windows-universal-cuda-3.0.0.2158

可參考: 安裝libemgucv-windows-universal-cuda-3.0.0.2131


me1237guy 發表在 痞客邦 留言(1) 人氣()

image
3xN陣列, 每一列的長度隨機
 1: int[][] x = new int[3][];
 2: Random r = new Random();
 3: for (int i = 0; i < x.Length; i++)
 4: {
 5: int len = r.Next() % 5 + 1;
 6: x[i] = new int[len];
 7: Console.WriteLine("i = {0}, len = {1}", i, len);
 8: for (int j = 0; j < x[i].Length; j++)
 9: {
 10: x[i][j] = r.Next() % 10;
 11: Console.WriteLine("x[{0}][{1}] = {2}", i, j, x[i][j]);
 12: }
 13: }

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
1 public class iArray : IComparable
2 {
3 private int x, y;
4 public iArray()
5 {
6 x = 0; y = 0;
7 }
8 public iArray(int ix, int iy)
9 {
10 x = ix;
11 y = iy;
12 }
13 public void Show()
14 {
15 Console.WriteLine("({0}.{1})", x, y);
16 }
17 int IComparable.CompareTo(object obj)
18 {
19 iArray v = (iArray)obj;
20 return (x * x + y * y) - (v.x * v.x + v.y * v.y);
21 }
22 }

測試
1 class Program
2 {
3 static void Main(string[] args)
4 {
5 iArray[] vec = { new iArray(20, 10),
6 new iArray(50, 20),
7 new iArray(90, 40),
8 new iArray(10, 10),
9 new iArray(40, 30)};
10 Console.WriteLine("排序前...");
11 foreach (iArray v in vec)
12 {
13 v.Show();
14 }
15
16 Console.WriteLine("排序後(ascending)...");
17 Array.Sort(vec);
18 foreach (iArray v in vec)
19 {
20 v.Show();
21 }
22 Console.WriteLine("排序後(descending)...");
23 Array.Reverse(vec);
24 foreach (iArray v in vec)
25 {
26 v.Show();
27 }
28
29 Console.Read();
30 }
31 }

1 public class iArray : IComparable
2 {
3 private int x, y;
4 public iArray()
5 {
6 x = 0; y = 0;
7 }
8 public iArray(int ix, int iy)
9 {
10 x = ix;
11 y = iy;
12 }
13 public void Show()
14 {
15 Console.WriteLine("({0}.{1})", x, y);
16 }
17 int IComparable.CompareTo(object obj)
18 {
19 iArray v = (iArray)obj;
20 return (x * x + y * y) - (v.x * v.x + v.y * v.y);
21 }
22 }

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
virtual 虛擬方法,若希望或預料到基礎類別的這個方法在將來的衍生類別中會被覆寫(override),則此方法必須被聲明為 virtual。
1 class Employee
2 {
3 protected int m_salary;
4 public virtual int Salary
5 {
6 get
7 {
8 return m_salary;
9 }
10 set
11 {
12 if (value >= 22000 & value <= 42000)
13 {
14 m_salary = value;
15 }
16 else
17 {
18 if (value < 22000)
19 m_salary = 22000;
20 else
21 m_salary = 42000;
22 }
23 }
24 }
25 public void showTotal()
26 {
27 Console.WriteLine("實領薪水{0}", m_salary);
28 }
29 }
Operator薪水繼承Employee, 基本上薪水上下限的規則不變(與父類別相同)
1 class Operator : Employee
2 {
3 public override int Salary
4 {
5 get
6 {
7 return base.Salary;
8 }
9 set
10 {
11 if (value >= 22000 & value <= 42000)
12 {
13 m_salary = value;
14 }
15 else
16 {
17 if (value < 22000)
18 m_salary = 22000;
19 else
20 m_salary = 42000;
21 }
22 }
23 }
24 }
1 class Operator : Employee
2 {
3 public override int Salary
4 {
5 get
6 {
7 return base.Salary;
8 }
9 set
10 {
11 base.Salary = value;
12 }
13 }
14 }

me1237guy 發表在 痞客邦 留言(0) 人氣()

試用版 Evaluation Applications Open_eVision_Eval_1_2_5_8535.exe 須先註冊一個帳號, 登錄後才能下載檔案  
       

Open eVision 1.2.5.8549

 

Description

File format

File size

Files

Getting Started

PDF

0.6 MB

Download here

Release Notes

PDF

0.6 MB

Download here

Installation Files

Development Tools

EXE

164 MB

Download here

Libraries 32-bit

EXE

88 MB

Download here

Libraries 64-bit

EXE

74 MB

Download here

Documentation

C++

PDF

39 MB

Download here

.NET

PDF

39 MB

Download here

ActiveX

PDF

39 MB

Download here

Migration Guide

PDF

0.5 MB

Download here

Project sample

ZIP

61 KB

Download here

Application Samples

Clinical Analysis

ZIP

1.6 MB

Download here

Fuse Inspection

ZIP

2.3 MB

Download here

OCR

ZIP

4.2 MB

Download here

支援作業系統

image

 

me1237guy 發表在 痞客邦 留言(0) 人氣()

image

以zip和rar為例說明 strategy pattern

 1: public abstract class CompressAlg
 2: {
 3: public abstract void Compress();
 4: public abstract void Uncompress();
 5: ~CompressAlg()
 6: {
 7: MessageBox.Show("Object release", "~FileProcessor()");
 8: }
 9: }

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
如果把相關的演算法全都寫入同一個物件, 然後利用條件式判斷(if or switch)來判斷所要執行的版本 但這樣有一些缺點 1. 程式碼容易變得龐大複雜, 不容易修改 2. 記憶體效能降低, 因為物件包含全部的演算法 3. 擴充新的演算法或是改良版演算法(modified xxx algorithm)必須動到既有的程式碼

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
Vimba Viewer: 看圖軟體 Vimba Quickstart Guide Development: 支援C, C++, 和.NET 範例程式 Third-party applications: 支援GenICam 以及AVT Cognex Adapter Detected Cameras偵測目前已安裝的攝影機清單

me1237guy 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。