gradients command on web page not defined in ocroscript

0 views
Skip to first unread message

grahamgrebe

unread,
Nov 16, 2008, 2:52:51 AM11/16/08
to ocropus

Hi

Quick version:
Web page gives 'gradients' in example, but 'gradients' not found in
ocroscript.

Long version:

I see from http://ocrocourse.iupr.com/image-processing an example of
the Canny edge detector. The sample program includes the command
'gradients':
read_image_gray(byteimage,arg[1])
image:copy(byteimage)
gauss2d(image,3.0,3.0)
gradients(gradm,gradx,grady,image)

I'm using the ocroscript that comes with ocropus-0.2:
guest@filer:~/ocropus-0.2/ocroscript$ ocroscript -v
OCRoscript (interactive)

But gradients does not seem to be defined:
guest@filer:~/Desktop$ ocroscript canny.lua
ocroscript: canny.lua:11: attempt to call global 'gradients' (a nil
value)
stack traceback:
canny.lua:11: in main chunk
[C]: ?
guest@filer:~/Desktop$

I looked for gradients in the .pkg files, but didn't find it. Looked
around in the subversion server, particularly image.pkg, and didn't
see anything there either.

Is 'gradients' something that existed in a previous release? Is there
an equivalent function in ocropus-0.2?

Thanks,
--Graham

grahamgrebe

unread,
Nov 16, 2008, 3:03:46 AM11/16/08
to ocropus
Found it. Looks like 'gradients' has been added since ocropus 0.2.
--Graham

On Nov 15, 11:52 pm, grahamgrebe <grahamgr...@gmail.com> wrote:
> Hi
>
> Quick version:
> Web page gives 'gradients' in example, but 'gradients' not found in
> ocroscript.
>
> Long version:
>
> I see fromhttp://ocrocourse.iupr.com/image-processingan example of

Thomas Breuel

unread,
Nov 16, 2008, 7:56:13 AM11/16/08
to ocr...@googlegroups.com
The tutorial uses a version of OCRopus between 0.2 and 0.3. The main
difference to 0.2 is that there are some extra commands. The main
difference to 0.3 is that you now need to import the modules:

import_all(ocr)
import_all(iulib)
import_all(graphics)
import_all(nustring)
import_all(tesseract)

Tom
Reply all
Reply to author
Forward
0 new messages