Measurement of hole perimeters together with particle perimeters

imagej

#1

I found that the Perimeter in the Analyze Particles menu of ImageJ does not count the perimeters of holes included in particles.
Could ImageJ measure the sum of particle perimeter and hole perimeter belonging to the particle together?
If not, is there any software suitable for the analysis?


#2

Attached image is to show what kind of data I’m analyzing.
That’s actually a rock texture. The black areas are particles and white areas are boundaries and other phases.
Some particles contain intra-particle boundaries, and I’d like to measure the length of such intra-particle boundaries together with particle perimeters.
Besides this, it’s much appreciated if you tell me how I can do spline fit for such jagged boundaries with densely packed particles.