Skip to main content
Notice removed Authoritative reference needed by yode
Bounty Ended with Niki Estner's answer chosen by yode
added 200 characters in body
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183

I have a picture:

enter image description here

The sunk area is a phase,and the bulged area in another phase.I want count the proportion of this two area.this is my method.First I get the mask by Image-Tool.

enter image description here

you can download to use it.

enter image description here

gra = GradientFilter[img, 2]; ImageCompose[img, {(comp = WatershedComponents[gra, mask]) // Colorize[#, ColorRules -> {13 -> Transparent}] &, 0.6}] 

enter image description here

Then the result is appear:

ComponentMeasurements[comp, "Count"] // SortBy[#, Last] & // Values // {Total[Most[#]], Last[#]} & // #/Total[#] & // N 

{0.547061, 0.452939}

But as you see,some unsatisfactory place like this place lead to the result is imprecise.:

enter image description here

BTW,the use of Image-Tool to pick so many component is very unadvisable.Can anybody give a more smart and more precise solution?

Update:

As the @SimonWoods 's request,I process the origional picture by PhotoShop and upload it:

enter image description here

I have a picture:

enter image description here

The sunk area is a phase,and the bulged area in another phase.I want count the proportion of this two area.this is my method.First I get the mask by Image-Tool.

enter image description here

you can download to use it.

enter image description here

gra = GradientFilter[img, 2]; ImageCompose[img, {(comp = WatershedComponents[gra, mask]) // Colorize[#, ColorRules -> {13 -> Transparent}] &, 0.6}] 

enter image description here

Then the result is appear:

ComponentMeasurements[comp, "Count"] // SortBy[#, Last] & // Values // {Total[Most[#]], Last[#]} & // #/Total[#] & // N 

{0.547061, 0.452939}

But as you see,some unsatisfactory place like this place lead to the result is imprecise.:

enter image description here

BTW,the use of Image-Tool to pick so many component is very unadvisable.Can anybody give a more smart and more precise solution?

I have a picture:

enter image description here

The sunk area is a phase,and the bulged area in another phase.I want count the proportion of this two area.this is my method.First I get the mask by Image-Tool.

enter image description here

you can download to use it.

enter image description here

gra = GradientFilter[img, 2]; ImageCompose[img, {(comp = WatershedComponents[gra, mask]) // Colorize[#, ColorRules -> {13 -> Transparent}] &, 0.6}] 

enter image description here

Then the result is appear:

ComponentMeasurements[comp, "Count"] // SortBy[#, Last] & // Values // {Total[Most[#]], Last[#]} & // #/Total[#] & // N 

{0.547061, 0.452939}

But as you see,some unsatisfactory place like this place lead to the result is imprecise.:

enter image description here

BTW,the use of Image-Tool to pick so many component is very unadvisable.Can anybody give a more smart and more precise solution?

Update:

As the @SimonWoods 's request,I process the origional picture by PhotoShop and upload it:

enter image description here

Notice added Authoritative reference needed by yode
Bounty Started worth 50 reputation by yode
Tweeted twitter.com/StackMma/status/674247048728879104
Source Link
yode
  • 27.8k
  • 4
  • 69
  • 183

How to count proportion of two phase in a electron microscope picture

I have a picture:

enter image description here

The sunk area is a phase,and the bulged area in another phase.I want count the proportion of this two area.this is my method.First I get the mask by Image-Tool.

enter image description here

you can download to use it.

enter image description here

gra = GradientFilter[img, 2]; ImageCompose[img, {(comp = WatershedComponents[gra, mask]) // Colorize[#, ColorRules -> {13 -> Transparent}] &, 0.6}] 

enter image description here

Then the result is appear:

ComponentMeasurements[comp, "Count"] // SortBy[#, Last] & // Values // {Total[Most[#]], Last[#]} & // #/Total[#] & // N 

{0.547061, 0.452939}

But as you see,some unsatisfactory place like this place lead to the result is imprecise.:

enter image description here

BTW,the use of Image-Tool to pick so many component is very unadvisable.Can anybody give a more smart and more precise solution?