1. Kinect 1.8 ShapeGame 無法中文辨識(已載入中文引擎)
2. 問題
private static RecognizerInfo GetKinectRecognizer()
{
Func<RecognizerInfo, bool> matchingFunc = r =>
{
string value;
r.AdditionalInfo.TryGetValue("Kinect", out value);
return "True".Equals(value, StringComparison.InvariantCultureIgnoreCase) && "en-US".Equals(r.Culture.Name, StringComparison.InvariantCultureIgnoreCase);
};
return SpeechRecognitionEngine.InstalledRecognizers().Where(matchingFunc).FirstOrDefault();
}
將en-US 改為 zh-TW 傳回 null
3. Check 我的系統有3個InstalledRecognizers, 第2個為zh-TW
4. 改用
return SpeechRecognitionEngine.InstalledRecognizers()[1];
可進行中文辨識。
5. 或改用
private static RecognizerInfo GetKinectRecognizer()
{
RecognizerInfo SPE = SpeechRecognitionEngine.InstalledRecognizers()[0];
for (int i = 0; i < SpeechRecognitionEngine.InstalledRecognizers().Count; i++)
{
if (SpeechRecognitionEngine.InstalledRecognizers()[i].Culture.Name == "zh-TW")
{
SPE = SpeechRecognitionEngine.InstalledRecognizers()[i];
break;
}
}
return SPE;
}
2013年12月25日 星期三
2013年10月29日 星期二
Windows 8 中文文字轉語音
1. SpeechPlatformRuntime_x64 不須安裝。
2. Install x64_MicrosoftSpeechPlatformSDK
3. Install MSSpeech_TTS_zh-TW_HanHan (MS 沒放在網上)
4. Install MSSpeech_SR_zh-TW_TELE (預期中文語音辨識應該OK!)
5. Test program:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SpeechLib;
namespace SpeechEx2
{
class Program
{
static void Main(string[] args)
{
SpVoice Sp = new SpVoice();
Sp.Speak("This is a test. 測試文字轉語音", SpeechVoiceSpeakFlags.SVSFDefault);
}
}
}
6. OK.
2. Install x64_MicrosoftSpeechPlatformSDK
3. Install MSSpeech_TTS_zh-TW_HanHan (MS 沒放在網上)
4. Install MSSpeech_SR_zh-TW_TELE (預期中文語音辨識應該OK!)
5. Test program:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SpeechLib;
namespace SpeechEx2
{
class Program
{
static void Main(string[] args)
{
SpVoice Sp = new SpVoice();
Sp.Speak("This is a test. 測試文字轉語音", SpeechVoiceSpeakFlags.SVSFDefault);
}
}
}
6. OK.
2013年10月25日 星期五
Server 2012 啟用 Wireless Service
Ref: http://www.niallbrady.com/2012/09/01/how-can-i-manually-enable-wireless-networking-in-windows-server-2012/
1. 已經安裝無線網卡驅動程式,但無法使用。
2. 依Ref步驟啟用無線網路服務。
3. 移除驅動。
4. 重新安裝驅動OK。
1. 已經安裝無線網卡驅動程式,但無法使用。
2. 依Ref步驟啟用無線網路服務。
3. 移除驅動。
4. 重新安裝驅動OK。
2013年10月22日 星期二
輸入產品金鑰不符合任何可用來安裝的Windows映象
ASUS X450J 配置Windows 8,改DVD為SSD,安裝第2OS Server 2012
無法安裝:輸入產品金鑰不符合任何可用來安裝的Windows映象...
Ref:http://idaiwan.pixnet.net/blog/post/38066447-%E5%A6%82%E4%BD%95%E5%9C%A8%E5%AE%89%E8%A3%9D-windows-8-%E6%99%82%EF%BC%9A%E4%B8%8D%E8%BC%B8%E5%85%A5%E7%94%A2%E5%93%81%E9%87%91%E9%91%B0%E3%80%81%E4%B8%A6
在Bootable USB 碟的 Source 目錄下(先確認無ei.cfg檔),加入以記事本編輯的ei.cfg,
[Channel]
Retail
二行文字,安裝OK。
無法安裝:輸入產品金鑰不符合任何可用來安裝的Windows映象...
Ref:http://idaiwan.pixnet.net/blog/post/38066447-%E5%A6%82%E4%BD%95%E5%9C%A8%E5%AE%89%E8%A3%9D-windows-8-%E6%99%82%EF%BC%9A%E4%B8%8D%E8%BC%B8%E5%85%A5%E7%94%A2%E5%93%81%E9%87%91%E9%91%B0%E3%80%81%E4%B8%A6
在Bootable USB 碟的 Source 目錄下(先確認無ei.cfg檔),加入以記事本編輯的ei.cfg,
[Channel]
Retail
二行文字,安裝OK。
2013年7月15日 星期一
Porche 911 3D Model
1. Download porche-911 3ds file : porsche-911-turbo-convertible-car-f.rar (forget the original url)
2. Looking for 3ds to xaml converter ( Zam 3D evaluation version for 15 days)
3. 使用Zam 3D 轉換 3ds --> xaml
4. 運用 WPF example 載入 模型
5. 測試結果
6. 程式下載
2. Looking for 3ds to xaml converter ( Zam 3D evaluation version for 15 days)
3. 使用Zam 3D 轉換 3ds --> xaml
4. 運用 WPF example 載入 模型
5. 測試結果
6. 程式下載
2013年5月23日 星期四
2013年5月22日 星期三
衛星選轉OKK!
1. 公自轉解決了,衛星應該很容易,等了好久,測試OK。
2-1 太陽(球)靜止在原點(0,0,0)
2-2 地球自轉/平移公轉半徑/公轉
<Transform3DGroup>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="日自轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<!-- 日半徑 -->
<TranslateTransform3D OffsetX="10"/>
<RotateTransform3D >
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="日公轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
</Transform3DGroup>
2-3 月球自轉/平移公轉半徑(繞地球)/公轉(繞地球)/平移地球公轉半徑/地球公轉
<Transform3DGroup>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="月自轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<!-- 月公半徑 -->
<TranslateTransform3D OffsetX="5"/>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="月公轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<!-- 日半徑 -->
<TranslateTransform3D OffsetX="10"/>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="日公轉2" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
3.
4. 程式下載
2-1 太陽(球)靜止在原點(0,0,0)
2-2 地球自轉/平移公轉半徑/公轉
<Transform3DGroup>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="日自轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<!-- 日半徑 -->
<TranslateTransform3D OffsetX="10"/>
<RotateTransform3D >
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="日公轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
</Transform3DGroup>
2-3 月球自轉/平移公轉半徑(繞地球)/公轉(繞地球)/平移地球公轉半徑/地球公轉
<Transform3DGroup>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="月自轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<!-- 月公半徑 -->
<TranslateTransform3D OffsetX="5"/>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="月公轉" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
<!-- 日半徑 -->
<TranslateTransform3D OffsetX="10"/>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3D x:Name="日公轉2" Angle="0" />
</RotateTransform3D.Rotation>
</RotateTransform3D>
3.
4. 程式下載
2013年5月3日 星期五
Create Window Service
Ref: http://forums.pdfforge.org/discussion/4749/using-sc-exe-for-creating-the-service/p1
OS: Windows 7 x64
1. Cmd.exe as Administrator
2. sc create "serviceName" start= auto binpath= "E:\Acad\Working\Powershell\TcpServer1\TcpServer1\bin\Debug\tcpserver1.exe"
OS: Windows 7 x64
1. Cmd.exe as Administrator
2. sc create "serviceName" start= auto binpath= "E:\Acad\Working\Powershell\TcpServer1\TcpServer1\bin\Debug\tcpserver1.exe"
2013年4月9日 星期二
NameScope 錯誤
Build WPF application from console mode:
1. Add Reference
PresentationCore
PresentationFramework
WindowsBase
System.XAML ( It may not be needed in VS 2008 ? not sure)
2. Without SetNameScope, there may be animation without notice.
//------ 要先註冊NameScope +++
//System.Windows.NameScope.SetNameScope(this, new System.Windows.NameScope());
this.RegisterName("旋轉物件名稱", 旋轉);
System.Windows.Media.Animation.DoubleAnimation 動畫 =
new System.Windows.Media.Animation.DoubleAnimation();
動畫.From = 0;
動畫.To = 360;
動畫.Duration =
new System.Windows.Duration(TimeSpan.FromMilliseconds(1500));
3. It may be found out by setting a break point after RegisterName since the code will not be executed.
4. 程式下載
1. Add Reference
PresentationCore
PresentationFramework
WindowsBase
System.XAML ( It may not be needed in VS 2008 ? not sure)
2. Without SetNameScope, there may be animation without notice.
//------ 要先註冊NameScope +++
//System.Windows.NameScope.SetNameScope(this, new System.Windows.NameScope());
this.RegisterName("旋轉物件名稱", 旋轉);
System.Windows.Media.Animation.DoubleAnimation 動畫 =
new System.Windows.Media.Animation.DoubleAnimation();
動畫.From = 0;
動畫.To = 360;
動畫.Duration =
new System.Windows.Duration(TimeSpan.FromMilliseconds(1500));
3. It may be found out by setting a break point after RegisterName since the code will not be executed.
4. 程式下載
有視嗎,眼球追蹤
1. ASUS A43S/ Windows 7 x64
2. Kinect SDK 1.6 + Example SkeletonBasic-WPF
3. Eyeball display and motion WPF class
4. Eyeball rotate angle = headJoint.Position.X * 80
if (skel.TrackingState == SkeletonTrackingState.Tracked)
{
Joint headJoint = skel.Joints[JointType.Head];
SkeletonPoint headPoint = headJoint.Position;
string message = string.Format("Head: X:{0:0.0} Y:{1:0.0} Z:{2:0.0}", headPoint.X,
headPoint.Y, headPoint.Z);
EyeBall.RoLR.Angle = headJoint.Position.X * 80;
}
5. 程式下載
6. Storyboard.Stop may not function when the Storyboard.Begin(this, w/o true).
if (IsAnimation)
{
IsAnimation = false;
this.ST.Stop(this);
}
else
{
IsAnimation = true;
ST.Begin(this, true);
}
7. Revise version
7.1 Alt+T : Start/Stop to generate a random angle with 500 ms period.
7.2 Alt+A: Start/Stop Animation from 35 to 105.
8. 程式下載。
2. Kinect SDK 1.6 + Example SkeletonBasic-WPF
3. Eyeball display and motion WPF class
4. Eyeball rotate angle = headJoint.Position.X * 80
if (skel.TrackingState == SkeletonTrackingState.Tracked)
{
Joint headJoint = skel.Joints[JointType.Head];
SkeletonPoint headPoint = headJoint.Position;
string message = string.Format("Head: X:{0:0.0} Y:{1:0.0} Z:{2:0.0}", headPoint.X,
headPoint.Y, headPoint.Z);
EyeBall.RoLR.Angle = headJoint.Position.X * 80;
}
5. 程式下載
6. Storyboard.Stop may not function when the Storyboard.Begin(this, w/o true).
if (IsAnimation)
{
IsAnimation = false;
this.ST.Stop(this);
}
else
{
IsAnimation = true;
ST.Begin(this, true);
}
7. Revise version
7.1 Alt+T : Start/Stop to generate a random angle with 500 ms period.
7.2 Alt+A: Start/Stop Animation from 35 to 105.
8. 程式下載。
2013年4月7日 星期日
有視嗎,視窗變形
奕璇的論文找到一個實例應用,調整一下
1. 考慮投影機為延伸或鏡射,虛擬視窗位置可調。
2. 虛擬螢幕控制點計14個(7組)
2-1 1~7 數字鍵與Mouse Wheel控制7組控制軸y方向增減。
2-2 2(Q),4(E),6(T) 雙鍵與Mouse Wheel控制3組控制軸x方向增減。
3. s鍵與Mouse Wheel控制虛擬螢幕尺寸。
4. r鍵與Mouse Wheel控制虛擬螢幕旋轉。
5. x鍵與Mouse Wheel控制虛擬螢幕x方向平移。
6. y鍵與Mouse Wheel控制虛擬螢幕y方向平移。
7. z鍵與Mouse Wheel控制虛擬螢幕z方向平移。
8. 程式下載
9. Revise version for improving distortion. (2013-4-18)
1. 考慮投影機為延伸或鏡射,虛擬視窗位置可調。
2. 虛擬螢幕控制點計14個(7組)
2-1 1~7 數字鍵與Mouse Wheel控制7組控制軸y方向增減。
2-2 2(Q),4(E),6(T) 雙鍵與Mouse Wheel控制3組控制軸x方向增減。
3. s鍵與Mouse Wheel控制虛擬螢幕尺寸。
4. r鍵與Mouse Wheel控制虛擬螢幕旋轉。
5. x鍵與Mouse Wheel控制虛擬螢幕x方向平移。
6. y鍵與Mouse Wheel控制虛擬螢幕y方向平移。
7. z鍵與Mouse Wheel控制虛擬螢幕z方向平移。
8. 程式下載
9. Revise version for improving distortion. (2013-4-18)
10. 程式下載
11. Revise version for auto-replay and open file dialog for changing video file (2013-4-18)
12. 程式下載(V3)
13. Revise version for Quadrilateral (2013-5-15)
14. 程式下載(V4)
13. Revise version for delay re-start (2013-5-15)
14. 程式下載(V5)
15. Revise version for 16:9 without margins (2013-5-16)
執行後請匯入座標
可以用記事本修改PositionData,txt, 前三組數據分別是
延伸視窗位置: 0,1024 (主螢幕1024,768)
視窗尺寸:1280,768
虛擬螢幕尺寸:1280,768
16. 程式下載(V6)
2013年3月29日 星期五
IIS not allows rdp extention
ref : http://serverfault.com/questions/335982/iis-not-allowing-me-to-server-files-with-rdp-extension
It can be solved by add
File name Extension: .rdp
MIME type: application/rdp
The Msvm_VirtualSystemManagementService object was not found
1. Server 2008 R2 SP1, Hyper-V in AD can't connect to VM host
2. Download KB950050:Windows Server 2008 x64 Edition 的 Hyper-V 更新
http://www.microsoft.com/zh-tw/download/details.aspx?id=18567
3. OK!
2. Download KB950050:Windows Server 2008 x64 Edition 的 Hyper-V 更新
http://www.microsoft.com/zh-tw/download/details.aspx?id=18567
3. OK!
2013年3月26日 星期二
Screen Capture By Thread
1. OS: Windows 7 x64
2. Tools: VS2010, Expression 4.0
3. Prepare a class for capturing scrren and save to outputpath
class BkScnCap
{
ScreenCaptureJob job;
public BkScnCap()
{
job = new ScreenCaptureJob();
}
public void Record()
{
System.Drawing.Size monitorSize = SystemInformation.PrimaryMonitorSize;
System.Drawing.Rectangle capRect = new System.Drawing.Rectangle(0, 0, monitorSize.Width, monitorSize.Height);
job.CaptureRectangle = capRect;
job.OutputPath = @"E:\output\ScreenCap";
job.Start();
}
public void StopRecord()
{
job.Stop();
}
}
4. Make backgroud thread method in constructor, Click to start this thread and click the stop to end it.
public MainWindow()
{
InitializeComponent();
oBkScnCap = new BkScnCap();
oThread = new System.Threading.Thread(new System.Threading.ThreadStart(oBkScnCap.Record));
}
System.Threading.Thread oThread;
BkScnCap oBkScnCap;
private void 儲存影片_Click(object sender, RoutedEventArgs e)
{
oThread.Start();
}
private void 停止影片擷取_Click(object sender, RoutedEventArgs e)
{
oBkScnCap.StopRecord();
}
5. Screen resolution issue
2. Tools: VS2010, Expression 4.0
3. Prepare a class for capturing scrren and save to outputpath
class BkScnCap
{
ScreenCaptureJob job;
public BkScnCap()
{
job = new ScreenCaptureJob();
}
public void Record()
{
System.Drawing.Size monitorSize = SystemInformation.PrimaryMonitorSize;
System.Drawing.Rectangle capRect = new System.Drawing.Rectangle(0, 0, monitorSize.Width, monitorSize.Height);
job.CaptureRectangle = capRect;
job.OutputPath = @"E:\output\ScreenCap";
job.Start();
}
public void StopRecord()
{
job.Stop();
}
}
4. Make backgroud thread method in constructor, Click to start this thread and click the stop to end it.
public MainWindow()
{
InitializeComponent();
oBkScnCap = new BkScnCap();
oThread = new System.Threading.Thread(new System.Threading.ThreadStart(oBkScnCap.Record));
}
System.Threading.Thread oThread;
BkScnCap oBkScnCap;
private void 儲存影片_Click(object sender, RoutedEventArgs e)
{
oThread.Start();
}
private void 停止影片擷取_Click(object sender, RoutedEventArgs e)
{
oBkScnCap.StopRecord();
}
5. Screen resolution issue
2013年3月19日 星期二
明明就很容易Rotate Animation
1. Windows 7 x64
2. VS 2010
3. Storyboard.TargetProperty="Angle" 就可以了。
<Window x:Class="Ro2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Ellipse Width="100" Height="50" Fill="Red">
<Ellipse.RenderTransform>
<RotateTransform x:Name="Ro"/>
</Ellipse.RenderTransform>
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Ro"
Storyboard.TargetProperty="Angle"
From="0" To="360" Duration="0:0:1"
RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
</Grid>
</Window>
2. VS 2010
3. Storyboard.TargetProperty="Angle" 就可以了。
<Window x:Class="Ro2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Ellipse Width="100" Height="50" Fill="Red">
<Ellipse.RenderTransform>
<RotateTransform x:Name="Ro"/>
</Ellipse.RenderTransform>
<Ellipse.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Ro"
Storyboard.TargetProperty="Angle"
From="0" To="360" Duration="0:0:1"
RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Ellipse.Triggers>
</Ellipse>
</Grid>
</Window>
2013年3月17日 星期日
Broadcasting Screen
1. Hardware A43S
2. OS: Windows 7 x 64
3. Tools: VS 2010, Expression 4 Pro
4. Download Expression SP2 http://www.microsoft.com/zh-tw/download/details.aspx?id=27870
Ref: http://stackoverflow.com/questions/6173914/realtime-stream-from-screencapture-with-microsoft-expression-encoder
5. Notes:
N1. SP1 or SP2 download and upgrade. Restart was required.
N2. Capture screen and then broadcasting into internet.
6. Coding:
LiveJob job = new LiveJob(); // Create Broadcasting object
Collection<EncoderDevice> devices = EncoderDevices.FindDevices(EncoderDeviceType.Video);
EncoderDevice device=null;
for (int i=0; i< devices.Count; i++)
if (devices[i].Name == "Screen Capture Source") device = devices[i]; // Select Screen Capture
//Source as the input device
if (device != null)
{
LiveDeviceSource source = job.AddDeviceSource(device, null);
source.ScreenCaptureSourceProperties = new ScreenCaptureSourceProperties
{
CaptureCursor = true,
CaptureLargeCursor = false,
FrameRate = 6,
CaptureLayeredWindow = true,
Height = 600,
Width = 800,
Left = 0,
Top = 0,
};
job.ActivateSource(source);
// Finds and applys a smooth streaming preset
job.ApplyPreset(LivePresets.VC1256kDSL16x9);
// Sets up variable for fomat data
var format = new PullBroadcastPublishFormat { BroadcastPort = 8080 };
job.PublishFormats.Add(format);
var data = job.BufferWindowSize;
job.StartEncoding();
Console.Write("Press Enter then to stop the broadcasting.");
Console.ReadLine();
job.StopEncoding();
}
else
{
Console.WriteLine("Can't find Screen Capture Source.");
}
}
7. Download
2. OS: Windows 7 x 64
3. Tools: VS 2010, Expression 4 Pro
4. Download Expression SP2 http://www.microsoft.com/zh-tw/download/details.aspx?id=27870
Ref: http://stackoverflow.com/questions/6173914/realtime-stream-from-screencapture-with-microsoft-expression-encoder
5. Notes:
N1. SP1 or SP2 download and upgrade. Restart was required.
N2. Capture screen and then broadcasting into internet.
6. Coding:
LiveJob job = new LiveJob(); // Create Broadcasting object
Collection<EncoderDevice> devices = EncoderDevices.FindDevices(EncoderDeviceType.Video);
EncoderDevice device=null;
for (int i=0; i< devices.Count; i++)
if (devices[i].Name == "Screen Capture Source") device = devices[i]; // Select Screen Capture
//Source as the input device
if (device != null)
{
LiveDeviceSource source = job.AddDeviceSource(device, null);
source.ScreenCaptureSourceProperties = new ScreenCaptureSourceProperties
{
CaptureCursor = true,
CaptureLargeCursor = false,
FrameRate = 6,
CaptureLayeredWindow = true,
Height = 600,
Width = 800,
Left = 0,
Top = 0,
};
job.ActivateSource(source);
// Finds and applys a smooth streaming preset
job.ApplyPreset(LivePresets.VC1256kDSL16x9);
// Sets up variable for fomat data
var format = new PullBroadcastPublishFormat { BroadcastPort = 8080 };
job.PublishFormats.Add(format);
var data = job.BufferWindowSize;
job.StartEncoding();
Console.Write("Press Enter then to stop the broadcasting.");
Console.ReadLine();
job.StopEncoding();
}
else
{
Console.WriteLine("Can't find Screen Capture Source.");
}
}
7. Download
2013年2月19日 星期二
Error x80004005 無法使用分享檔案
Ref : http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/c9f17816-9ef3-4249-98e6-5de990112d3d/
不知甚麼原因將Client for Microsoft Networks 服務移除,無法使用檔案分享.
加入服務後"重新開機"可以解決!
不知甚麼原因將Client for Microsoft Networks 服務移除,無法使用檔案分享.
加入服務後"重新開機"可以解決!
訂閱:
文章 (Atom)