So long as you have a good image which shows porosity in the sample you can use ImageJ software. You should have share a sample micrograph to make people understand if it is possible to do the analysis or not. However, the basic steps are as follows -
1. Set scale of the image in ImageJ
2. Make your image into a 8bit image (within ImageJ)
3. Adjust contrast and brightness.
4. Threshold your image.
5. Do "analyse particle" (ImageJ doesn't know if it is a pore or particle!!)