achieving a weighted inpolygon function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
PIETRO DEVÒ
am 9 Jan. 2022
Kommentiert: PIETRO DEVÒ
am 10 Jan. 2022
Hi,
I have a n x m array, which represents a space of discrete cells, all equal to each other and with a defined spatial size, dx x dy. In each entry of the array I can have a certain parameter, that I will later need to evaluate.
I then have a boundary curve, defined by x and y vectors, that I use to define a study region, closed and spatially homogeneous with the sizes of cells, so that my coordinates are in a range of 0 to n*dx and 0 to m*dy.
Creating the meshgrids, I can succesfully use the inpolygon function to obtain the matrix of internal cells.
What I would also like to obtain is a matrix of weighted membership of each cell to the region defined by the boundary curve, so that I have a number from 0 (fully outside) to 1 (fully inside) that gives me essentially the percentage of area included inside that region for each cell.
What are the possibile ways to achieve that?
Thank you in advance
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 9 Jan. 2022
Not sure I understand. A diagram would help.
All I can guess is that the bwdist() function, to get the Euclidean distance from a point to the edge/boundary, or the regionfill() function might help.
Siehe auch
Kategorien
Mehr zu Smoothing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

