Pixels Stats inside Polygons
Hi,
I have a 4 band image and a layer of polygons (.shp). I want to compute min,max,std.div, variance of all pixels inside each polygon in polygon layer for all bands. How can I do it using OpenCV. I am using c++.
Many thanks,
Maz
OpenCV is not able to do this, simply because it cannot process
.shp
files. This means that you need to find a C++ library that reads in the files and converts them to an array of points. Then you can use those points to define a polygon mask in OpenCV, apply that to all layers of your image, than calculate those min max std and div values.