It seems like this counts the circular area? What I wanted is detect the darken patch inside the circle and calculate the percentage by comparing it with the area of inner circle. I'm new to matlab and sorry If I'm wrong.
@Dinuka Ratnasinghe This is also possible with the addition of just one or 2 lines in my code. I have answered the question based on your original question "How do I detect and find the discolored area as a percentage of selected area"
Steps:
The Larger Section is already extracted (Done)
Get the inner circle with considering different threshold value, here you need to segment the inner circle only (Or you may consider the edges and consider largest blobs only)
Once done calculate the percentage of pixels as you want.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.