Skip to main content
Solved

Convolution and kernel filters for rasterdata

  • Jan 23, 2014 11:46 AM UTC
  • 7 replies
  • 95 views

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

takashi
Celebrity
  • Jan 23, 2014 12:10 PM UTC
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
Safer
Forum|alt.badge.img+22
  • Safer
  • Jan 23, 2014 12:29 PM UTC
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
  • Best Answer
  • Jan 24, 2014 2:56 PM UTC
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!

  • Author
  • Jan 27, 2014 8:16 AM UTC
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
  • Feb 23, 2018 9:38 PM UTC

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
  • Safer
  • Feb 14, 2019 12:06 AM UTC

helmoet
Forum|alt.badge.img+8
  • Feb 21, 2019 4:55 PM UTC

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