On Mar 7, 3:27 pm, Ian Kelly wrote:
> On Wed, Mar 7, 2012 at 1:03 PM, Ian Kelly wrote:
> > A set of defective pixels would be the probable choice, since it
> > offers efficient membership testing.
>
> Some actual code, using a recursive generator:
>
> def get_cluster(defective, pixel):
> yiel
On 3/8/12 9:12 AM, Enrico Franchi wrote:
Wanderer wrote:
How
do you handle this sort of thing in Python?
I believe that the best thing to do is a Union-Find algorithm.
Another term this problem is finding the "connected components". Here is some
code from Stefan van der Walt for this:
Wanderer wrote:
> How
> do you handle this sort of thing in Python?
I believe that the best thing to do is a Union-Find algorithm.
Depending on the exact nature of your problem, you may also want to
check out the Hoshen-Kopelman Algorithm. Although the algorithm itself
is rather efficient, it
On Wed, Mar 7, 2012 at 1:03 PM, Ian Kelly wrote:
> A set of defective pixels would be the probable choice, since it
> offers efficient membership testing.
Some actual code, using a recursive generator:
def get_cluster(defective, pixel):
yield pixel
(row, column) = pixel
for adjacent
Am 07.03.2012 20:49, schrieb Wanderer:
I have a list of defective CCD pixels and I need to find clusters
where a cluster is a group of adjacent defective pixels. This seems to
me to be a classic linked list tree search.I take a pixel from the
defective list and check if an adjacent pixel is in th
On 07/03/2012 19:49, Wanderer wrote:
I have a list of defective CCD pixels and I need to find clusters
where a cluster is a group of adjacent defective pixels. This seems to
me to be a classic linked list tree search.I take a pixel from the
defective list and check if an adjacent pixel is in the
On Wed, Mar 7, 2012 at 12:49 PM, Wanderer wrote:
> I have a list of defective CCD pixels and I need to find clusters
> where a cluster is a group of adjacent defective pixels. This seems to
> me to be a classic linked list tree search.I take a pixel from the
> defective list and check if an adjace
I have a list of defective CCD pixels and I need to find clusters
where a cluster is a group of adjacent defective pixels. This seems to
me to be a classic linked list tree search.I take a pixel from the
defective list and check if an adjacent pixel is in the list. If it is
I add the pixel to the c