Jump to content
Sign in to follow this  
  • entry
    1
  • comments
    0
  • views
    1699

Image Recognition in Mobile Game Testing

Sign in to follow this  
Ville-Veikko Helppi

1534 views

[color=rgb(40,40,40)][font=helvetica]


Speaking of mobile game testing, it is a common misconception that manual testing is the only way to go forward. In many cases it is the first thing to start with, but to really get all issues spotted out and fixed before the game is published, test automation built into the process, hammering each and every regression and advancement can yield significant results when considering the customer-ready game.

[/font][/color]
[color=rgb(40,40,40)][font=helvetica]


Screen-Shot-2014-09-03-at-12.53.32-PM.png

[/font][/color][color=rgb(40,40,40)][font=helvetica]


Let's face the fact: manual testing has still too many disadvantages as it's way too time-consuming, tedious, error-prone and not being able to thoroughly, systematically do the testing of whole software entity. Manual testing is somewhat like scratching the surface and you can't really find out what's going on underneath the UI. Besides, you would need an army of programming-capable guys to debug all bits and pieces - something that test automation can deliver you 24/7 - without any manual efforts.

[/font][/color]
[color=rgb(40,40,40)][font=helvetica]


For reason or another, some people still associate manual testing as the only way to test games. Sure, there are business reason for many companies out there to emphasize it as they are eager to sell their services (or crowdsource it to unknown quasi-testers) but again, it is the technology and test automation that can get in depth and make sure app works across the ecosystem of different devices, with different software setups, hardware configurations and so on.

[/font][/color]
[color=rgb(40,40,40)][font=helvetica]


There are lots of differences between test automation frameworks and the pros and cons of using different test automation frameworks for testing . One great example and very useful framework is Appium - and new advanced features, such as image comparison and recognition.

[/font][/color][color=rgb(40,40,40)][font=helvetica]


Screen-Shot-2014-09-03-at-10.42.55-AM.png

[/font][/color]
UI and Functional Testing - with Appium
[color=rgb(40,40,40)][font=helvetica]


In a nutshell, Appium is a mobile UI testing framework supporting cross-platform testing of native, hybrid and mobile-web apps for iOS and Android. In fact, Appium is a pretty good choice for mobile games as in many cases those games tend to be identical - or at least very similar - on both platforms, Android and iOS - and the same test script can apply for both. But there are also some other reasons why Appium is a great choice for mobile game testing. For example, you can write tests using your favorite development tools/environment and programming languages, such as Java, Objective-C, Javascript, PHP, Ruby, Python, C# and so on.

[/font][/color]
[color=rgb(40,40,40)][font=helvetica]


Appium enables you to execute your tests on mobile device irrespective of the device OS. This is because the framework is basically a wrapper that translates Selenium Webdriver commands into UIAutomation (iOS) or UIAutomator (Android, API level>=17) or Selendroid (Android, API level <=16) commands depending on the device type. For example, in the context of Android, this is how Appium compares to other test automation frameworks:

[/font][/color][color=rgb(40,40,40)][font=helvetica]


Screen-Shot-2014-09-02-at-11.48.46-PM.png

[/font][/color]
EXAMPLE: Using Appium to test Clash of Clans (game by Supercell)
[color=rgb(40,40,40)][font=helvetica]


In this example we are using Supercell's Clash of Clans game. A fantastic game and I bet many of you have played it so you should be pretty familiar how the game looks and so on. We're also going to use Appium as a selected test automation framework to basic clicking-through of Clash of Clans tutorial.

[/font][/color]

[color=rgb(136,0,0)]##[/color]
[color=rgb(136,0,0)]## Example script that tests Clash of Clans tutorial first steps[/color]
[color=rgb(136,0,0)]##[/color]
[color=rgb(136,0,0)]## Works on different resolutions, both iOS and Android[/color]
[color=rgb(136,0,0)]##[/color]
[color=rgb(136,0,0)]##[/color]
[color=rgb(136,0,0)]##[/color]

