clipping a raster data within a polygon
Hi, I am new to opencv. What I would like to know is how I can clip a raster data within a polygon (not rectangle) using c++. I.e. Dem data within province border.
Regards
explain "clip" , please.
Cropping out ( or extracting) spatial raster data within a polygon.
you can't. "cropping" means - cut out a rectangle along the axes of the image dimensions.
so -- what do you want / need ? (please try to refine it)
think of it -- how would "clipwith a raster data within a polygon" result in an "image" ?
also: "clipping" usually refers to retaining a pixels value to some e.g. [0..255] range, certainly not , what you wanted.
How about, masking data out of polygon? Or giving null values to data corresponding to out of polygon ?