For any shape there is a corresponding conversion factor tha you can compute once for all.
For instance, with the picture below, you can estimate an area of 1985219852 pixels and a perimeter of 750750 pixels (this is an inaccurate accurate measurement).