[color=rgb(0,0,136)]import[/color][color=rgb(0,0,0)] unittest[/color]
[color=rgb(0,0,136)]from[/color][color=rgb(0,0,0)] time [/color][color=rgb(0,0,136)]import[/color][color=rgb(0,0,0)] sleep[/color]
[color=rgb(0,0,136)]from[/color][color=rgb(0,0,0)] [/color][color=rgb(102,0,102)]TestdroidAppiumTest[/color][color=rgb(0,0,0)] [/color][color=rgb(0,0,136)]import[/color][color=rgb(0,0,0)] [/color][color=rgb(102,0,102)]TestdroidAppiumTest[/color][color=rgb(102,102,0)],[/color][color=rgb(0,0,0)] log[/color]
[color=rgb(0,0,136)]from[/color][color=rgb(0,0,0)] selenium[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]common[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]exceptions [/color][color=rgb(0,0,136)]import[/color][color=rgb(0,0,0)] [/color][color=rgb(102,0,102)]WebDriverException[/color]

[color=rgb(0,0,136)]class[/color][color=rgb(0,0,0)] [/color][color=rgb(102,0,102)]ClashOfClansTest[/color][color=rgb(102,102,0)]([/color][color=rgb(102,0,102)]TestdroidAppiumTest[/color][color=rgb(102,102,0)]):[/color]
[color=rgb(0,0,136)]def[/color][color=rgb(0,0,0)] setUp[/color][color=rgb(102,102,0)]([/color][color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)]):[/color]
[color=rgb(136,0,0)]# TestdroidAppiumTest takes settings (local or cloud) from environment variables[/color]
[color=rgb(0,0,136)]super[/color][color=rgb(102,102,0)]([/color][color=rgb(102,0,102)]ClashOfClansTest[/color][color=rgb(102,102,0)],[/color][color=rgb(0,0,0)] [/color][color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)]).[/color][color=rgb(0,0,0)]setUp[/color][color=rgb(102,102,0)]()[/color]

[color=rgb(0,0,136)]def[/color][color=rgb(0,0,0)] test_tutorial[/color][color=rgb(102,102,0)]([/color][color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)]):[/color]
[color=rgb(0,0,0)]driver [/color][color=rgb(102,102,0)]=[/color][color=rgb(0,0,0)] [/color][color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]get_driver[/color][color=rgb(102,102,0)]()[/color][color=rgb(0,0,0)] [/color][color=rgb(136,0,0)]# Initialize Appium connection to device[/color]

[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]10[/color][color=rgb(102,102,0)])[/color][color=rgb(0,0,0)] [/color][color=rgb(136,0,0)]# Wait that game loads[/color]

[color=rgb(136,0,0)]# Use this to get detected screen hierarchy[/color]
[color=rgb(136,0,0)]# print self.driver.page_source[/color]

[color=rgb(136,0,0)]#[/color]
[color=rgb(136,0,0)]# Dismiss the in-app purchases dialog if it shows[/color]
[color=rgb(136,0,0)]#[/color]
[color=rgb(0,0,0)]okayButton [/color][color=rgb(102,102,0)]=[/color][color=rgb(0,0,0)] [/color][color=rgb(0,0,136)]None[/color]
[color=rgb(0,0,136)]if[/color][color=rgb(0,0,0)] [/color][color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]isAndroid[/color][color=rgb(102,102,0)]():[/color]
[color=rgb(0,0,136)]try[/color][color=rgb(102,102,0)]:[/color]
[color=rgb(0,0,0)]okayButton [/color][color=rgb(102,102,0)]=[/color][color=rgb(0,0,0)] driver[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]find_element_by_id[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'button3'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]okayButton[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]click[/color][color=rgb(102,102,0)]()[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]5[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]except[/color][color=rgb(0,0,0)] [/color][color=rgb(102,0,102)]WebDriverException[/color][color=rgb(102,102,0)]:[/color]
[color=rgb(0,0,0)]log[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"There was no in-app purchases dialog"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]else[/color][color=rgb(102,102,0)]:[/color][color=rgb(0,0,0)] [/color][color=rgb(136,0,0)]# iOS[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]driver[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]implicitly_wait[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]5[/color][color=rgb(102,102,0)])[/color][color=rgb(0,0,0)] [/color][color=rgb(136,0,0)]# wait only 5 seconds to find it[/color]
[color=rgb(0,0,136)]try[/color][color=rgb(102,102,0)]:[/color]
[color=rgb(0,0,0)]okayButton [/color][color=rgb(102,102,0)]=[/color][color=rgb(0,0,0)] driver[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]find_element_by_accessibility_id[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'Okay'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]okayButton[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]click[/color][color=rgb(102,102,0)]()[/color]
[color=rgb(136,0,0)]# No need to sleep here since for iOS we wait the Game Center to popup...[/color]
[color=rgb(0,0,136)]except[/color][color=rgb(0,0,0)] [/color][color=rgb(102,0,102)]WebDriverException[/color][color=rgb(102,102,0)]:[/color]
[color=rgb(0,0,0)]log[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"There was no in-app purchases dialog"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]driver[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]implicitly_wait[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]30[/color][color=rgb(102,102,0)])[/color]

