Git Product home page Git Product logo

opencv-steam-captcha's Introduction

Steam Captcha Solver using OpenCV

alt tag

This is an experimental/learning project which attempts to solve the captcha used at steamcommunity.com. This project is currently just a proof of concept and does not solve the captcha completely.

Data

The data set consists of 100 manually labeled images. Each image contains exactly 6 characters.

By inspecting the images further, we can see that the character set consists of letters "A-Z", numbers "0-9" and special characters "@%&". However, several characters have been left out, specifically "0156OIS".

This gives us: (100 * 6) / 32 = 18.75 samples per character

This type of captcha is no longer used but it's still available at the following address:

https://steamcommunity.com/tradeoffer/new/captcha?v=A&sessionid=B&partner=C

  • A is a random timestamp (number).
  • B is legitimate sessionid which matches the cookie value.
  • C is partner's ID.

Algorithm

The algorithm consists of 3 parts:

  1. Thresholding - the threshold value is calculated dynamically and it's based on the images histogram.
  2. Segmentation - each letter is cropped out of the image and stored separately.
  3. Classification - very simple classification which uses SVM and HoG (both available in OpenCV).

Results

Segmentation of the letters works quite well and 85 out of 100 images from the data set were fully processed. If we look at the individual characters, the segmentation algorithm worked for 95% of all 600 characters.

Classification is pretty simple and at this point the SVM is able to identify letters G and Y pretty accurately after only using 50 training samples. Much larger data set would be necessary to properly identify all 32 types of characters.

Build and run

  1. Install Boost and OpenCV. Use your favourite package manager for that.
  2. Clone this repo.
  3. Check the code and slightly modify the paths or anything else you need.
  4. Build with cmake.

opencv-steam-captcha's People

Contributors

scholtzm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.