Loading...

GdPicture ToolKit Pro Edition - OpenEdge

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 2:22 am

Hi all,

I'm trying to use "GdPicture ToolKit Pro Edition" (OCX) components of OpenEdge 10.2.
To a certain point everything is working OK. The problem comes when I use IMAGING.
It seems to me that IMAGING does not work. I need to read by OCR. Unfortunately sOCR
value is empty. Can someone help me. License keys are entered into
("LicenseKEY, SetLicenseNumber, SetLicenseNumberOCRTesseract" for this product
are the same ?).


(Progres 9.1 or OpenEdge 10.2 and GdPicture ToolKit Pro Edition 5)


Code: Select all
DEFINE VARIABLE sOCR        AS CHARACTER.
DEFINE VARIABLE ncpt        AS INTEGER.
DEFINE VARIABLE nLeftArea   AS INTEGER.
DEFINE VARIABLE nTopArea    AS INTEGER.
DEFINE VARIABLE nWidthArea  AS INTEGER.
DEFINE VARIABLE nHeightArea AS INTEGER.

IF chCtrlFrameGdV:GdViewer:isRectDrawed = TRUE THEN DO:

   chCtrlFrameGdV:GdViewer:GetRectValues(INPUT-OUTPUT  nLeftArea,
                                         INPUT-OUTPUT  nTopArea,
                                         INPUT-OUTPUT  nWidthArea,
                                         INPUT-OUTPUT  nHeightArea).

   chCtrlFrameGdI:Imaging:SetROI(nLeftArea,
                                 nTopArea,
                                 nWidthArea,
                                 nHeightArea).

END.
ELSE DO:

   chCtrlFrameGdI:Imaging:ResetROI().
   nLeftArea = 0.
   nTopArea = 0.
   nWidthArea = 0.
   nHeightArea = 0.

END.

chCtrlFrameGdI:Imaging:SetNativeImage(chCtrlFrameGdV:GdViewer:GetNativeImage()).

sOCR = chCtrlFrameGdI:Imaging:OCRTesseractDoOCR(9,"Dictionary","").

DO ncpt = 1 TO chCtrlFrameGdI:Imaging:OCRTesseractGetCharCount.
   chCtrlFrameGdI:Imaging:DrawRectangle(chCtrlFrameGdI:Imaging:OCRTesseractGetCharLeft(ncpt) + nLeftArea,
                                        chCtrlFrameGdI:Imaging:OCRTesseractGetCharTop(ncpt) + nTopArea,
                                        chCtrlFrameGdI:Imaging:OCRTesseractGetCharRight(ncpt) - chCtrlFrameGdI:Imaging:OCRTesseractGetCharLeft(ncpt),
                                        chCtrlFrameGdI:Imaging:OCRTesseractGetCharBottom(ncpt) - chCtrlFrameGdI:Imaging:OCRTesseractGetCharTop(ncpt),
                                        1,
                                        RGB-VALUE(255,0,0),
                                        False).
END.

chCtrlFrameGdI:Imaging:OCRTesseractClear().
               
chCtrlFrameGdV:GdViewer:Redraw().

MESSAGE sOCR.   



sOCR is empty ??????????????


Greetings from Poland

Mirek
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Sun Feb 14, 2010 11:39 am

Hi Mirek,

The GdPicture Tesseract OCR engine must be unlocked using the SetLicenseNumberOCRTesseract() method. maybe it is the problem ?

You can get a 1 month trial key from http://www.evaluation-gdpicture.com

To get more information on your problem you should use the GetState method just after calling OCRTesseractDoOCR. You will get an error code.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 12:18 pm

Hi Loïc,

I used the key that I received from the manufacturer.

GetStat () = 2 (Invalid parameter) ??????

sOCR = chCtrlFrameGdI Imaging: OCRTesseractDoOCR (9, "Disctionary ","").

9 - polish dictionary"
Disctionary "- a folder name
"" - empty parameter

I do not know what the problem was.

Mirek
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Sun Feb 14, 2010 12:41 pm

Hi,

I used the key that I received from the manufacturer.


Ok that not help me a lot. Please confirm you are talking about 2 keys:

- One for the GdPciture Toolkit (should be used with SetLicenseNumber())
- Another one for the GdPicture Tesseract Plugin (should be used with SetLicenseNumberOCRTesseract()) method.


Also, you should enter a valid path for dictionary files. IE: c:\program files\my app\redist\ocr\

