LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Surface Plot data 'Smoothing'

Solved!
Go to solution

Hi Guys,

I'm using LabVIEW to plot a realtime 3D surface Graph using distance data collected from 3 ultrasonic transceivers, with a transceiver for each corresponding axis (X, Y & Z), with X and Y providing data on where the module is within an area and Z mapping the topography. Although it functions as it should the plot produced is very erratic, as shown in the attached image. How would I go about smoothing out the plot, to remove the seemingly random and out of place data? The image attached is an attempt to plot a surface with several small objects.

I am a first year Electronic Engineering student using labview for the first time on my end of year project.

 

- Cheers.

  

 

Download All
0 Kudos
Message 1 of 3
(833 Views)

A very simple smoothing filter would take a given pixel's value, then average it with the 8 surrounding pixels, returning that as the new pixel. Adding more smoothing can be accomplished by moving to 2 pixels away or 3 pixels away, possibly weighting each one separately.

 

More advanced algorithms certainly exist, but that can get you started. I'd try Googling for "2D smoothing algorithms". There may be some in LV's mathematics options but I've never dug into it before so I'm not sure.

 

Also, your code has a lot of places where it might be adding NaN's, which can be tricky to get them to plot correctly.

Message 2 of 3
(797 Views)
Solution
Accepted by topic author RobotRyan

Search for (ctrl-space bar) "Interpolate 2D".

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 3
(793 Views)