image processing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

image processing

vita
Hey everyone;
 

 Just want to know if anyone of you had been working with NetLogo for image processing problems.
 Well, my problem is, when I want to calculate any metric like Mean or Standard deviation, the instruction neighbor of doesn't take into consideration the central patch (pixel) itself.
 i.e, in a mask of  3X3 I have just 8 patches.
 I hope that you can clarify this for me.
 thank you =)
 

Reply | Threaded
Open this post in threaded view
|

Re: image processing

Jim Lyons

> On Jul 13, 2018, at 1:06 PM, [hidden email] [netlogo-users] <[hidden email]> wrote:
>
> Just want to know if anyone of you had been working with NetLogo for image processing problems.
>
> Well, my problem is, when I want to calculate any metric like Mean or Standard deviation, the instruction neighbor ofdoesn't take into consideration the central patch (pixel) itself.
>
> i.e, in a mask of  3X3 I have just 8 patches
>

Make a patch variable and initialize it at setup to be the patch-set of the central patch itself and 8 neighbors.

patches-own [ my-hood ]

to set-up
  ;;;
  ask patches [ set my-hood (patch-set self neighbors) ]
  ;;;
end

HTH,
Jim
Reply | Threaded
Open this post in threaded view
|

Re: image processing

vita
thank you so much it was very helpful =) Vita