Jump to content
Sign in to follow this  
DuyAnh

how to identify pixels in an image

Recommended Posts

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
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By AnRios
      Greetings friends!
      I have been searching the help file and Google, with no success, to find a way to validate images from a folder and mark them somehow in a spreadsheet.
      My context is: I made a code with the help of the community that captures images from SAP and saves them in a folder.  Now I'd like to identify which ones are black, if it's even possible. I read about PixelSearch, but did not get it to work. If someone could point me in the right direction, I'd appreciate it.
      The code I'm using:
      #include <File.au3> #include <ScreenCapture.au3> $x = InputBox("Title", "Amount of Images To Capture", "", "", 320, 150) If @error Then Exit $x = Number($x) $y = InputBox("Title", "Batch Name", "", "", 320, 150) If @error Then Exit $y = String($y) HotKeySet("{HOME}", "printscreen") Func printscreen() $FilePath =("C:\Fiscalizacao\Fotos"&"/") $FileName = $y & " - " $FileList = _FileListToArray($FilePath, $FileName & '*.jpg', 1) If Not IsArray($FileList) Then $FileName&= '1.jpg' Else $FileName &= $FileList[0] + 1 & '.jpg' EndIf _ScreenCapture_Capture($FilePath & "\" & $FileName, 354, 196, 673, 436) EndFunc HotKeySet("{BS}", "Terminate") Func Terminate() Exit 0 EndFunc For $i = 1 to $x Opt("WinTitleMatchMode",2) If NOT WinExists("Relatorio") Then MsgBox(0, "Atenção!", "Relatório do MOM deve estar aberto!") Call("Terminate") EndIf Opt("WinTitleMatchMode",2) WinActivate("Relatorio") Sleep (250) Opt("WinTitleMatchMode",2) SendKeepActive("Relatorio") Send("{ENTER}") Sleep (1000) Send("{HOME}") Sleep (200) Opt("WinTitleMatchMode",2) WinActivate("Relatorio") Send("{DOWN}") Next  
    • By plankton
      While IsArray(PixelSearch(100, 100, 300, 300, 0xffffff))     Send("{ESC}")     Sleep(1000) WEnd  MsgBox(0,"Loop exited","") Hi, above is my function that will execute ESC button when white color is present in specific area which is color 0xffffff.
      But how do I do the opposite like when white color is not present in that specific area? Like this below code which gives me error
       
      While IsArray(PixelSearch(100, 100, 300, 300, <>0xffffff))     Send("{ESC}")     Sleep(1000) WEnd  MsgBox(0,"Loop exited","")  
       
    • By plankton
      Hi I want it to search for a specific color in certain area then excute the loop which presses ESC button and stop the loop when the color no longer present in that specific area.  Here is the example of my code. But it doesnt stop when color is disappeared.
       
      Pixelsearch(511, 455, 678, 501, 0xFFFFFF)
      If Not  @Error Then
      While 1
      Sleep(1000)
      Send("{ESC}")
      Pixelsearch(511, 455, 678, 501, 0xFFFFFF)
      If @Error Then Exitloop
       
    • By Borges
      Sorry if I posted in wrong section but...
      how can I do something like that?
       
      If PixelSearch(660, 30, 670, 38, 0x242424, 0 , 1) <> @error Then
          Send("{F3}")
          Sleep(200)
       ElseIf PixelSearch(800, 30, 810, 38, 0x242424, 0 , 1) <> @error Then
          Send("{F4}")
          Sleep(200)
       EndIf
       
    • By Daka
      I find it very weird:
      if I run like this:
           Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, '0xFF455E')
      works fine!
      If I run like this:
          Local $metaColor1 = '0xFF455E' or like this Local $metaColor1 = "0xFF455E" or Local $metaColor1 = "'0xFF455E'"
          Local $aCoord = PixelSearch($posX, $posY, $sizeX, $sizeY, $color)
      it doesn't want to work! So something with variable is not working and yes if I print it out like this:
      ConsoleWrite(@LF & $posX & ":"& $posY & ":"& $sizeX & ":" & $sizeY & ":" & $color&@LF)
      771:80:833:151:0xFF455E

      So I dont see the problem, maybe some of you people?
×
×
  • Create New...