DuyAnh

how to identify pixels in an image

9 posts in this topic

how to find the location on an image color ?? 

Similar PixelSearch, but in a format bmp image

xboot_sbcaptcha.png

search 0x0806EB and returns coordinates

sorry I am not good at English

Share this post


Link to post
Share on other sites



Since i smell gamebot or similar here, i will just give you a hint

Use the autoit option for PixelCoordMode with combination of PixelSearch() to get the exact coord where the color is found. 

Post your code and sample image, so we (i) know bit more what exactly has to be done.

Share this post


Link to post
Share on other sites
6 hours ago, JustSomeone said:

Since i smell gamebot or similar here, i will just give you a hint

Use the autoit option for PixelCoordMode with combination of PixelSearch() to get the exact coord where the color is found. 

Post your code and sample image, so we (i) know bit more what exactly has to be done.

searching on a .bmp image

Share this post


Link to post
Share on other sites
8 hours ago, JohnOne said:

Since you appear to be loading this image to a bitmap, I'll assume you will know how to find and use the GetPixel function.

what I need is search pixels. Please give me an example

Share this post


Link to post
Share on other sites
21 hours ago, JLogan3o13 said:

@DuyAnh that screenshot looks amazingly like a CAPTCHA image, am I correct?

That is just one example photo

Share this post


Link to post
Share on other sites

That didn't answer the question, please explain what precisely you are doing. Help us help you.


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites
On 12/1/2016 at 8:30 PM, JLogan3o13 said:

That didn't answer the question, please explain what precisely you are doing. Help us help you.

I want to do automated program identifies the value of the banknote

photos will be taken via webcam

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • Nitrolord
      By Nitrolord
      I had this problem with PixelGetColor not giving me the same HEX Color as the AU3Info Tool and searched every were with no luck then had a OH DA moment LoL.
      The problem is that the
      "PixelGetColor ($mouseX[0], $mouseY[1])"
      is looking rite at the very tip of the mouse pointer not under it.  So you have to set a -3 after the [0] and [1].  
      "PixelGetColor ($mouseX[0] -3, $mouseY[1] -3)"
      to make it search next to the pointer not on the pointer.  You may have to adjust this a bit for your display but you should not have  to go more then -5.  -3 seems to work best for me.
      Example.au3
      #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 141, 127, 276, 231) $Input1 = GUICtrlCreateInput("", 8, 8, 121, 21) $Label1 = GUICtrlCreateLabel("Press or Hold F1 to get Hex color at Mouse X -3, Y-3 Pos,", 8, 40, 124, 73) GUISetState(@SW_SHOW) HotKeySet("{f1}","MousePos") Func MousePos() $aPos = MouseGetPos() $PGC = PixelGetColor($aPos[0] -3, $aPos[1] -3) GUICtrlSetData($Input1, "0x" & Hex($PGC, 6)) EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd  
    • Tirk
      By Tirk
      PixelSearch in a GUI window which state's @SW_MINIMIZE.
      Is it possible?
    • Annonyreeder
      By Annonyreeder
      Hello,
      I've wrote a fairly straight forward script that will search an area of the screen and then left click on apart of that area should it find a certain color/pixel. 
      I have a small issue where by within the area, multiple pixels of the same color will appear, the script will continue to click on the same pixel over and over again. Is there a way so that it will cycle through all the results and click on each one for a given time period then move onto the next, as apose to clicking on the same spot forever. I have used timers before and that shouldn't be an issue, its more the having it stop clicking, or ignoring the current pixel its clicking and then moving onto the next one (same pixel color within same area).

      Hopefully this makes sense.
      [autoit]
      HotKeySet("{ESC}", "END_EXIT") HotKeySet("+1", "start") While 1     Sleep(100)  WEnd func start()    while 1 $location = PixelSearch( 631, 175, 1181, 597, 0xFF0000) If IsArray ($location) = 1 Then     MouseClick ('left', $location[0], $location[1], 1, 0)  EndIf  WEnd EndFunc  func END_EXIT()  Exit  EndFunc
       
      [/autoit]
    • Reizvoller
      By Reizvoller
      Greetings, 
      Func pixelHunter () Local $PixelHunt[2] Do $PixelHunt = PixelSearch (1, 1, 1016, 874, "0xCCE4CC", 0, 1, $sWorkOrderWin) Until $PixelHunt[0] > 0 EndFunc So when I call up this function in my app it fires back "Subscript used on non-accessible variable"
      Now, if I am understanding this message properly it is trying to tell me that the variable can't be seen by the function asking for it.
      I replaced "Do...Until" with simply a "ConsoleWrite" the $PixelHunt value and it doesn't throw that error.
      Any advice would be appreciated!
      -Reiz
    • dwedwe
      By dwedwe
      Sir/Ma'am,
      I am new to autoit so please bear with me, i need help with this please see attached file, many thanks to all.
      $color1 = 0xED1C24 ;red $color2 = 0xFFFFFF ;white $color3 = 0x22B14C ;green $color4 = 0x00A2E8 ;blue ;lets say (999,366,1331,566) is the yellow outer square $Scan_Area = PixelSearch(999,366,1331,566,$color1) ;how do i delete the BOX2 & BOX1 but not delete BOX3? while(1) if IsArray($Scan_Area) = ???? then Mousemove($Scan_Area[0],$Scan_Area[1],10) Mouseclick($Scan_Area[0],$Scan_Area[1],1,10) Send("{delete}") Sleep(500) Endif Wend