I came up with a slightly different approach that seems to work well on my
test cases so far:

http://drp.io/jsnW

xb =: 600 >: x2 NB. make 1 if less than 600 combined RGB

lineDetect=: 4 : 0
LINE=:x
lineStarts=:((1, LINE) $ 1) E. y
lineEnds=: |."1 ((1, LINE) $ 1) E. |."1 y
lD=:lineStarts+.lineEnds
)
hlines=:77 lineDetect xb
vlines=:|: 77 lineDetect |: xb

lines=:hlines+.vlines

It makes it really easy to try different combinations of line lengths

Much nicer to look at than the python version.  I now will start working on
how to crop the image at the coordinates of a cell. I'm thinking I can
detect a corner by looking at the pixels or run lengths of a line
surrounding a point..

Thanks for all the help!




On Wed, Feb 19, 2014 at 11:57 AM, Raul Miller <[email protected]> wrote:

> On Wed, Feb 19, 2014 at 11:06 AM, Joe Bogner <[email protected]> wrote:
>
> > Input: http://drp.io/files/5304d74f7ba1d.jpg
> > Output: http://drp.io/files/5304d7049f938.jpg
>
>
> Pretty!
>
> (Or am I just showing how warped my tastes are?)
>
> Thanks,
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to