LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get data inside a defined circle from a graph.

I have 3 column of data and I am plotting a surface plot where 1st and second column represents x and y coordinate of the graph and 3rd column is intensity. This works. I get a intensity plot (and also a 2d array). 

 

What I want to do next is draw a circle of specified size and get the data (2d array) inside that circle. If 50% or more of any of the pixels are inside the circle, I would take it to be inside the circle.

 

Can I get some help how to do this?

Download All
0 Kudos
Message 1 of 3
(2,227 Views)

@babu726 wrote:

I have 3 column of data and I am plotting a surface plot where 1st and second column represents x and y coordinate of the graph and 3rd column is intensity. This works. I get a intensity plot (and also a 2d array). 

 

What I want to do next is draw a circle of specified size and get the data (2d array) inside that circle. If 50% or more of any of the pixels are inside the circle, I would take it to be inside the circle.

 

Can I get some help how to do this?


You're probably thinking of trying to do that in a graphical way, but maybe the easiest way is to plot the circle but use math to decide whether or not each point falls within the circle.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 3
(2,220 Views)

the math should be straight forward, sqrt(dx^2+dy^2)>r remove point else it is in the circle where dx and dy are the distances of the point from the center x,y.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 3
(2,206 Views)