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:

enter image description here

2) apply edge detection:

enter image description here

3) extract possible icon images around point associated user's cursor (don't know how this)

enter image description here enter image description here

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:

  1. only grab pixels within radius of point of user's cursor. create new image these pixels.

  2. use thresholding classify foreground , background.

  3. 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 ).

  4. use convex hull find area of image icon in it.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -