LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

crop a circle bounded by a square and obtain pixel data

If I have a square picture which bounds a circle, how do I crop it and obtain only the pixel grayscale data within the circle?
0 Kudos
Message 1 of 2
(2,664 Views)
You can't do cropping in LabVIEW without additional toolkit.

You can get all pixels within the bounding square in 1D array using Invoke Node>Get Image. Then convert 1D to 2D array use Unflatten Pixmap.vi. Use the array index to determind whether the pixel is inside the circle or not.

If you're dealing with a color picture, you better to convert it to grayscale before handle, because it's slow.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 2 of 2
(2,664 Views)