Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function result = getRoundness2(image)
- P = getPerimeter(image);
- [mean_x, mean_y] = getGravityCenter(image);
- u = 0;
- cont = getContourCoordinates(image)
- // FIXME
- // u = u + sqrt((cont(i, x) - mean_x)^2 + (cont(i, y)^2);
- u = 1 / P * u;
- d = 0;
- // FIXME
- // d = d + (sqrt((cont(i, x) - mean_x)^2 + (cont(i, y)^2) - u)^2;
- d = sqrt(1 / P * d);
- C2 = u / d;
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement