IA

elvira
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

IA

Post by elvira »

User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: IA

Post by Jimmy »

hi,

not sure to which Thread it belong.
as it talk about "Handwritten" recognition you can use Microsoft INK for it

have a look in HMG Forum
http://www.hmgforum.com/viewtopic.php?f=5&t=7206

you will find Source for this
Image
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: IA

Post by Antonio Linares »

Dear Jimmy,

A quick test with FWH. Many thanks! :-)

Code: Select all | Expand

#include "FiveWin.ch"

STATIC myRecognizers
STATIC myInkCollector
static oWnd

PROCEDURE MAIN

   DEFINE WINDOW oWnd MENU BuildMenu()

   myRecognizers := CreateObject( "msinkaut.InkRecognizers" )

   myInkCollector := CreateObject( "msinkaut.InkCollector" )
   myInkCollector:hWnd := oWnd:hWnd
   myInkCollector:Enabled = .T.

   ACTIVATE WINDOW oWnd

RETURN

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "Text" ACTION MsgInfo( myInkCollector:Ink:Strokes:ToString() )
      MENUITEM "Clean" ACTION ( myInkCollector:Ink:DeleteStrokes( myInkCollector:Ink:Strokes ), oWnd:Refresh() )
   ENDMENU
   
return oMenu  
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: IA

Post by Jimmy »

glad that i can help.
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: IA

Post by Antonio Linares »

Dear Jimmy,

Do you know if there is a similar API to talk to Cortana ?

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: IA

Post by Jimmy »

hi Antonio,

i do not use Cortana ... i have de-install it :wink:

Poweshell with Administrator Rights

Code: Select all | Expand

 „Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage“ 

---

as i know "Dictate"
https://techcrunch.com/2017/06/20/microsofts-dictate-uses-cortanas-speech-recognition-to-enable-dictation-in-office/

have been integrate in Office 365 and Windows 10
https://www.microsoft.com/en-us/garage/profiles/dictate/

as i can say you need to learn "Windows Speech Recognition commands"
https://support.microsoft.com/en-us/windows/windows-speech-recognition-commands-9d25ef36-994d-f367-a81a-a326160128c7

p.s. as i know Cortana work only when Online
greeting,
Jimmy
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: IA

Post by MarcoBoschi »

Is it possible to load from an image file a written text?

bye to all

marco
Marco Boschi
info@marcoboschi.it
Horizon
Posts: 1323
Joined: Fri May 23, 2008 1:33 pm
Has thanked: 4 times

Re: IA

Post by Horizon »

MarcoBoschi wrote:Is it possible to load from an image file a written text?

bye to all

marco


Plus

Can this image be car plate?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: IA

Post by Jimmy »

hi,

Microsoft INK is made for Handwriting and Gesture and not work like OCR Apps

have a look at this Article
https://www.codemag.com/article/0512042
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: IA

Post by Antonio Linares »

In this document it seems as they are able to use an image:

https://silo.tips/download/erstellen-von-tablet-pc-anwendungen-mit-visual

PROCEDURE cmdLoad.Click
lsInk = CREATEBINARY(FILETOSTR(GETFILE("isf")))
thisform.inkoverlay.Enabled = 0
thisform.inkoverlay.ink.Load(lsInk)
thisform.inkoverlay.Enabled = 1
*--Tell control to redraw, or changes will not be made visible.
*-- Use the InkRectangle object we
*-- created during form Init.
ThisForm.inkoverlay.Draw(ThisForm.InkRectangle)
ENDPROC
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: IA

Post by Antonio Linares »

Here is the document translated into english for better understanding and reading:

https://github.com/FiveTechSoft/screenshots/blob/master/Building%20Tablet%20PC%20Applications%20with%20Visual%20FoxPro.pdf
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
cmsoft
Posts: 1297
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina
Been thanked: 2 times

Re: IA

Post by cmsoft »

Antonio:
Hay equivalente en Fivewin a CREATEBINARY y FILETOSTR, tenemos algo asi?
FILETOSTR imagino que podría ser MemoRead()

Intente de algunas formas pero no tengo ningun resultado.
Esto funciona bien:

Code: Select all | Expand

MENUITEM "Copy" ACTION myInkCollector:Ink:ClipBoardCopy()

Copia al portapapeles de manera correcta

Code: Select all | Expand

MENUITEM "Paste" ACTION (myInkCollector:Enabled := .f.,myInkCollector:Ink:ClipBoardPaste(),myInkCollector:Enabled := .T.)

No da error pero no muestra nada
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: IA

Post by Antonio Linares »

César,

Me parece que ese método lo que hace es salvar lo escrito y luego recargarlo

Hay mucha documentación al respecto que hay que revisar:
https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-3.0/ms583746(v=vs.85)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: IA

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: IA

Post by Jimmy »

hi Antonio,

thx for the link.

i have read Germen VFP-PDF which work with ActiveX

Code: Select all | Expand

Microsoft InkEdit Control
{E5CA59F5-57C4-4DD8-9BD6-1DEEEDD27AF4}
ProgID "InkEd.InkEdit.1"


you also point me to other ActiveX

Code: Select all | Expand

Microsoft InkPicture Control
{04a1e553-fe36-4fde-865e-344194e69424}
ProgID "msinkaut.InkPicture.1"


---

C:\Program Files\Common Files\Microsoft Shared\Ink\
InkObj.dll seem me to be the ActiveX and have these Interface

Code: Select all | Expand

InkDisp
InkOverlay
InkPicture
InkCollector
InkDrawingAttributes
InkRectangle
InkRenderer
InkTransform
InkRecognizers
InkRecognizerContext
InkRecognizerGuide
InkTablets
InkWordList
InkStrokes
Ink
SketchInk


my Sample work with InkCollector and InkRecognizers only

Load/Save are Method from InkDisp / InkOverlay so i need to learn more
https://docs.microsoft.com/en-us/windows/win32/tablet/inkdisp-class

about Save
https://docs.microsoft.com/en-us/windows/win32/api/msinkaut/nf-msinkaut-iinkdisp-save
default it use "InkSerializedFormat" to create ISF (ink serialized format) File.
when use GIF
Ink is persisted by using a Graphics Interchange Format (GIF) file that contains ISF as metadata that is embedded within the file.

Specification about ISF
https://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/InkSerializedFormat(ISF)Specification.pdf

about Load
https://docs.microsoft.com/en-us/windows/win32/api/msinkaut/nf-msinkaut-iinkdisp-load
The Save method allows you to persist the ink in an InkDisp object in Graphics Interchange Format (GIF) format, which consists of an array of byte data (the tla_gif persistence format is specified in the InkPersistenceFormat enumeration type). After you have the array of byte data, you can load the array of byte data into another InkDisp object. This means that you can load GIF-compatible byte array data into another InkDisp object in the same way as if you had called the Save method and received a byte array that was not in GIF format.


so how to create Byte Array
what can i use for CREATEBINARY() :?:
greeting,
Jimmy
Post Reply