From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity graph smoothing

hi, am new to labview. i have a doubt regarding the smoothing of the graph. i fed the values of x and y axis in the intensity graph and made it to  look like foot. after making it looks like the below attached image, i want to smooth the intensity graph .pls help me.

0 Kudos
Message 1 of 19
(10,254 Views)

Post your code (this usually means "Attach a VI" -- if you have multiple VIs, compress the folder that contains them and attach the resulting .ZIP file).

 

Bob Schor

0 Kudos
Message 2 of 19
(10,207 Views)

You can try 3D graph - surface.

 

With the following settings it looks like interpolated intensity graph:

Right click, select 3D plot properties

 

Graph

-> View direction -> towards XY plane

-> View projection -> Orthographic

 

Surface

-> Surface -> Color mode -> Interpolated shading

-> Surface -> Mesh -> Off

0 Kudos
Message 3 of 19
(10,193 Views)

thanks for the reply. i attached the vi. i want to smoothen the graph.

0 Kudos
Message 4 of 19
(10,170 Views)

Please explain what you mean by :smoothing". It could man many things, for example:

 

  • Convolute with a gausian kernel or similar.
  • Use a finer grid and bilinear interpolation.
  • Do antialiasing,
  • etc.

Plese explain what kind of result you expect from the given data.

 

(... and also please use regular array container sizes with scrollbars, not array controls that are dozens of screens high. Also you should not wire N of the FOR loop when autoindexing.)

 

0 Kudos
Message 5 of 19
(10,152 Views)
Thanks for the reply. I want to do antialiasing.
0 Kudos
Message 6 of 19
(10,124 Views)

sir, am attaching the image of intensity graph after feeding the values to x and y. the output has sharp edges, i want to smoothen it.

0 Kudos
Message 7 of 19
(10,100 Views)

Your image has sharp edges because the "pixels" are large squares. What you should do is resample the data at a higher resolution using bilinear ipterpolation.

 

An example is given here.

You also need the subVI from here.

 

 

Here is a coarse 4x4 grid resampled at a 40x40 grid.

 

 

 

While you are at it, please also vote for this idea. Thanks.)

Message 8 of 19
(10,084 Views)

Here's a very simple example. Probably needs a few tweaks.

Modify as needed.

 

 

 

Download All
0 Kudos
Message 9 of 19
(10,071 Views)

Of course in this particular case it would be easier to use the stock tools from the interpolation palette. Here's that version:

 

 

Download All
0 Kudos
Message 10 of 19
(10,009 Views)