Skip to main content
Solved

Convolution and kernel filters for rasterdata


Hello,

 

I am wondering if its possible to implement Imageprocessing tools in FME?

 

For instance: Lets say you have a LIDAR file and want to make presentable contours. You then take ur filltered LIDAR file, do some processing to it first, then you make contours, write the contourvector to a raster, and on the raster I would like to have to oportunity to do Image processing, with a convolution/kernel filter.

 

 

Can this be implemented i FME?

 

 

 

Best answer by kim

I am afraid that on the subject of convolution and other kernel techniques the answer is a no. At least, I tried this about 2 years ago and couldn't get it to work. Don't think it has changed since.

 

 

There's a possibility for small kernels: duplicating the raster onto different bands (say 8 times) and moving them all by 1 cell will allow you to make a fake 3x3 kernel, using a rasterexpressionevaluator and using different bands instead of different neighbours for the calculations. This gets cumbersome (and slow) fast.

 

 

I tried accessing the raster data from the python API to use it with a custom kernel processor, but I've not found a way to do this. Preferably you'd access the data as a 2D array, the rest is reasonably easy. If you do find a way, please let me know!
View original
Did this help you find an answer to your question?

takashi
Supporter
  • January 23, 2014
Hi,

 

 

The ContourGenerator or the SurfaceModeller transformer can be used to generate contour from point cloud. And then, you can use the VectorOnRasterOverlayer to draw the contour onto a raster.

 

Try them.

 

 

Takashi

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • January 23, 2014
Hi,

 

 

You will have to introduce the image processing filter yourself, since no transformer exists for the job.

 

See the following page for some examples.

 

 

Itay

Forum|alt.badge.img+5
  • January 24, 2014
I am afraid that on the subject of convolution and other kernel techniques the answer is a no. At least, I tried this about 2 years ago and couldn't get it to work. Don't think it has changed since.

 

 

There's a possibility for small kernels: duplicating the raster onto different bands (say 8 times) and moving them all by 1 cell will allow you to make a fake 3x3 kernel, using a rasterexpressionevaluator and using different bands instead of different neighbours for the calculations. This gets cumbersome (and slow) fast.

 

 

I tried accessing the raster data from the python API to use it with a custom kernel processor, but I've not found a way to do this. Preferably you'd access the data as a 2D array, the rest is reasonably easy. If you do find a way, please let me know!

  • January 27, 2014
Thanks for the reply. I will probably need a 7x7 kernel to smoothen the lines and its only one band, so I cant use this technik.

 

Guess I have to output the raster then to the kernel filtering.

helmoet
Forum|alt.badge.img+8
  • February 23, 2018

Hi, @paal, @kim, check this out! I tried to create a RasterConvoluter as an image processing tool on FME Hub. It only supports a single real*64 band type, however for starters sake... Anyway, FME has plenty of tools to translate any kind of raster to real*64 and back to colored images. Have fun with it.


deanatsafe
Safer
Forum|alt.badge.img+6

helmoet
Forum|alt.badge.img+8
  • February 21, 2019
deanatsafe wrote:

Very happy (now find the time to play with it)!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings