Detecting and fetching the pokemon card only

I’ve got a pokemon card, I apply edge detection and get its edges, what I want now is to fetch the card only and calculate the length of border on pokemon card on each side. What I cannot understand is, how to fetch the card from a stale background, and then get its borders.
now, what I want is, to detect the distance or length of borders.
By border I mean, the outer yellow edges of the card.

please show the original image