i have to measure distance between the two lines .i used active contour/level set to detect those lines,lines get detected but not able to find distance between those lines.above code results in intensity value.
My answer is very confusing now because you removed the edited the original subject and body so that it's now a totally different question. I'd recommendnot doing that again. It would have been better to just add a followup question here or start a totally new discussion.
You'renot usingactive contours and I don't even know what your loop is now trying to do. Are you trying to find the first and last place on each line where the binary image is true (1)? Or the distance between them?
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.