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.
Solved! Go to Solution.
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.