1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Visual Basic Image Recognition?

Discussion in 'General Programming Chat' started by impega, Apr 29, 2008.

  1. impega

    impega Level III

    Joined:
    Dec 7, 2006
    Messages:
    408
    Likes Received:
    2
    Location:
    Nottingham (SHOTTS!)
    I'm a neeby newb noob at VB, and was just wondering if basically the funtions of scar are possible in VB (like finding an image, its coordinates, clicking stuff etc).

    Am I going to have to learn about text wrapping and complicated stuffs like that?

    Or is it possible for someone to explain something to me easily =P



    And yea sorry to have neebered up your time ><
     
  2. SoC

    SoC Moderator
    Staff Member

    Joined:
    Jan 24, 2007
    Messages:
    4,551
    Likes Received:
    105
    Location:
    Maaaaaaanchester!
    From my VARY basic coding knowledge
    i think its something to do with fidning darkest pixel?
    If that helps :p
     
  3. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    I'm wondering the same thing... I know Scar is base on pascal, but I don't if there's a way to convert this to vb...
    cause if we can, I'm thinking captcha solver here....
     
  4. turato

    turato Level III

    Joined:
    Aug 3, 2007
    Messages:
    408
    Likes Received:
    0
    Yeah it does have something to do with darkest pixel. Is it possible to do it in visual basic ? or only c#
     
  5. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    It is really possible to do this in Visual Basic, all you have to know is how to retrieve the darkness of a pixel in a Bitmap...
     
  6. impega

    impega Level III

    Joined:
    Dec 7, 2006
    Messages:
    408
    Likes Received:
    2
    Location:
    Nottingham (SHOTTS!)
    can anyone elaborate abit more? Like how i would do this?
     

    Attached Files:

  7. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Well, declare 3 variables, the temporary storage for the darkest pixel found and the X and Y coordinates. Then make a loop to scan every pixel (you can use 2 nested For...Next Loops), and use the GetPixel API to get the Long value of each pixel's colour. After that, grab the Red, Green and Blue values from the pixel and get the average value, and well, that is the Brightness of the pixel. Store this value in the variable if it's darker than the previous one, and save the X and Y coordinates... This way, at the end of the loop the X and Y variables will be the coords of the darkes pixel.
     
  8. carolinenew

    carolinenew Newbie

    Joined:
    Apr 11, 2013
    Messages:
    2
    Likes Received:
    0
  9. fail

    fail Level IV

    Joined:
    Aug 31, 2007
    Messages:
    1,676
    Likes Received:
    32
    anywhere to learn this?
     
  10. Lightning

    Lightning Administrator
    Staff Member

    Joined:
    Nov 8, 2008
    Messages:
    3,021
    Likes Received:
    195
    Gender:
    Male
    Location:
    Florida, USA