Detecting the outer edge of an object in an image
Assuming the question is about Mathematica...
SelectComponents[
MorphologicalPerimeter@MorphologicalBinarize@i, "Count", -2]
One method to isolate the outer edge in Mathematica is to use the EdgeDetect[]
function.
Note: I hand tuned the program for this image (it will not work for other images).
img = Import["https://i.stack.imgur.com/0wc6Q.jpg"];
EdgeDetect[img, 1, .43] - EdgeDetect[img, 1, .45]
An approach that doesn't need too much tweaking is to use LocalAdaptiveBinarize followed by the selection of the largest component:
img = Import["https://i.stack.imgur.com/0wc6Q.jpg"];
object = ColorNegate@DeleteSmallComponents[LocalAdaptiveBinarize[img, 30]]
MorphologicalPerimeter@SelectComponents[object, "Count", -1]