Loading...

GdPicture ToolKit Pro Edition - OpenEdge

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

Re: GdPicture ToolKit Pro Edition - OpenEdge

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

Hi Mirek,

It's hard to help you !

With the information you gave me (try to deskew an image, Deskew method returns 0) we can only conclude that there is NO problem at all.

The toolkit determines the image should not be skewed. (you can attach your image for investigation)


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:49 pm

Loïc, thanks for your help.

I use a picture of the examples. if I run the sample VB program
that I can see the effect of the (image in straightening). In my
program (Progress) that I can not see. But it's difficult. And so
there is still a problem with OCR (returns 2).

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 9:59 pm

Well, give me the current code you are now using to try to do OCR and to get Status.
I am almost sure you have a problem in your code.

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 10:20 pm

It's my code (procedure Progress):

Code: Select all
------------------------------------------------------------------------------------------------------------------------------

/*------------------------------------------------------------------------------
  Purpose:     
  Parameters:  <none>
  Notes:       
------------------------------------------------------------------------------*/

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,"c:\dictionary","").

MESSAGE chCtrlFrameGdI:Imaging:GetStat().
MESSAGE sOCR.

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,chCtrlFrameGdI:Imaging:ARGB(255, 255, 0, 0), False).
END.

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

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

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby mirp » Mon Feb 15, 2010 2:30 pm

Hi,

I decided to play a little with AutoDeskEw. Have modified the procedure to more
accurately see if anything works.
Code: Select all
----------------------------------------------------------------------------------------------
/*------------------------------------------------------------------------------
  Purpose:     
  Parameters:  <none>
  Notes:       
------------------------------------------------------------------------------*/

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

chCtrlFrameGdV:GdViewer:CLEAR().

chCtrlFrameGdI:Imaging:AutoDeskew().

MESSAGE chCtrlFrameGdI:Imaging:GetStat().

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

/*chCtrlFrameGdV:GdViewer:Redraw().*/


END PROCEDURE.
----------------------------------------------------------------------------------------------


Result of action:

1. Clears the displayed image ( chCtrlFrameGdV:GdViewer:CLEAR(). )
2. Displays operation status = 0 ( MESSAGE chCtrlFrameGdI:Imaging:GetStat(). )
3. Displays the picture kind of things work. ( chCtrlFrameGdV:GdViewer:SetNativeImage(chCtrlFrameGdI:Imaging:GetNativeImage). )

But unfortunately there is no effect which should be visible as a result of: chCtrlFrameGdI:Imaging:AutoDeskew().

Checking with the file provided in the examples.

In VB (that is modeled on) everything is working properly.

I have no more ideas what to do.

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

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Mon Feb 15, 2010 3:11 pm

Hi Mirek,

I have a little idea of what can append:

I think your application uses 2 different forms managed as 2 different threads by OpenEdge.
Basically, if you want to have a communication between an 2 GdPicture objects, these 2 objects must be owned by the same thread.

In your code I see two object references:

chCtrlFrameGdI & chCtrlFrameGdV. I suppose these objects are windows forms ?

i think you shuld be able to implement an Imaging object owned by the same "container" as the GdViewer object: chCtrlFrameGdV.

Therefore, your code should look like to something like that:

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


Could you try this kind of implementation ?

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 » Mon Feb 15, 2010 3:29 pm

Hi,

Sorry, but I can not go (this is a faulty connection).

Progress operates like any other language.
I have not had problems with the OCX.

But I noticed another interesting case.

If I run DeskEw with a loaded file to get the status = 0
If I run without a loaded file to get the status = 1 .When you now load the file and I run DeskEw the status is not changed and still is = 1 ?????????

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

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Mon Feb 15, 2010 3:49 pm

Hi Mirek,

Unfortunately if you don't follow my suggestion I can't help you more.

With all information you gave me the problem is now clear:

You are using 2 GdPicture objects from 2 different threads. in this configuration you can't operate SetNativeImage/GetNativeImage between these 2 objects.

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 » Mon Feb 15, 2010 4:03 pm

Too bad.

In that case, perhaps there is some other solution to such
action based on the streams, or something similar.

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

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Mon Feb 15, 2010 4:13 pm

Why not using clipboard ?

IE:

Code: Select all
GdViewer1.Copy2Clipboard
for full page
or for ROI:
Code: Select all
GdViewer1.CopyRegion2Clipboard


Then:

Code: Select all
Imaging1.CreateImageFromClipboard


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 » Mon Feb 15, 2010 4:31 pm

Loïc,

Thank you for your help.
Maybe this way will solve my problems.

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

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Mon Feb 15, 2010 4:36 pm

You are welcome Mirek.

Hope your problem will be easily solved. Let me know if I can do anything else.

Greetings from France :D
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 » Mon Feb 15, 2010 4:53 pm

Loïc,

You are great, :D

I changed the code according to your suggestion:

------------------------------------------------------------------------------------

chCtrlFrameGdV:GdViewer:Copy2Clipboard().

chCtrlFrameGdI:Imaging:CreateImageFromClipboard ().

chCtrlFrameGdI:Imaging:AutoDeskew().

chCtrlFrameGdI:Imaging:CopyToClipboard().

chCtrlFrameGdV:GdViewer:DisplayFromClipboardData().

chCtrlFrameGdV:GdViewer:Redraw().

------------------------------------------------------------------------------------

Now working OK

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

Re: GdPicture ToolKit Pro Edition - OpenEdge

Postby Loïc » Mon Feb 15, 2010 5:09 pm

Ahh ! I was sure of this :mrgreen:
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 » Mon Feb 15, 2010 11:21 pm

Loïc,

OCR also is working correctly :) .

If someone would have a similar problem you can
direct it to me. We are happy to explain what the
problem is.

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

Previous

Return to GdPicture [Pro] ActiveX

Who is online

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

cron