[Python] OpenCv group / locate a number of entities that repeat

Discussão em 'Python' iniciado por Stack, Janeiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    I have been struggling with a couple of OpenCV problems I'm trying to overcome. I'm currently working on a game bot that scraps the information off the screen.

    It would be great if I could get some pointers or advice on where to go next.

    This is the whole screen

    [​IMG]

    This is the more interesting part with the stuff highlighted that I'm trying to get. Ive identified a single 'contact' and the important info.

    [​IMG]

    With it being a repeating list of picture, name, area, new message notification. I was wondering if I can set a group / layout / template to say when I see a circle(profile Pic) there will be all this interesting stuff x,y pixels to the right?

    My other line of thinking would be to find the circle(profile pic) then say offset x,y then cut the image x,y distance to break each 'contact' into a new image then loop through them that way.

    ultimately I was aiming to get a array of custom objects that had all this information in that I can then loop over

    My second question was the profile pictures themselves. You may notice that some have a little green pills on the foreground. If I screen grab one to do a match template on would the pixels in the profile picture throw the match off?

    I was going to do a mask with a circle in it the same height/width but didnt know if the pill symbol itself would then not make a match happen.

    I'm currently coding this part up and am constantly hitting brick walls. I can upload what I create and add refinements to it as I go.

    Thanks

    Continue reading...

Compartilhe esta Página