Hi all,<div><br></div><div>I am learning how to use neighborhood iterator and apply it to study a toy model. I found the following:</div><div><br></div><div>when looping the neighborhood iterator, it still acts like the regular image iterator, ie, running all pixels. This feature is not what I feel like. </div>
<div><br></div><div>My toy model is like this: I have a 2D image with, say, 4X4 pixels. I randomly assign gray values 0 or 1000 to these 16 pixels. For those with 1000, I try to put those which has at least 1 common side (1-connectivity) and count how many of these connected pixels. I thought neighborhood iterator would be ideal in this study.</div>
<div><br></div><div>If you anyone can help me out on either neighborhood iterator or the toy model, I would greatly appreciate it.</div><div><br></div><div>Ming</div>