Jul-30-2019, 04:20 AM
Hi,
I have an application that needs to determine when a particular icon is showing:
X
Lakitu
Mario
One icon will be showing at any given time, the background behind the icon will always be changing. They are displayed in the same location and switch between each other. I need to be able to determine when the icon is displaying the 'X'. Preferably using OpenCV. My current method is using inRange and defining a colour range, then if enough pixels fall within that colour range, I consider the X found. The issue is a lot of the Lakitu falls within the same colour range making it not reliable enough.
The other important point is that many people run this software, and every persons game capture and colours are slightly different so I have to make it lenient enough to work on slightly different colours.
One way I thought of was making it exclude colours from the mask if the green and blue value weren't within a defined range of each other, as the Lakitu doesn't really contain any blue, however the X always has similar blue and green components. I have no clue where to start though.
Thank you!
I have an application that needs to determine when a particular icon is showing:
X
Lakitu
Mario
One icon will be showing at any given time, the background behind the icon will always be changing. They are displayed in the same location and switch between each other. I need to be able to determine when the icon is displaying the 'X'. Preferably using OpenCV. My current method is using inRange and defining a colour range, then if enough pixels fall within that colour range, I consider the X found. The issue is a lot of the Lakitu falls within the same colour range making it not reliable enough.
The other important point is that many people run this software, and every persons game capture and colours are slightly different so I have to make it lenient enough to work on slightly different colours.
One way I thought of was making it exclude colours from the mask if the green and blue value weren't within a defined range of each other, as the Lakitu doesn't really contain any blue, however the X always has similar blue and green components. I have no clue where to start though.
Thank you!