'Finding the edges of a partial ellipse in an image

I have an binary image as shown below.

enter image description here

As can be seen in the image there is an edge which looks like an arc of an ellipse, as illustrated below and I manually marked it as red. These red pixels should be found by the code.

enter image description here

My goal is to fit an ellipse to the pixels that are colored in red in the above picture. This fitted ellipse is shown in below.

enter image description here

Could someone kindly tell me how I can get the pixels that are marked as red in the second image using MATLAB? I will then use them for an elliptical fitting.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source