captchaSolveR icon indicating copy to clipboard operation
captchaSolveR copied to clipboard

subscript out of bounds

Open roneyfraga opened this issue 9 years ago • 3 comments

Hi, thanks for captchaSolveR.

I'm using a macbook with R 3.2.1, I have the tesseract installed, and when I run the script 00_main.R appears this error message:

> update_packages <- FALSE
> source("demo/01_initialize.R")
> source("demo/02_load.R")
> source("demo/03_crack_captcha.R")
Error in `[<-`(`*tmp*`, zeroy + (y - 1), zerox + (x - 1), value = 1) :
  subscript out of bounds

This error occurs in the function,

letter <- rotateAndCombine(letter, angle=rotation, nrows, ncols)

do you have any idea for solve this error?

best Roney

roneyfraga avatar Jul 13 '15 22:07 roneyfraga

Same error. Please, help us.

andriiabaimov avatar Jan 21 '16 15:01 andriiabaimov

I have the same problem, would appreciate any help.

Libum avatar Jul 03 '16 21:07 Libum

It looks like problem is with plotLetters function zero,y is to large number. I have no idea if it's good to divide it by 4 instead of 2

 zeroy <- length(canvas[, 1])/2
  zerox <- 10 + (letter_width * (number - 1))
  
  # Plot the letter on the canvas
  for(y in 1:heighty){
    for(x in 1:widthx){
      canvas[zeroy + (y - 1), zerox + (x - 1)] <- img.data[y, x]
    }
  }

maciejorlos avatar Feb 05 '17 22:02 maciejorlos