c# - Emgu - How to extract the images likely to represent an icon or control from a screenshot? -
i'm working on experimental project in challenge identify , extract image of icon or control user has clicked on/touched. method i'm trying follows (i need step 3):
1) take screen shot when user clicks/touches screen:
2) apply edge detection:
3) extract possible icon images around point associated user's cursor (don't know how this)
there easier cases in mouse-over event highlight icon/control, allows me identify control simple screen shot comparison (before , after mouse-over). above method cases in icon not highlighted. i'm new emgu, if has pointers on how better achieve this, i'm ears.
cheers! matt
instead of doing edge detection. consider taking following steps:
only grab pixels within radius of point of user's cursor. create new image these pixels.
use thresholding classify foreground , background.
calculate centroid, (use mean x coordinate , mean y coordinate). calculate deviation mean. discard foreground pixels beyond deviation mean. eg: discard pixels more 1.6 deviations mean. (you may need experiment step ).
use convex hull find area of image icon in it.
Comments
Post a Comment