Skip to content
Prev 10199 / 398503 Next

Clip contour or image

Han Lai schrieb:
Hi,

I had a similar problem some weeks before. My problem was to clip an
interpolated (kriged) surface image of a lake to its _irregular_shaped_
shoreline. My solution was some kind of "image manipulation". I
"stamped" the shoreline into the image matrix and filled the region
outside with the help of the seedfill algorithm, which I implemented as
an external shared library (runs as Win32-DLL and .so on Linux). 

You will need the compiled C library and some R functions. If you or
another one who would be interested on my R and C functions, I can give
it to you. 

Maybe it would be worth to create a package with "basic image
manipulation procedures" for matrices. If there is anybody, who has a
better (or easier) solution, I would be interested too.

Thomas Petzoldt