I am writing a tool for Gui Automation Test.
By specify a text string, I want to get the coordinate of its nearest Textbox on current screen.
The signature of the function should looks like this:
Point GetNearestTextBoxPosition(string textOnLabel)
I have managed to get the coordinate of the given string of textOnLabel, so the I have to only implement this function:
Point GetNearestTextBoxPosition(Point textLabelPosition)
I want to implement this functionality using the computer vision technology such as Rectangular Detection. Is there one who can tell me how to achieve this goal using OpenCV?
You can detect rectangles with Hough Transforms very easily.
That said, are you sure a computer vision approach is appropriate?
If your GUI is web, you can drive at the DOM level using libraries like Watir or Selenium. If your GUI is a native app, there are controls for manipulating them as well.