You can create a mask circle with radius 6 with center at x,y
in Matlab as follows:
main.m317 chars14 lines
This code creates a meshgrid of x-y coordinates for the image, and then creates a binary mask of pixels within the circle by checking if each pixel's distance from the center is less than or equal to the radius. Finally, you can set the masked pixels to a desired value (e.g. 255) to create the mask circle.
gistlibby LogSnag