Need help with vector processing. [message #10885] |
Wed, 11 February 1998 00:00 |
S Penzes
Messages: 4 Registered: February 1998
|
Junior Member |
|
|
Hi one and all,
I am looking for a smart solution to a problem that keeps occuring
and that I can't
seem to find a smart solution for.
Bear in mind that the example I am using here is much simplified from
the image
processing I am trying to do. The goal is to find a solution that
minimizes compute time (ie no loops).
Given a vector (lets say vector=[0,0,6,7,8,8,7,0,0,7,8,0,0]) and the
fact that I have a window that is 3 wide, how do I process vector so
that any data that is greater than 5 and stays that way for more than 3
indexes remains and everything else is set to 0.
vector -> process -> [0,0,6,7,8,8,7,0,0,0,0,0,0]
In my case, vector is the processed result generated from a column from
an image and my goal is to remove any spurious signal that isn't at
least N pixels wide.
There has to be a slick way to process vector with shift,>,gt,where,and
etc so that I don't have to iteratively pass a 3 pixels window over
vector using a loop.
Any ideas?
--
Steven Penzes (Steven.nospamPenzes@dres.dnd.ca)
Note: remove "nospam" from Reply-To and .signature
|
|
|