MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Horizon profile from binary array

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101697] Horizon profile from binary array
  • From: Gareth Russell <russell at njit.edu>
  • Date: Tue, 14 Jul 2009 07:34:17 -0400 (EDT)

Dear Group,

I am wondering if anyone has a good insight about the following 
calculation problem. I have a binary array representing a landscape -- 
for example, ones might be forest, aranged in many patches, and zeros 
non-forest. For a given zero pixel, I would like to create a 'horizon 
profile', analogous to what you would see if you were standing in that 
pixel of the landscape, rotated 360 degrees, and assessed the distance 
to the nearest 'one' as you swept through the circle. The result would 
be a vector of distances in some step size from zero to 360. (The 
angular step size would need to be quite small, because I would want to 
be able to pick out isolated pixels in the distance.) Sort of like a 
radial profile, but with a more complicated set-up than a single closed 
boundary.

This sounds like a computationally intensive problem, which could be an 
issue as I would ideally like to do it for every 'zero' pixel. (The 
goal is to use the pixel profiles to create a 'movement field' value at 
each zero pixel that reflects perception of where the 'one' pixels are. 
This in turn will be used to direct movement of organisms by directed 
diffusion.)

I can think of a few clunky and slow ways to create the profile, but 
would appreciate any good ideas.

Thanks,

Gareth

-- 
Gareth Russell
NJIT



  • Prev by Date: Re: stirring chocolate pudding backwards: identifying coordinates
  • Next by Date: Assigning Values to Many Symbols at Once
  • Previous by thread: Re: Interactive .nb works, but converted .nbp fails
  • Next by thread: Assigning Values to Many Symbols at Once