It depends on how your porosity looks like. If the pores hae a rather regular shape and are well defined, yes you can, but it'll be not very accurate. If there are ill-defined and very small so that no all van be observed, then definitly no. SEM images (which are 2D) should be rather used for measuring pore size and estimatingp ore morphology, but is not the best for measuring porosity (which is 3D quantity).
Yes, you can do it. But you should be aware that it only gives you the value of porosity at the scale at which you can observe it. It is macoporosity only. In the case of mesoporosity (2 - 50 nm) and, worse, microporosity (< 2 nm), huge errors can be made as these pores are very difficult to see by SEM or just impossible (and require TEM instead), respectively. Now, micropores can represent the major part of the porosity in some materials, and can only be assessed by adsorption experiments. If the surface area of your film is less than 1 m2/g, typically, than it is certainly free of microporosity, and SEM determination of porosity can be enough. If it is a carbon membrane, microporosity is probably present ...
It will not give accurate but you can use it for comparison because you got surface of your every sample and you can find the difference in Porosity . By using image J software you can do.