LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image processing in LabVIEW

There is around 100 intensity values more then the coordinates but it is ok, we can delete them.

 

Best. 

0 Kudos
Message 11 of 18
(1,070 Views)

Do you have requirements for the interpolation?

 

Nearest neighborhood interpolation is still interpolation, but often doesn't suffice.

 

Anyway, the biggest problem is the amount of data. Simply finding the nearest point(s) in a naïve way takes a lot of time (several minutes), just because each destination coordinate needs to be compared with all other data points.

 

The data you have is ordered. You can probably benefit from that, if you can somehow separate the individual lanes.

 

Otherwise, I guess you can make bins (basically the original coordinate modulus something to speed up the search for nearest points. You'd need either overlapping bins, or search the bin the point is in and it's neighborhood bins.

 

I'm not sure I can have a go at that, something came up before my 3 week holidays.

 

BTW. you're not alone:

https://stackoverflow.com/questions/37963504/interpolating-between-multiple-points

Always nice to see your problem being classified as 'non trivial'. Some great pointer there though.

0 Kudos
Message 12 of 18
(1,064 Views)

btw with naïve interpolation (nearest and taking for ever) I got a picture of a rotated tunnel.

 

Is this LIDAR data or something? Just curious.

0 Kudos
Message 13 of 18
(1,062 Views)

Hello,

 

Can you please send me the VI you did for interpolation.

 

Best.

0 Kudos
Message 14 of 18
(1,057 Views)

@yass_BER wrote:

Can you please send me the VI you did for interpolation.


Interpolation is a big word. I just picked the closed point (in a naïve way). Formally that is interpolation...

 

It takes a while to run (depending on the points in the ramp).

 

0 Kudos
Message 15 of 18
(1,039 Views)

Here's an update.

 

It is not correct. It puts the points in bins (in a messy way, this needs cleanup!). Then it only looks in the right bin for the closest point. Or closest point if you are eventually doing barycentric coordinates or something like that.

 

The closest point could be in the next or previous bin, if it's at a border. That can be adapted fairly easy, it's just more detail. But simple array manipulation.

 

It gets the rendering from minutes to seconds.

 

There's no downside, but it is tricky to get the bin's right. But be careful, if the bins are too small, the current, next and previous bin might all be empty. If they are too large, it will get slow again. As your points are on a grid, that shouldn't be too hard to find a good bin size.

 

EDIT: Oops, must save VI before uploading.

 

0 Kudos
Message 16 of 18
(1,013 Views)

@yass_BER wrote:

I am using intensity graph and i want to ameliorate the look of the image.

[...]

I am receiving data from a robot X,Y and i have the intensity of each pixel, However, the robot doesn't go through all the points ( i set 0 by default to that pixels), and now i want to interpolate the data in order to have a better look of the image


if this is only a cosmetic issue, couldn't you just repeat the last valid pixel?

repetition.png

 

 

Of course, wiebe's approach is much more sophisticated and the result also looks much better in comparison:

comparison.PNG

 

 

 

0 Kudos
Message 17 of 18
(984 Views)

after the repetition, we could  do some smoothing by applying a local average in a 6x6 window

by using the https://zone.ni.com/reference/en-XX/help/371361P-01/lvanls/convolution/

 

local-average.png

 

0 Kudos
Message 18 of 18
(979 Views)