MATLAB: How do I resize (connected) components in a 3D binary image sequence without changing the dimensions of the sequence?

StackOverflow https://stackoverflow.com/questions/20354303

Question

I'd like to resize the components contained in a 3D binary image sequence without changing any of the dimensions of the sequence itself.

I'm not sure if I need to do it on a component-by-component basis, if yes, then how do I create a transform such that the resized components are re-positioned 'correctly' in the image sequence? By 'correctly', I mean with the same centre of mass as the original unprocessed components.

(If that last paragraph doesn't make sense then please ignore)

A 2D example: suppose I wanted to enlarge by 10% the white blobs in the following [295x445] image

enter image description here

How would you do this without making the image itself larger?

Was it helpful?

Solution

you could use the imdilate function to dilate the regions of interest. The examples in the webpage show how to use this function.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top