Hope this helps,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 12:55 pm

Hi,

In my application, I apply the words:

Code: Select all
 chCtrlFrameGdV:GdViewer:LicenseKEY    = "XXXXXX".
 chCtrlFrameGdV2:GdViewer:LicenseKEY   = "XXXXXX".                 
 chCtrlFrameGdI:Imaging:SetLicenseNumber("XXXXXX").           
 chCtrlFrameGdI:Imaging:SetLicenseNumberOCRTesseract("XXXXXX").



XXXXXX - the same for each line

Dictionary address is correct. I checked it.

If I change anything and get the address of the dictionary is GetStat = 500.


Mirek,
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Sun Feb 14, 2010 12:58 pm

Hi,

XXXXXX - the same for each line


It is probably the problem. A separate key is required for OCR features (see my previous posts).

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 1:10 pm

Hi,

In accordance with your suggestion I sent a request for Key.
I received him. I entered the key to my program, and unfortunately
it's not possible. Still get GetStat = 2

I have checked with the key which I wrote earlier, for example, contained
in the VB.net version of the Installation "GDPicture" and there everything
is working properly. ?????????

Mirek.
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Sun Feb 14, 2010 4:20 pm

Ok Mirek,

So the problem is away :)

Here some hints:

Code: Select all
chCtrlFrameGdI:Imaging:SetROI(nLeftArea,
                                 nTopArea,
                                 nWidthArea,
                                 nHeightArea).


Maybe the parameters are incorrect ? You should make a first try without setting ROI. IE:

Code: Select all
chCtrlFrameGdI:Imaging:ResetROI().



Also here:

Code: Select all
chCtrlFrameGdI:Imaging:SetNativeImage(chCtrlFrameGdV:GdViewer:GetNativeImage()).


Make sure this image in the viewer is still opened. Maybe you are calling the CloseImage method of the viewer before this call ??

Here:

Code: Select all
RGB-VALUE(255,0,0),


You are using RGB color space. The method is waiting for an ARGB color. Please, use instead: chCtrlFrameGdI:Imaging:ARGB(255, 255, 0, 0)

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 4:52 pm

Unfortunately, but it also did not help.
I have the impression (perhaps I'm wrong :) ) but more likely work the way IMAGING.


The examples are used procedure (VB.net):

Code: Select all
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Imaging1.SetNativeImage(GdViewer1.GetNativeImage)
        Imaging1.AutoDeskew()
        GdViewer1.Redraw()
    End Sub

This procedure works correctly.

In my program (OE / Progress ) is the procedure:

Code: Select all
/*------------------------------------------------------------------------------
  Purpose:     
  Parameters:  <none>
  Notes:       
------------------------------------------------------------------------------*/

  chCtrlFrameGdI:Imaging:SetNativeImage(chCtrlFrameGdV:GdViewer:GetNativeImage()).
  chCtrlFrameGdI:Imaging:AutoDeskew().
  chCtrlFrameGdV:GdViewer:Redraw().



She does not work. Both procedures are the same.
I do not know what the problem was. Is a little strange.

Mirek
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Sun Feb 14, 2010 8:08 pm

Very strange issue.

What is the result value of the AutoDeskew method ?

Are you sure to use the Imaging & GdViewer classes of the SAME toolkit ? Make sure you are not using Imaging of GdPicture Light & GdViewer from GdPicture Pro.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 8:39 pm

Hi,

I use GdViewer & Imaging from "GdPicture ToolKit Pro Edition"

AutoDeskEw does nothing (it should straighten out the text).

Well, I have a very big problem. I must to use OCR.

Unfortunately, only the GdPicture Pro is a component (OCX).

I do not know what to do I do.

Mirek,
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Sun Feb 14, 2010 8:50 pm

What is the returned value of the AutoDeskew method ?
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 9:01 pm

AutoDeskEw returned 0
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Sun Feb 14, 2010 9:08 pm

Well there is no problem.
If the result code is 0 without any modification on your image there is 2 solutions:

-1 The toolkit determines the image should not be skewed. (you can attach your image for investigation)
-2 You don't refresh the Viewer correctly. This code should work: GdViewer1.SetNativeImage (Imaging1.GetNativeImage)

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Sun Feb 14, 2010 9:25 pm

Sorry, but this did not help. Does not work.

Mirek
mirp
 
Posts: 21
Joined: Sat Feb 13, 2010 10:28 pm

Next

Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron