|
| | |||||||
| Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications. |
| | LinkBack | Thread Tools |
| |||
| InkDivider doesn't work properly for my application? Hello, My Ink datas are originally stored in a relational database. Via so-called R3-Framework(have to) as client I transform the ink data into a XML file which looks like: <Ink> <Stroke><p x=.., y=.., f=..,t=.. /></Stroke> <Stroke>...</Stroke> ..... </Ink> Then R3 connects the Handwriting Recoginition Server and transfers the data to it as String Type for analyzing. That works well with returned recognized text and alternatives. But a problem occurs when I try to use InkDivider to distinguish texts from graphics. It seems It cannot correctly do this separation. For example, My first ink data has 18 strokes which should be recognized to "TEST TEST", but after running with following code included, it tells there are 18 division units. //rc is the RecognizerContext Divider divider = new Divider(rc.Strokes, rc); DivisionResult divResult = divider.Divide(); DivisionUnits units = divResult.ResultByType(InkDivisionType.Drawing); Console.WriteLine(divUnits.Count); I don't know how to deal with this. Could the String type of ink data be a possible reason? If the Divider can't separate text from graphics in this case, is there any other solution? Any help will be very appreciated! Joe |
| |||
| RE: InkDivider doesn't work properly for my application? A bit more explanation on my question: If I have understood it correctly, for a text handwriting, after calling "DivisionUnits units = divResult.ResultByType(InkDivisionType.Drawing)", "units" should own "0" element; and for a drawing, "units" will have some elements, is that right? But it doesn't work in my application, I don't know why. |
| |||
| RE: InkDivider doesn't work properly for my application? A bit more explanation on my question: If I have understood it correctly, for a text handwriting, after calling "DivisionUnits units = divResult.ResultByType(InkDivisionType.Drawing)", "units" should own "0" element; and for a drawing, "units" will have some elements, is that right? But it doesn't work in my application, I don't know why. |
| |||
| Re: InkDivider doesn't work properly for my application? Hey Joe, while I don't necessarily have an answer for you about Divider (I haven't used it recently) I can tell you that InkAnalyzer is the way to go. It has far better recognition accuracy than divider, it can create trees of linked nodes (for example, a circle around a word is analyzed as an enclosure that has a link back to the word it encloses), and it has a much simpler object model for working with recognized ink by combining the analysis (division) and recognition steps into one. Now of course none of the ink api's are necessarily designed to work on a server, so keep that in mind. But as for Divider, you might try setting a RecognizerGuide because I think I recall that has some impact on how it determines drawings from writing. Drawings are about the height of two lines of writing I believe. -- Josh Einstein (Tablet PC MVP) Einstein Technologies Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com "Joe" <Joe@discussions.microsoft.com> wrote in message news:C4C981E1-BFCA-4AB4-8F26-2079C878BAE0@microsoft.com... > Hello, > > My Ink datas are originally stored in a relational database. Via so-called > R3-Framework(have to) as client I transform the ink data into a XML file > which looks like: > > <Ink> > <Stroke><p x=.., y=.., f=..,t=.. /></Stroke> > <Stroke>...</Stroke> > .... > </Ink> > > Then R3 connects the Handwriting Recoginition Server and transfers the > data > to it as String Type for analyzing. That works well with returned > recognized > text and alternatives. But a problem occurs when I try to use InkDivider > to > distinguish texts from graphics. It seems It cannot correctly do this > separation. For example, My first ink data has 18 strokes which should be > recognized to "TEST TEST", but after running with following code included, > it tells there are 18 division units. > > //rc is the RecognizerContext > Divider divider = new Divider(rc.Strokes, rc); > DivisionResult divResult = divider.Divide(); > DivisionUnits units = > divResult.ResultByType(InkDivisionType.Drawing); > Console.WriteLine(divUnits.Count); > > I don't know how to deal with this. Could the String type of ink data be a > possible reason? If the Divider can't separate text from graphics in this > case, is there any other solution? Any help will be very appreciated! > > Joe |
| |||
| Re: InkDivider doesn't work properly for my application? Hi, I have tried to apply InkAnalyzer on my ink data, but failed. I have tried everything I can. It always returned e.g. "other other other straight other other ....". If I scaled down the ink size(since it may be too large), it returns nothing. I post part of my code here, please help me! //strokes for each ink data Strokes strokes = rec.getStrokesFromXML(line); InkAnalyzer analyzer = new InkAnalyzer(strokes.Ink, gui); analyzer.AddStroke(strokes); analyzer.Analyze(); MessageBox.Show(analyzer.GetRecognizedString()); ************************************ //I have also tried folgende code, but it gave me nothing back CustomRecognizerNode customRecognizer = analyzer.CreateCustomRecognizer(System.Guid.NewGui d()); analyzer.AddStrokesToCustomRecognizer(strokes, customRecognizer); analyzer.Analyze(); MessageBox.Show(customRecognizer.GetRecognizedStri ng()); Joe |
| |||
| Re: InkDivider doesn't work properly for my application? Sounds like it's recognizing the strokes as drawings. Here's the thing, without a guide, the recognizer uses some standard defaults for writing size when determining whether or not to classify a stroke as drawing or writing. You can force it using the InkAnalyzer.SetStrokesType() method. Download my Ink Analyzer Explorer to get a better feel for how IA works and how the various options can influence how it recognizes ink. http://www.einsteintech.net -- Josh Einstein (Tablet PC MVP) Einstein Technologies Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com "Joe" <Joe@discussions.microsoft.com> wrote in message news:A2DEF58C-CB40-4924-9768-E4ABBB01AD28@microsoft.com... > > Hi, > > I have tried to apply InkAnalyzer on my ink data, but failed. I have tried > everything I can. It always returned e.g. "other other other straight > other > other ....". If I scaled down the ink size(since it may be too large), it > returns nothing. > > I post part of my code here, please help me! > > //strokes for each ink data > Strokes strokes = rec.getStrokesFromXML(line); > > InkAnalyzer analyzer = new InkAnalyzer(strokes.Ink, gui); > analyzer.AddStroke(strokes); > analyzer.Analyze(); > > MessageBox.Show(analyzer.GetRecognizedString()); > > ************************************ > //I have also tried folgende code, but it gave me nothing back > > CustomRecognizerNode customRecognizer = > analyzer.CreateCustomRecognizer(System.Guid.NewGui d()); > analyzer.AddStrokesToCustomRecognizer(strokes, customRecognizer); > analyzer.Analyze(); > > MessageBox.Show(customRecognizer.GetRecognizedStri ng()); > > > Joe |
| |||
| Re: InkDivider doesn't work properly for my application? Yep, just as you said It seems It tries to recognize any ink as a shape(circle,squar,triangle...), if I call the SetStrokesType(StrokeType.Writing), it returns nothing. I tried to draw fresh ink with following code, it also could only recognize shapes,any words I wrote were recognized to be "other". It's weird. BTW, the InKAnalyzer Explore cannot be downloaded,it said "missing required file". ********************** using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.Ink; namespace HandwritingRecognition { public partial class InkAnalysis : Form { // The InkOverlay that we'll attach to our Form private InkOverlay inkOverlay = new InkOverlay(); public InkAnalysis() { InitializeComponent(); Button recog = new Button(); recog.Text = "Recognize"; recog.Location = new Point(10,10); recog.Click += new EventHandler(this.buttonRecognize_Click); this.Controls.Add(recog); // Create an InkOverlay object that's attached to the Form this.inkOverlay = new InkOverlay(this); // Enable the InkOverlay (default is Enabled == false) this.inkOverlay.Enabled = true; this.FormClosing += new FormClosingEventHandler(InkAnalysis_FormClosing); } void InkAnalysis_FormClosing(object sender, FormClosingEventArgs e) { this.inkOverlay.Dispose(); } private void buttonRecognize_Click(object sender, EventArgs e) { InkAnalyzer analyzer = new InkAnalyzer(this.inkOverlay.Ink, this); analyzer.AddStrokes(this.inkOverlay.Ink.Strokes); AnalysisStatus status = analyzer.Analyze(); MessageBox.Show(analyzer.GetRecognizedString()); analyzer.Dispose(); } } } |
| |||
| Re: InkDivider doesn't work properly for my application? Hi Josh, here is erro report when I was trying to download InkAnalyzer Explore. PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) dfdll.dll : 2.0.50727.42 (RTM.050727-4200) dfshim.dll : 2.0.50727.42 (RTM.050727-4200) SOURCES Deployment url : file:///D:/Firefox_download/IAExplorer(2).application IDENTITIES Deployment Identity : IAExplorer.application, Version=1.0.7.0, Culture=neutral, PublicKeyToken=2a1285f1b6117d85, processorArchitecture=x86 APPLICATION SUMMARY * Installable application. ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of D:\Firefox_download\IAExplorer(2).application resulted in exception. Following failure messages were detected: + Downloading file:///D:/Firefox_download/IAExplorer_1_0_7_0/IAExplorer.exe.manifest did not succeed. + Could not find a part of the path 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. + Could not find a part of the path 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. + Could not find a part of the path 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected. WARNINGS There were no warnings during this operation. OPERATION PROGRESS STATUS * [08.09.2007 20:43:27] : Activation of D:\Firefox_download\IAExplorer(2).application has started. * [08.09.2007 20:43:30] : Processing of deployment manifest has successfully completed. * [08.09.2007 20:43:30] : Installation of the application has started. ERROR DETAILS Following errors were detected during this operation. * [08.09.2007 20:43:30] System.Deployment.Application.DeploymentDownloadEx ception (Unknown subtype) - Downloading file:///D:/Firefox_download/IAExplorer_1_0_7_0/IAExplorer.exe.manifest did not succeed. - Source: System.Deployment - Stack trace: at System.Deployment.Application.SystemNetDownloader. DownloadSingleFile(DownloadQueueItem next) at System.Deployment.Application.SystemNetDownloader. DownloadAllFiles() at System.Deployment.Application.FileDownloader.Downl oad(SubscriptionState subState) at System.Deployment.Application.DownloadManager.Down loadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation) at System.Deployment.Application.DownloadManager.Down loadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath) at System.Deployment.Application.ApplicationActivator .DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp) at System.Deployment.Application.ApplicationActivator .InstallApplication(SubscriptionState subState, ActivationDescription actDesc) at System.Deployment.Application.ApplicationActivator .PerformDeploymentActivation(Uri activationUri, Boolean isShortcut) at System.Deployment.Application.ApplicationActivator .ActivateDeploymentWorker(Object state) --- Inner Exception --- System.Net.WebException - Could not find a part of the path 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. - Source: System - Stack trace: at System.Net.FileWebRequest.EndGetResponse(IAsyncRes ult asyncResult) at System.Net.FileWebRequest.GetResponse() at System.Deployment.Application.SystemNetDownloader. DownloadSingleFile(DownloadQueueItem next) --- Inner Exception --- System.Net.WebException - Could not find a part of the path 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. - Source: System - Stack trace: at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint) at System.Net.FileWebRequest.WrappedGetResponseCallba ck(Object state) --- Inner Exception --- System.IO.DirectoryNotFoundException - Could not find a part of the path 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. - Source: mscorlib - Stack trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async) at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint) COMPONENT STORE TRANSACTION DETAILS No transaction information is available. |
| |||
| Re: InkDivider doesn't work properly for my application? Ahh sorry I should have mentioned, stupid ClickOnce doesn't work with FireFox so you have to install it using IE. From that point on it will work on its own though. -- Josh Einstein (Tablet PC MVP) Einstein Technologies Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com "Joe" <Joe@discussions.microsoft.com> wrote in message news:77D52C63-AA34-4ACF-8330-E066F44CF94E@microsoft.com... > > Hi Josh, > > here is erro report when I was trying to download InkAnalyzer Explore. > > PLATFORM VERSION INFO > Windows : 5.1.2600.131072 (Win32NT) > Common Language Runtime : 2.0.50727.42 > System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) > mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) > dfdll.dll : 2.0.50727.42 (RTM.050727-4200) > dfshim.dll : 2.0.50727.42 (RTM.050727-4200) > > SOURCES > Deployment url : file:///D:/Firefox_download/IAExplorer(2).application > > IDENTITIES > Deployment Identity : IAExplorer.application, Version=1.0.7.0, > Culture=neutral, PublicKeyToken=2a1285f1b6117d85, > processorArchitecture=x86 > > APPLICATION SUMMARY > * Installable application. > > ERROR SUMMARY > Below is a summary of the errors, details of these errors are listed later > in the log. > * Activation of D:\Firefox_download\IAExplorer(2).application resulted in > exception. Following failure messages were detected: > + Downloading > file:///D:/Firefox_download/IAExplorer_1_0_7_0/IAExplorer.exe.manifest did > not succeed. > + Could not find a part of the path > 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. > + Could not find a part of the path > 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. > + Could not find a part of the path > 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. > > COMPONENT STORE TRANSACTION FAILURE SUMMARY > No transaction error was detected. > > WARNINGS > There were no warnings during this operation. > > OPERATION PROGRESS STATUS > * [08.09.2007 20:43:27] : Activation of > D:\Firefox_download\IAExplorer(2).application has started. > * [08.09.2007 20:43:30] : Processing of deployment manifest has > successfully completed. > * [08.09.2007 20:43:30] : Installation of the application has started. > > ERROR DETAILS > Following errors were detected during this operation. > * [08.09.2007 20:43:30] > System.Deployment.Application.DeploymentDownloadEx ception (Unknown > subtype) > - Downloading > file:///D:/Firefox_download/IAExplorer_1_0_7_0/IAExplorer.exe.manifest did > not succeed. > - Source: System.Deployment > - Stack trace: > at > System.Deployment.Application.SystemNetDownloader. DownloadSingleFile(DownloadQueueItem > next) > at System.Deployment.Application.SystemNetDownloader. DownloadAllFiles() > at > System.Deployment.Application.FileDownloader.Downl oad(SubscriptionState > subState) > at > System.Deployment.Application.DownloadManager.Down loadManifestAsRawFile(Uri& > sourceUri, String targetPath, IDownloadNotification notification, > DownloadOptions options, ServerInformation& serverInformation) > at > System.Deployment.Application.DownloadManager.Down loadApplicationManifest(AssemblyManifest > deploymentManifest, String targetDir, Uri deploymentUri, > IDownloadNotification notification, DownloadOptions options, Uri& > appSourceUri, String& appManifestPath) > at > System.Deployment.Application.ApplicationActivator .DownloadApplication(SubscriptionState > subState, ActivationDescription actDesc, Int64 transactionId, > TempDirectory& > downloadTemp) > at > System.Deployment.Application.ApplicationActivator .InstallApplication(SubscriptionState > subState, ActivationDescription actDesc) > at > System.Deployment.Application.ApplicationActivator .PerformDeploymentActivation(Uri > activationUri, Boolean isShortcut) > at > System.Deployment.Application.ApplicationActivator .ActivateDeploymentWorker(Object > state) > --- Inner Exception --- > System.Net.WebException > - Could not find a part of the path > 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. > - Source: System > - Stack trace: > at System.Net.FileWebRequest.EndGetResponse(IAsyncRes ult asyncResult) > at System.Net.FileWebRequest.GetResponse() > at > System.Deployment.Application.SystemNetDownloader. DownloadSingleFile(DownloadQueueItem > next) > --- Inner Exception --- > System.Net.WebException > - Could not find a part of the path > 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. > - Source: System > - Stack trace: > at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, > FileAccess access, Boolean asyncHint) > at System.Net.FileWebRequest.WrappedGetResponseCallba ck(Object state) > --- Inner Exception --- > System.IO.DirectoryNotFoundException > - Could not find a part of the path > 'D:\Firefox_download\IAExplorer_1_0_7_0\IAExplorer .exe.manifest'. > - Source: mscorlib > - Stack trace: > at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) > at System.IO.FileStream.Init(String path, FileMode mode, FileAccess > access, Int32 rights, Boolean useRights, FileShare share, Int32 > bufferSize, > FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean > bFromProxy) > at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess > access, FileShare share, Int32 bufferSize, Boolean useAsync) > at System.Net.FileWebStream..ctor(FileWebRequest request, String path, > FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean > async) > at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, > FileAccess access, Boolean asyncHint) > > COMPONENT STORE TRANSACTION DETAILS > No transaction information is available. > > |
| |||
| Re: InkDivider doesn't work properly for my application? ok, I got it. but it's weird! Now in the Ink Analyzer Explore I got the same problem, only shapes can be recognized, and text is recognized to be "other". It seems the InkAnalyzer installed on my System doesn't support text recognition, since only when the "Drawing" atrribute in the "Bounds" menu is chosen, it works. When other attributes like paragraps,line, word were chosen, there is no response to anything(including drawing) I wrote in the drawing surface, and "RecognizedString" is other other.... Do you have any idea about this? |
| |||
| Re: InkDivider doesn't work properly for my application? That's very strange. Did you try changing the language (forcing it to english) or classifying the strokes as text? Since it started working after reinstalling the recognizers I guess it's not something simple like you're just writing too big. Sounds like something is pretty messed up. You're on XP I presume? Vista already has the recognizers and you shouldn't install the recognizer pack on that OS. -- Josh Einstein (Tablet PC MVP) Einstein Technologies Tablet Enhancements for Outlook - Try it free: www.tabletoutlook.com "Joe" <Joe@discussions.microsoft.com> wrote in message news:58859D0E-FD03-4F9A-A158-CC4A8976BF81@microsoft.com... > > It doesn't work agin, I'm really fed up!!! |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Application failed to initilize properly (0xc0000006) | Sandy | Windows XP | 1 | 02-20-2007 06:31 AM |
| The application failed to initialize properly (0xc0000142) | Lidary | Windows XP Tablet PC Newsgroup | 3 | 01-16-2007 12:15 PM |
| Excel 2003 - Application failed to initialize properly (0xc0000006). | volfan02 | Microsoft Office | 0 | 01-15-2007 11:32 AM |
| Siemens Step7 Software application not working properly on Tablet PC | brent | Tablet PC - Software Discussions | 0 | 11-21-2006 11:47 PM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |