In order to improve your current code i.e., to decrease the number of holes in the background, you can try using morphological operations that fill in gaps.
Here is a link that might help: Morphologically close image - MATLAB imclose (mathworks.com)
For stacking up circular lesions from each frame into a 3D cylinder, you can refer to this answer : Stacking multiple 2D images to form 3D image. - MATLAB Answers - MATLAB Central (mathworks.com)
