‎12-22-2014 11:11 AM
Hi Folks,
For tiles ranging in size from a single pixel to n^2 pixels, I need to generate a sequence of patterns that tesselate a circular region in the interior of a 2-d array with a checkerboard of non-overlapping ~ circular regions (as circular as one can make with square pixels).
First thought is to translate the array to an IMAQ Vision image, create a master circular region of interest (ROI), and create successively smaller circular ROIs, translate, and test for overlap in a pixel-by-pixel fashion for each of the created ROIs. Any other possibilities that one could imagine that might be more efficient?
I am posting here rather than in the Vision forum since this is a larger audience.
‎12-22-2014 11:30 AM
‎12-22-2014 12:47 PM
Consider the top view of a disk (what I call my master circular ROI). Now create a "circular" ROI of 4 (2 x 2) pixels, and starting from the center of the master circular ROI, move the ROI to as many positions within the master circular ROI without overlapping. Determine the mean and std. dev. for each of the regions. Then expand the circular ROI to say 13 pixels (approximates the best circle we can get with square pixels considering a 3 x 3 array of 9 pixels + 1 pixel attached to the central pixel of each side of the 3 x 3. Perform the same operation as for the 2 x 2. Etc.
‎12-22-2014 12:53 PM
@DonRothGE wrote:
Determine the mean and std. dev. for each of the regions.
Sorry, still not quite clear. The mean and std dev of what? Are you using this pattern as a window over some other image, or something else? Again, is the intended output an array, an image, or something else? Can you draw an image or provide a diagram, or if the desired output is an array, show us an example of such an array?
‎12-22-2014 12:58 PM
Yes, when each of the circular ROIs is moved to a different position, it creates a mask of just that number of pixels. So it is overlaying portions of the master circular ROI in an image or 2d array. The region that it overlays is what we would get the mean and std. from (each time it is moved). Will draw picture if you still don't understand.
‎12-22-2014 02:59 PM
I think I understand now. I don't have a solution, but sounds like a fun problem to consider over the holidays. I think going to IMAQ is overly complicated, but I'm not that familiar with the IMAQ functions. Here's the beginnings of an approach that uses the Picture palette functions to generate a circular array of data (in this case, both an original and a smaller mask, using the same code). I'll post back if I happen to make any progress on repeating the smaller array inside the larger one.
‎12-22-2014 07:57 PM
Yes, you probably can do the same thing with picture functions, and move the circular region by one diameter iteratively as you could do for IMAQ fxs. I have not utilized the picture control in awhile, mainly sticking with intensity graphs and IMAQ Vision for image display and processing fxs. BTW, did not see any code posted.
‎12-22-2014 08:08 PM
‎12-23-2014 11:05 AM
Here's the snippet I meant to attach. Oddly it appears I succesfully uploaded it, but it didn't get attached to the previous post.
‎01-23-2015 01:43 PM - edited ‎01-23-2015 01:44 PM
So your strategy is similar to what I would consider doing with Vision (which is already employed in this application). Have not gotten any other responses so this strategy is perhaps the most efficient one can perform. If I am able to use square tiles as masks, I can perform an incredibly fast tesselation using IMAQ block statistics VI.
Thank you for taking the time.