[color=rgb(136,0,0)]# Cancel iOS Game Center login[/color]
[color=rgb(0,0,136)]if[/color][color=rgb(0,0,0)] [/color][color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]isIOS[/color][color=rgb(102,102,0)]():[/color]
[color=rgb(136,0,0)]#print self.driver.page_source[/color]
[color=rgb(0,0,136)]try[/color][color=rgb(102,102,0)]:[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]driver[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]implicitly_wait[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]5[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]cancelButton [/color][color=rgb(102,102,0)]=[/color][color=rgb(0,0,0)] driver[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]find_element_by_accessibility_id[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'Cancel'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]log[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"Canceling iOS Game Center login..."[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]cancelButton[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]click[/color][color=rgb(102,102,0)]()[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]2[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]except[/color][color=rgb(0,0,0)] [/color][color=rgb(102,0,102)]WebDriverException[/color][color=rgb(102,102,0)]:[/color]
[color=rgb(0,0,0)]log[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"The Game Center login was not displayed"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]driver[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]implicitly_wait[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]30[/color][color=rgb(102,102,0)])[/color]

[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]screenshot[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"welcome-chief"[/color][color=rgb(102,102,0)])[/color]

[color=rgb(136,0,0)]# Check that there is a goldmine on screen[/color]
[color=rgb(0,0,0)]rect [/color][color=rgb(102,102,0)]=[/color][color=rgb(0,0,0)] [/color][color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]find_image[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"queryimages/tutorial_goldmine.png"[/color][color=rgb(102,102,0)],[/color][color=rgb(0,0,0)] screenshot_match[/color][color=rgb(102,102,0)]=[/color][color=rgb(0,136,0)]"screenshots/goldmine_match.png"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]assertIsNotNone[/color][color=rgb(102,102,0)]([/color][color=rgb(0,0,0)]rect[/color][color=rgb(102,102,0)],[/color][color=rgb(0,0,0)] [/color][color=rgb(0,136,0)]"There should be a goldmine on screen in beginning of tutorial"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]log[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'Gold mine found at %s %s! Tapping tutorial forward...'[/color][color=rgb(0,0,0)] [/color][color=rgb(102,102,0)]%[/color][color=rgb(0,0,0)] [/color][color=rgb(102,102,0)]([/color][color=rgb(0,0,0)]rect[/color][color=rgb(102,102,0)][[/color][color=rgb(0,102,102)]0[/color][color=rgb(102,102,0)]],[/color][color=rgb(0,0,0)] rect[/color][color=rgb(102,102,0)][[/color][color=rgb(0,102,102)]1[/color][color=rgb(102,102,0)]]))[/color]

[color=rgb(136,0,0)]# Dismiss the bubbles[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_middle[/color][color=rgb(102,102,0)]()[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]2[/color][color=rgb(102,102,0)])[/color][color=rgb(0,0,0)] [/color][color=rgb(136,0,0)]# second blabla[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_middle[/color][color=rgb(102,102,0)]()[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]2[/color][color=rgb(102,102,0)])[/color][color=rgb(0,0,0)] [/color][color=rgb(136,0,0)]# Goblin appears[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_middle[/color][color=rgb(102,102,0)]()[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]1[/color][color=rgb(102,102,0)])[/color]

[color=rgb(136,0,0)]# Go to shop[/color]
[color=rgb(136,0,0)]# NOTE: tap_image does also assert, fails test if target not recognized[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_image[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"queryimages/shopbutton.png"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]1[/color][color=rgb(102,102,0)])[/color]

[color=rgb(136,0,0)]# Buy cannon[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]screenshot[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'cannon'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_image[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"queryimages/cannon.png"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]2[/color][color=rgb(102,102,0)])[/color]

