IA

IA

Postby elvira » Mon Apr 04, 2022 5:55 pm

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

Re: IA

Postby Jimmy » Mon Apr 04, 2022 8:12 pm

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
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: IA

Postby Antonio Linares » Mon Apr 04, 2022 9:04 pm

Dear Jimmy,

A quick test with FWH. Many thanks! :-)
Code: Select all  Expand view
#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
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IA

Postby Jimmy » Mon Apr 04, 2022 9:20 pm

glad that i can help.
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: IA

Postby Antonio Linares » Mon Apr 04, 2022 9:27 pm

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
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IA

Postby Jimmy » Tue Apr 05, 2022 8:48 pm

hi Antonio,

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

Poweshell with Administrator Rights
Code: Select all  Expand view
 „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
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: IA

Postby MarcoBoschi » Wed Apr 06, 2022 6:42 am

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

bye to all

marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: IA

Postby Horizon » Wed Apr 06, 2022 6:24 pm

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
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: IA

Postby Jimmy » Wed Apr 06, 2022 10:38 pm

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
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: IA

Postby Antonio Linares » Wed Apr 06, 2022 11:28 pm

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: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IA

Postby Antonio Linares » Wed Apr 06, 2022 11:40 pm

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
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IA

Postby cmsoft » Thu Apr 07, 2022 12:45 am

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 view
MENUITEM "Copy" ACTION myInkCollector:Ink:ClipBoardCopy()

Copia al portapapeles de manera correcta
Code: Select all  Expand view
MENUITEM "Paste" ACTION (myInkCollector:Enabled := .f.,myInkCollector:Ink:ClipBoardPaste(),myInkCollector:Enabled := .T.)

No da error pero no muestra nada
User avatar
cmsoft
 
Posts: 1285
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: IA

Postby Antonio Linares » Thu Apr 07, 2022 11:55 am

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: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IA

Postby Antonio Linares » Thu Apr 07, 2022 12:01 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IA

Postby Jimmy » Thu Apr 07, 2022 10:50 pm

hi Antonio,

thx for the link.

i have read Germen VFP-PDF which work with ActiveX
Code: Select all  Expand view
Microsoft InkEdit Control
{E5CA59F5-57C4-4DD8-9BD6-1DEEEDD27AF4}
ProgID "InkEd.InkEdit.1"


you also point me to other ActiveX
Code: Select all  Expand view
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 view
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
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 66 guests