LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tesselation of circular regions within master circular region

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.  

0 Kudos
Message 1 of 10
(3,234 Views)
Could you provide an example of what you're trying to generate? Are you trying to create an image, or an array?
0 Kudos
Message 2 of 10
(3,229 Views)

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.

0 Kudos
Message 3 of 10
(3,214 Views)

@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?

0 Kudos
Message 4 of 10
(3,209 Views)

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.

0 Kudos
Message 5 of 10
(3,205 Views)

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.

0 Kudos
Message 6 of 10
(3,186 Views)

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.

0 Kudos
Message 7 of 10
(3,169 Views)
Oops, looks like I failed to attach the snippet. It's on my work machine, I'll try to remember to add it tomorrow morning.
0 Kudos
Message 8 of 10
(3,167 Views)

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.

CircularArrayMask.png

Message 9 of 10
(3,134 Views)

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.

0 Kudos
Message 10 of 10
(2,984 Views)