Funny enough I was talking with a colleague about this a few days ago. We
came up with these links:

http://stackoverflow.com/questions/2596722/is-there-any-super-fast-algorithm-for-finding-lines-on-picture

or this one

http://en.wikipedia.org/wiki/Hough_transform

These tackle the more general problem of straight line detection in any
direction, instead of only horizontally / vertically.

Kind regards,

Jan-Pieter


2014-02-19 16:05 GMT+01:00 Don Guinn <[email protected]>:

> You may not be interested in a little reading on seismic convolution. This
> is a process to recognize lines (horizons, changes in the propagation of
> sound waves causing a reflection) in seismic data. Seismic recordings of
> reflections (echoes) from a source (sound generator) to geophones (to
> record the echoes) show up as hyperbolas if plotted. Unfortunately the data
> from multiple sources do not line up. To combine data from multiple sources
> the reflection times are migrated to make everything line up. This sounds
> like what you are trying to do as you want to recognize lines. This
> technique goes a little farther as it handles lines of any angle.
>
> The calculations involved take a lot of computing power and are done on
> supercomputers in the oil industry, but are well within the reach of
> today's personal computers.
>
>
> On Wed, Feb 19, 2014 at 5:25 AM, Henry Rich <[email protected]> wrote:
>
> > Look at
> >
> > (1 10$0) E. image
> >
> > or
> >
> > (10 $ 0) E. line
> >
> > Beware of a previously-reported bug in non-literal E.
> >
> > Henry Rich
> >
> >
> > On 2/19/2014 7:04 AM, Joe Bogner wrote:
> >
> >> I can get it aligned, but I'd like to flag the start of the line and not
> >> just when I first detect a line.
> >>
> >> For example, I'm saying a line is when 10 consecutive pixels are 0. This
> >> flags the 10th pixel. When I reshape and align, I'm losing the line
> >> starts.
> >> I apologize for the poor wording of this. Perhaps a picture and small
> test
> >> case will help:
> >>
> >> http://imgur.com/tvQn6ZD
> >>
> >> ]lines=: 2 22 $ (0 0), (10 $ 1), (10 $ 0),(5 $ 1), (10 $ 0), (4 $ 1),
> (6 $
> >> 0)
> >> ]hlines=:(5 (+/)\"1 lines) = 5
> >> ]hlines2=:2 22 {. hlines
> >>
> >>
> >> (note: the 2nd row only has 1 line since the 2nd block only has 4
> >> consecutive pixels = 1)
> >>
> >>     lines
> >> 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
> >> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0
> >>     hlines
> >> 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
> >> 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> >>     hlines2
> >> 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> >> 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> >>
> >> I would like hlines2 to be:
> >>
> >>     hlines2
> >> 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
> >> 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> >>
> >> So in this case, I find the 1s and make the next 4 pixels 1. I'm not
> sure
> >> how to go about that or if this is the right way to solve the problem.
> >>
> >> I might be able to trigger the start with Outfixes... <\."1 lines, but
> >> that
> >> seems inefficient and only gets me partly there. I only considered a
> state
> >> machine but that also seems heavy. Thanks for any input
> >>
> >>
> >>
> >> On Tue, Feb 18, 2014 at 9:42 PM, Joe Bogner <[email protected]>
> wrote:
> >>
> >>  Raul, thanks! Yes, that solved the mismatched shape problem. Now I just
> >>> need to tinker with getting it aligned.
> >>>
> >>> On Tue, Feb 18, 2014 at 9:20 PM, Raul Miller <[email protected]
> >>> >wrote:
> >>>
> >>>  It looks like you are losing 9 pixels from each array.
> >>>>
> >>>> The easy answer would be to put them back. Ideally, you would try to
> put
> >>>> some back on each side so that the result is not too far off center.
> >>>>
> >>>> Thus:
> >>>>     hlines2=: 58 157 {. 58 _152  {. hlines
> >>>>     vlines2=: 58 157 {. _43 157 {. vlines
> >>>>
> >>>> Note that your matched content will be smaller than the original.
> That's
> >>>> also fixable if it's an issue for you.
> >>>>
> >>>>
> >>>>
> >>>  ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >>  ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> 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