[color=rgb(136,0,0)]# Place the cannon[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]screenshot[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'place_the_cannon'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_image[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"queryimages/place_the_cannon.png"[/color][color=rgb(102,102,0)],[/color][color=rgb(0,0,0)] width_modifier[/color][color=rgb(102,102,0)]=[/color][color=rgb(0,102,102)]0.75[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]2[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]screenshot[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'finish_now'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(136,0,0)]# Use gem to finish right away[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_image[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"queryimages/finish_now.png"[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]3[/color][color=rgb(102,102,0)])[/color]
[color=rgb(136,0,0)]# Bring it on![/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]screenshot[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'bring_it_on'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]tap_image[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]"queryimages/bring_it_on.png"[/color][color=rgb(102,102,0)],[/color][color=rgb(0,0,0)] height_modifier[/color][color=rgb(102,102,0)]=[/color][color=rgb(0,102,102)]0.75[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]10[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]screenshot[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'battle'[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,0)]sleep[/color][color=rgb(102,102,0)]([/color][color=rgb(0,102,102)]10[/color][color=rgb(102,102,0)])[/color]
[color=rgb(0,0,136)]self[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]screenshot[/color][color=rgb(102,102,0)]([/color][color=rgb(0,136,0)]'end_of_battle'[/color][color=rgb(102,102,0)])[/color]

[color=rgb(136,0,0)]# To be continued...[/color]

[color=rgb(0,0,136)]if[/color][color=rgb(0,0,0)] __name__ [/color][color=rgb(102,102,0)]==[/color][color=rgb(0,0,0)] [/color][color=rgb(0,136,0)]'__main__'[/color][color=rgb(102,102,0)]:[/color]
[color=rgb(0,0,0)]unittest[/color][color=rgb(102,102,0)].[/color][color=rgb(0,0,0)]main[/color][color=rgb(102,102,0)]()[/color][color=rgb(40,40,40)][font=helvetica]


Let's look some stages in this script. The test_tutorial contains the following steps:

[/font][/color][color=rgb(40,40,40)][font=helvetica]


1. It first figures out if test is executed either on Android (self.isAndroid()) or iOS. As you can see, it looks content different, on Android it is trying to find by element ID and on iOS by accessibility ID with description ('Okay'). The same check happens for iOS Game Center login.

[/font][/color][color=rgb(40,40,40)][font=helvetica]


2. Screenshots are taken in various steps and stored in files entered as a parameter in a function call.

[/font][/color][color=rgb(40,40,40)][font=helvetica]


3. We do a check if "goldmine" exists on screen by comparing two pngs using self.find_image call. If these pictures match (=goldmine exists on screen), we'll go forward with tutorial.

[/font][/color][color=rgb(40,40,40)][font=helvetica]


4. We proceed with the tutorial with the following steps: 1) Go to shop, 2) Buy cannon, 3) Place the cannon. The information about all these three items is stored in those pngs: shopbutton.png, cannon.png, place_the_cannon.png.

[/font][/color][color=rgb(40,40,40)][font=helvetica]


5. Finally, we finish the tutorial and start the battle! After battle, application is brought down.

[/font][/color][color=rgb(40,40,40)][font=helvetica]


Okay. That's about the programming and scripting for now and let's see how that script looks on real devices. We used one iOS (iPhone 4S) and two Android phones (Samsung Galaxy S3 Mini and HTC One X) for this script. The video footage is taken at our office and is not a high-quality but you should see something going there on devices:

[/font][/color]
Video in Youtube here[color=rgb(40,40,40)][font=helvetica]

.

[/font][/color]

[color=rgb(40,40,40)][font=helvetica]

[/font][/color] How we are using Image Recognition?
[color=rgb(40,40,40)][font=helvetica]

What we just went through in Appium+Clash of Clans example was the basic image recognition flow for enabling mobile game to be tested on real devices, regardless OS was different (Android and iOS). There are different ways to recognize content from images. For example, template matching is a technique for finding small parts of an image which match a template image. It is actually very handy even for recognizing UI elements and graphics resized and/or rotated in different form. This is one way how some Testdroid game developers use image recognition today.

[/font][/color]

Screen-Shot-2014-09-03-at-12.58.06-AM.png

[color=rgb(40,40,40)][font=helvetica]

Let's say the template image has some strong features - e.g. text easy to be abstracted from the background content - a feature-based approach can be used. In this example "Button 1" text was resized and rotated (or if it is otherwise transformed) this can be quickly and easily identified and further actions can be taken.

[/font][/color]

[color=rgb(40,40,40)][font=helvetica]

Happy Testing!

[/font][/color]
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!