Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Region extraction

Subject: Region extraction

From: privatemeet none

Date: 17 Nov, 2010 16:12:04

Message: 1 of 12

OK, one interesting problem that I cannot solve. Hope that someone have a smart idea.
I have a CT image, and I need to extract onlyx the part of the image. On the image Example.jpg, I need this part extracted, maybe with region growing, roi, or something similar, and it is marked with red line. Actually, I need somekind of mask, or anything similar that I can use to extraxt this area and calculate the surface.
 The original image that I need to work on is Image.jpg.
Any solution?
http://s1192.photobucket.com/albums/aa325/privatemeet/

Subject: Region extraction

From: Sean de

Date: 17 Nov, 2010 16:59:07

Message: 2 of 12

"privatemeet none" <privatemeet@yahoo.com> wrote in message <ic0usk$r0g$1@fred.mathworks.com>...
> OK, one interesting problem that I cannot solve. Hope that someone have a smart idea.
> I have a CT image, and I need to extract onlyx the part of the image. On the image Example.jpg, I need this part extracted, maybe with region growing, roi, or something similar, and it is marked with red line. Actually, I need somekind of mask, or anything similar that I can use to extraxt this area and calculate the surface.
> The original image that I need to work on is Image.jpg.
> Any solution?
> http://s1192.photobucket.com/albums/aa325/privatemeet/

This will get you started

%%%
I = imread('ctnews.jpg');
I = I(:,:,1);
M = shrinkWrap(I,'objthresh',4250,'biggest');

W = watershed(conv2(double(I.*uint8(M)),ones(5),'same'));
imtool(label2rgb(W))
%SCd
%%%

But you'll need to figure out a way to combine the watershed pieces you want.

Subject: Region extraction

From: privatemeet none

Date: 17 Nov, 2010 18:16:03

Message: 3 of 12

Thanks, but I tried shrinkwrap with watershed, but I was stuck. Any solution???

Subject: Region extraction

From: Sean de

Date: 17 Nov, 2010 18:28:06

Message: 4 of 12

"privatemeet none" <privatemeet@yahoo.com> wrote in message <ic1653$qme$1@fred.mathworks.com>...
> Thanks, but I tried shrinkwrap with watershed, but I was stuck. Any solution???

The above code was a start. It isolated just the part you wanted and broke it down into small enough segments that you can recombine them to get the part you want. Maybe distance from centroid to centroid criteria or match against a known shape (resized to the bounding box of what you have). Maybe, since the parts you want to get rid of in that last part are brighter and far from the centroid you could use that? These are just suggestions for you to implement and see what works.

Subject: Region extraction

From: privatemeet none

Date: 17 Nov, 2010 19:09:04

Message: 5 of 12

Thanks Sean,
I will try to play more with this, and contact you soon.
I am trying to extract that portion of the bone for a long time, one more day is not a big issue.
Talk to you soon...
OK?

Subject: Region extraction

From: Sean de

Date: 17 Nov, 2010 19:20:23

Message: 6 of 12

"privatemeet none" <privatemeet@yahoo.com> wrote in message <ic198g$li2$1@fred.mathworks.com>...
> Thanks Sean,
> I will try to play more with this, and contact you soon.
> I am trying to extract that portion of the bone for a long time, one more day is not a big issue.
> Talk to you soon...
> OK?

Sure!

Assuming you have a full 3D volume, is there anything that might be useful to you that could be acquired by looking at this in 3D as opposed to slice-wise? Does the bone span across the whole thing? Does it end quickly? Does it not span part of it so you can exclusively say that if it's in this slice it's not in another slice?

Subject: Region extraction

From: privatemeet none

Date: 18 Nov, 2010 06:04:04

Message: 7 of 12

Sean,
I will try to use this watershed image, and then create a mask on the area extracted. I think this can be helpful.
The thing that I am trying to do is to actually do something like registering images from 2 series of a CT friom the same patient, for exampe, same patient from today and before one month ago. Then I want to extract spine bone (what you helped) and then to register with the other series of images. (I hope you can follow me.. :))
A complicated proces, but this is the first step, I will continue with my research...

Can you tell me how did you extract this area with the proposed method? Because I have tho bones on the side that i do not need extracted (Check the image extracted.jpg), and I also have the hole inside the spine that I do not need??

>
> Assuming you have a full 3D volume, is there anything that might be useful to you that could be acquired by looking at this in 3D as opposed to slice-wise? Does the bone span across the whole thing? Does it end quickly? Does it not span part of it so you can exclusively say that if it's in this slice it's not in another slice?

Subject: Region extraction

From: privatemeet none

Date: 18 Nov, 2010 06:19:03

Message: 8 of 12

Sean,
check the image on http://s1192.photobucket.com/albums/aa325/privatemeet/
Evample1.jpg...
the code is not working here....

Subject: Region extraction

From: privatemeet none

Date: 18 Nov, 2010 06:26:03

Message: 9 of 12

Sorry Sean, the picture is Example2.jpg....

Subject: Region extraction

From: privatemeet none

Date: 18 Nov, 2010 06:29:04

Message: 10 of 12

I tried a bunch of things, but I just cannot get the things done....

Any help???

Subject: Region extraction

From: Sean de

Date: 18 Nov, 2010 14:43:05

Message: 11 of 12

"privatemeet none" <privatemeet@yahoo.com> wrote in message <ic2gtr$i1f$1@fred.mathworks.com>...
> Sorry Sean, the picture is Example2.jpg....

This gets that same portion you wanted before:
I = imread('ctnews2.jpg'); %your image
I = I(:,:,1);
%%
M = shrinkWrap(I,'objthresh',4100,'biggest');

I2 = I.*uint8(M);

%%
I'll reply about the registration in the other thread.

Subject: Region extraction

From: privatemeet none

Date: 18 Nov, 2010 15:45:06

Message: 12 of 12

Wov, this is great! You are a genius!
Let me try it on some more examples....

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us