Pokemon cards, borders grading

Pokemon cards are really worth a lot if they are graded and their grade is high, I’m trying to build a pokemon card border grader. We get a high border rating if the border is even from all sides, and to check if borders are even, we give it a high rating. I’ve done a lot of work but I get no good results.
If anyone has any idea about its grading, please do let me know.
I’m attaching an image for reference.
7

first you need a better image than that. that’s close to a thumbnail, and it’s squashed.

then you need to learn the basics. opencv documentation comes with tutorials.

you will need thresholding and contour extraction. that’ll give you a basis. then you’ll need to do calculations on that contour that correlate to “grading”