This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

VLIB perimeter calculation

Hi,

I am using the function VLIB_calcBlobPerimeter to calculate the perimeter of a circle, and the returned value doesn't match the calculated value from its radius (2*PI*r)

The documentation doesn't explain in detail how is it being calculated. Is it considering 8 bit neighbors or 4 bit neighbors? Is it rotation invariant? (e.g. the perimeter of a diagonal line is equal to the perimeters of the same vertical or horizontal line).

Regards,

Daniel

  • Daniel,

    A pixel is considered to be on the border of the blob if at least one of its 4 closest neighbors (top, bottom, left, right) is not in the blob. In other words, if all 4 of these neighbors are in the blob, then it is NOT a border pixel. The perimeter is the sum of the border pixels.

    Regards,
    Jesse