2012年12月30日 星期日

Kinect SDK - (1) Kinect Sensor安裝及使用

  1. 下載及安裝the Kinect for Windows SDK
  2. Kinect Sensor硬體簡介
    • Kinect Sensor包含以下功能:
      • RGB Camera - 支援解析度640x480 at 30 FPS的鏡頭
      • 3D Depth Sensors - 透過左右兩圈紅外線偵測器,取得目標前後移動的距離
      • Motorized Tilt -  傾斜度調整,可上下調整27度,以最佳方式偵測目標整體
      • Multi-Array Microphone - 包含四個角度的麥克風陣列,藉以判斷聲音的來源方向及遠近
  3. Device manager- 裝置管理員
    • 安裝完Kinect for Windows SDK及從USB端接上Kinect 硬體後,裝置管理員會出現以下三個裝置:
      • Audio Microphone
        • 可透過控制台→音效 管理,錄音的分頁裡,看到四個麥克風陣列
        • 可以透過 "錄音機" 程式測試麥克風的收音狀況
      • 增加語音辨識功能
      • 由於Kinect為陣列麥克風,因此將其它麥克風裝置設置成 "Other"
      • 當語音辨識功能啟動時,畫面會出現以下小工具:

完整說明:http://channel9.msdn.com/Series/KinectSDKQuickstarts/Understanding-Kinect-Hardware

    2012年12月29日 星期六

    Kinect SDK - (2) 設定開發環境-Setting Up Your Development Environment

    1. Download Sample Requirements
    2. Setting up a new Visual Studio 2010 Project
      • 於VS2010 新增 以Windows Presentation Foundation為版本的new project
      • Add references
        • For C#
        • For Visual Basic
      • 在Add Reference對話框,切換至.NET分頁,選取Microsoft.Research.Kinect (版本:1.0.0.45)
      • 新增 using statement
        • C#
          • using Microsoft.Research.Kinect.Nui;
            using Microsoft.Research.Kinect.Audio;
        • Visual Basic
          • Imports Microsoft.Research.Kinect.Nui
            Imports Microsoft.Research.Kinect.Audio
      • Optional: Using the Coding4Fun Kinect Toolkit
        • 下載Coding4Fun - http://c4fkinect.codeplex.com
        • 載入DLL檔: (WPF 或 Windows Form application應載入不同檔案)
          • WPF Applications: use the Coding4Fun.Kinect.Wpf.dll
            • // if you're using WPF
              using Coding4Fun.Kinect.Wpf;
              // if you're using WinForms
              using Coding4Fun.Kinect.WinForm;
          • Windows Form Applications: use the Coding4Fun.Kinect.WinForm.dll
            • ' if you're using WPF
              Imports Coding4Fun.Kinect.Wpf
              ' if you're using WinForms
              Imports Coding4Fun.Kinect.WinForm
    3. 初始化及解除 - Initializing and Uninitializing the runtime
      • For NUI (Nature User Interface),需要初始化物件,以下的範例利用"Window_Loaded event"來初始化及"Windows_Closed event"解除:
        • Create the Window_Loaded event
          • 到屬性視窗(properties window - F4),選擇"MainWindow"→"Events tab"→雙擊"Loaded"物件來新增"Window_Loaded event"。
          • Initializing the runtime
            • Create a new Runtime variable named “nui” outside of the Window_Loaded event. When the Window_Loaded event fires, we will call the SetupKinect method that checks to see if there is at least one Kinect plugged in, and if there is, it uses the first Kinect (0 representing the first Kinect) and initializes the Runtime (more details on that later). 
            • C#
              //Kinect Runtime
              Runtime nui;private void Window_Loaded(object sender, RoutedEventArgs e)
              {
              SetupKinect();
              }private void SetupKinect()
              {
              if (Runtime.Kinects.Count == 0)
              {
              this.Title = "No Kinect connected";
              }
              else
              {
              //use first Kinect
              nui = Runtime.Kinects[0];
              nui.Initialize(RuntimeOptions.UseColor | RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseSkeletalTracking);
              }
              }
            • Visual Basic
              'Kinect Runtime
              Private nui As Runtime
              Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
              SetupKinect() AddHandler Runtime.Kinects.StatusChanged, AddressOf Kinects_StatusChanged
              End Sub Private Sub SetupKinect()
              If Runtime.Kinects.Count = 0 Then
              Me.Title = "No Kinect connected"
              Else
              'use first Kinect
              nui = Runtime.Kinects(0)
              nui.Initialize(RuntimeOptions.UseColor Or RuntimeOptions.UseDepthAndPlayerIndex Or RuntimeOptions.UseSkeletalTracking)
              End If
              End Sub
          • Handling multiple Kinects
            • You can see how many Kinects are connected by getting the count of Kinects as shown in the code below. Note that for multiple Kinects, you can only have one Kinect do skeletal tracking at a time (color and depth camera work for all) and each Kinect needs to be in its own USB hub, otherwise it won’t have enough USB bandwidth.
            • C#
              [code lang=”csharp”]
              int KinectCount = Runtime.Kinects.Count;
              [/code]
            • Visual Basic
            • [code lang=”vb”]
              Dim KinectCount as Integer = Runtime.Kinects.Count
              [/code]
          • Handling Kinect Status Change events
            • You can also handle events when the status changes for Kinects that are plugged in. To do this, first register for the StatusChanged event as shown below. When this event fires, it returns a KinectStatus enum with the following possible values: Connected, Error, Disconnected, NotReady, or NotPowered.
            • C#
              [code lang=”csharp”]
              Runtime.Kinects.StatusChanged += new EventHandler<StatusChangedEventArgs>(Kinects_StatusChanged);
              void Kinects_StatusChanged(object sender, StatusChangedEventArgs e)
              {
              string message = "Status Changed: ";
              switch (e.Status)
              {
              case KinectStatus.Connected:
              message += "Connected";
              break;
              case KinectStatus.Disconnected:
              message += "Disconnected";
              break;
              case KinectStatus.Error:
              message += "Error";
              break;
              case KinectStatus.NotPowered:
              message += "Not Powered";
              break;
              case KinectStatus.NotReady:
              message += "Not Ready";
              break;
              default:
              if (e.Status.HasFlag(KinectStatus.Error))
              {
              message += "Kinect error";
              }
              break;
              }
              this.Title = message;
              }
              [/code]
            • Visual Basic
              [code lang=”vb”]
              AddHandler Runtime.Kinects.StatusChanged, AddressOf Kinects_StatusChanged

              Private Sub Kinects_StatusChanged(sender As Object, e As StatusChangedEventArgs)
              Dim message As String = "Status Changed: "
              Select Case e.Status
              Case KinectStatus.Connected
              message += "Connected"
              Exit Select
              Case KinectStatus.Disconnected
              message += "Disconnected"
              Exit Select
              Case KinectStatus.[Error]
              message += "Error"
              Exit Select
              Case KinectStatus.NotPowered
              message += "Not Powered"
              Exit Select
              Case KinectStatus.NotReady
              message += "Not Ready"
              Exit Select
              Case Else
              If e.Status.HasFlag(KinectStatus.[Error]) Then
              message += "Kinect error"
              End If
              Exit Select
              End Select
              Me.Title = message

              End Sub

              [/code]
          • Setting Runtime Options
            In the Window_Loaded event, initialize the runtime with the options you want to use. For this example, set RuntimeOptions.UseColor to use the RGB camera:
            C#
            nui.Initialize(RuntimeOptions.UseColor);
            Visual Basic
            nui.Initialize(RuntimeOptions.UseColor)
            RuntimeOptions is a Flag enumeration, this means you can set multiple options as parameters in the Initialize method by separating them with the pipe "|" character (the "or" operator) in c# or the "Or" operator in Visual Basic. The example below sets the runtime to use the color camera, a depth camera, and skeletal tracking:
            C#
            nui.Initialize(RuntimeOptions.UseColor | RuntimeOptions.UseDepthAndPlayerIndex | RuntimeOptions.UseSkeletalTracking
            Visual Basic
            nui.Initialize(RuntimeOptions.UseColor Or RuntimeOptions.UseDepthAndPlayerIndex Or RuntimeOptions.UseSkeletalTracking
        • Uninitializing the Runtime
          • Remember that when you are done using the Kinect Runtime, you should call the Uninitialize method. For a WPF application, you would typically do this in the Windows_Closed event:
            C#
            nui.Uninitialize();
            Visual Basic
            nui.Uninitialize()
      Reference to: http://channel9.msdn.com/Series/KinectSDKQuickstarts/Getting-Started

      2012年12月28日 星期五

      Windows 7 AppLocker 執行概觀

      Windows 7 AppLocker 執行概觀
      更新日期: 2010年1月
      適用於: Windows 7
      本主題提供 AppLocker 的簡介,這是 Windows 7 中的新應用程式控制功能,有助於防止在組織網路內執行垃圾應用程式和未知應用程式,同時提供安全、可操作及符合規範的優點。
      如需完整的 Windows 7 資源、文章、示範及指導,請瀏覽 Windows 用戶端 TechCenter 上的 Windows 7 的 Springboard Series

      簡介

      一般桌上型電腦的軟體組態常會因為安裝和執行非標準或未核准的軟體,而變得與其預期或初始的狀態不同。使用者會從住家、網際網路下載、點對點檔案分享及經由電子郵件安裝軟體,結果使得惡意軟體感染率更高、支援部門協助的機會更多,以及更難以確認您的桌上型電腦只執行核准、已授權的軟體。此外,公司生產力會降低。因此,許多組織想要透過不同的鎖定計劃 (包括限制系統管理員認證),嘗試在他們的桌上型電腦環境中施加更多控制。建議以標準使用者 (非系統管理員) 的身分執行,因為這有助於限制可以在桌上型電腦環境進行的組態變更,不過,以標準使用者身分執行並不會防止在您的組織中安裝或執行未知軟體或垃圾軟體。

      在 Windows XP 及 Windows Vista 中的「軟體限制原則」(SRP) 提供 IT 系統管理員一個定義與強制執行應用程式控制原則的機制。不過,SRP 在一個非常動態的桌上型電腦環境 (應用程式可能經常需要安裝及更新) 中可能變成管理負擔,因為應用程式控制原則主要是使用雜湊規則。如果使用雜湊規則,每次應用程式更新時,就需要建立一個新的雜湊規則。

      Windows 7 AppLocker

      Windows 7 引進 AppLocker 處理企業中不斷增加的應用程式控制解決方案需求:簡單且靈活的機制,允許系統管理員明確地指定允許在他們桌面環境中執行的程式。因此,AppLocker 提供的不只是安全性保護,還有操作方面及符合規範的優點,其方法是,讓系統管理員:
      • 防止未授權的軟體在您的桌上型電腦環境下執行 (如果該軟體不在允許清單中)
      • 防止易受攻擊且未經授權的應用程式在您的桌上型電腦環境下執行,包含惡意軟體
      • 禁止使用者執行非必要性消耗網路頻寬,或任何可能影響企業運算環境的應用程式
      • 防止使用者執行使他們桌上型電腦環境不穩定且增加支援人員支援成本的應用程式
      • 針對有效的桌面設定管理,提供更多選擇
      • 允許使用者根據原則執行核准的應用程式和軟體更新,同時保留只有具有系統管理認證的使用者可以安裝或執行應用程式和軟體更新的需求
      • 協助確保桌上型電腦環境符合企業原則及業界法規
      AppLocker 透過兩個規則動作提供簡單且強大的結構:允許和拒絕。它也提供一種方法來識別這些動作的例外。「允許規則動作」限定允許清單中的應用程式才可執行,並封鎖其他所有程式。「拒絕規則動作」採用相反的方法,並允許執行拒絕之應用程式清單以外的任何應用程式。許多企業可能會使用允許動作及拒絕動作的組合,而理想的 AppLocker 部署則使用允許規則動作結合內建的例外。例外規則允許您排除一般包含於允許或拒絕規則動作中的檔案。您可以使用例外建立「允許執行所有在 Windows 作業系統中的程式,除了內建的遊戲之外」規則。使用允許規則動作結合例外,提供完備的方法建立應用程式的允許清單,而不需要建立過多的規則。
      AppLocker 引進以應用程式數位簽章為基礎的發行者規則。發行者規則可以指定如應用程式版本的屬性,以建立可在應用程式更新後使用的規則。例如,組織可以建立「如果是由軟體發行者 Adobe 簽署的話,允許執行 Acrobat Reader 9.0 以上的所有版本」規則。現在當 Adobe 更新 Acrobat 時,您可以部署應用程式更新,而不需要為了新版應用程式建立另一個規則。
      AppLocker 支援多個可獨立設定的原則,稱為規則集合:可執行檔、安裝程式、指令碼和 DLL。多重集合可以讓組織建立的規則超越傳統僅限執行檔的解決方案,提供更靈活及增強的保護。例如,組織可以建立「只要 Adobe Photoshop 版本仍為 14.*,則允許繪圖安全性群組執行來自 Adobe 的 Photoshop 安裝程式或應用程式」規則。這允許 IT 系統管理員保留控制,但允許使用者根據其商務需求,將其電腦保持為最新狀態。除此之外,在開始封鎖應用程式執行及可能影響使用者效率之前,可以分別將每個原則放在僅限稽核模式中以測試您的規則。
      AppLocker 規則可以和組織中特定的使用者或群組設定關聯。這可以提供特定的控制,藉由驗證及強制執行可以執行特定應用程式的使用者,讓您符合規範的需求。例如,您可以建立「允許財務安全性群組中的使用者執行企業應用程式的財務部分」規則。這可以封鎖財務安全性群組以外的員工 (包含系統管理員) 執行財務應用程式,但仍提供這些有商務需求之員工執行應用程式的存取權。
      透過新規則建立工具及精靈,AppLocker 提供 IT 系統管理員更好的體驗。例如,IT 系統管理員可以使用測試參考電腦,然後將規則匯入廣泛部署的生產環境,藉以自動產生規則。IT 系統管理員也可以匯出原則,提供實際執行設定的備份或提供文件以符合規範要求。您的群組原則基礎結構也可以用來建立與部署 AppLocker 規則,以節省您組織的訓練與支援成本。
      AppLocker 是 Windows 7 企業版 及 Windows 7 旗艦版 中提供的新技術。此外,AppLocker 可以在 Windows Server 2008 R2 Standard、Windows Server 2008 R2 Enterprise、Windows Server 2008 R2 Datacenter 及 Itanium 型系統的 Windows Server 2008 R2 中使用。這些相同的版本中也提供軟體限制原則。

      摘要

      您的桌面環境不只是您最好的生產工具之一,也代表一個重大的投資。您需要可讓使用者執行有效工作所需之應用程式的工具,而同時仍可有效防禦未知軟體與垃圾軟體。
      Windows 7 引進 AppLocker 處理企業中應用程式控制解決方案的需求:簡單且靈活的機制,允許系統管理員明確地指定允許在他們桌面環境中執行的程式。因此,AppLocker 提供的不只是安全性保護,還有操作方面及符合規範的優點。此外,AppLocker 可以使用已知且認可的工具和技術管理,讓 IT 資源專注於結合 IT 基礎結構與動態商務需求。

      另請參閱


      http://technet.microsoft.com/zh-tw/library/dd548340(WS.10).aspx

      2012年12月21日 星期五

      Dialog Filter Editor for WES7

      執行 Dialog Filter Editor








      利用圖形化工具Dialog Filter Editor,快速產生組態檔
      執行後,左側面版列出目前執行的程式,雙擊欲設定的程式,即會在右側面版出現;








      雙擊後出現屬性設定框,你可以設定當系統欲執行此程式時,自動"關閉"或"最小化"此程式。

      Windows Embedded Standard 7 Service Pack 1 - WES7 SP1 簡介

      WES7 Service Pack 1新技術:
      1. Remote Desktop Protocol 7.1 (RDP7.1) 包括 RemoteFX,這是指包含 USB 重新導向、多媒體重新導向、多重監視器支援在內的一組技術。
      2. SD Boot 可在 SD 記憶卡上建置及安裝 Windows Embedded Standard 7 映像檔。客戶可以從 SD 記憶卡中的 Windows Embedded Standard 7 映像檔開機 (無漫遊),但是 SD 記憶卡必須是放在裝置機殼內使用者無法輕易存取的地方。
      3. SKU 相容性套件在開發之後便會新增至映像檔中。此套件會停用不在指定 SKU 內的功能

      選用WES7的理由:
      1. 豐富的使用者經驗
        • 觸控 - Windows Touch
        • WPF - Windows Presentation Foundation
        • Microsoft Silverlight
        • Kinect for Windows
        • 高階圖像功能 - High End Graphics(DirectX 11、硬體加速、3D圖像、Aero interface, Windows Flip 3D navigation)
      2. 提升企業連網能力
        • 支援AD網路管理 - Active Directory Support
        • 支援電腦管理 - Leverage Desktop Management Systems (利用SCCM或第三方管理軟體延伸企業現行對Windows主機的管理範圍)
        • 強化遠端及資料連線能力 - Seamless Remote Connectivity and Data Access (DirectAccess、BranchCache)
      3. 最新技術功能
        • Windows Internet Explorer 8
        • Windows Media Player 12
        • Microsoft .NET Framework 3.5 SP1
        • Remote Desktop Protocol 7
      開發端系統需求:
      • 硬體
        • 1 GHz 32-bit (x86) or 64-bit (amd64) CPU
        • 1 GB 記憶體(32-bit),2 GB 記憶體(64-bit)
        • 7 GB 儲存空間 (完整安裝)
        • DVD-ROM光碟機或USB 2.0接口
      • 軟體
        • 作業系統:Windows 7、Windows Vista Service Pack 1、Windows Vista Service Pack 2或Windows Server 2008 R2
        • 其它軟體需求:Microsoft .NET Framework 2.0 以上及Microsoft Core XML Services (MSXML) 6.0以上版本
      各版本功能比較表(WS7E、WS7P、WS7C):
      開發工具自動更新軟體 (WEDU):