ShikiPiki Posted September 14, 2013 Posted September 14, 2013 Given a 100x100 pixel square, is it possible to do a pixel search in the entire square EXCEPT for a 10x10 pixel square at the center without using 4 search areas. I am currently doing the above pixel search by searching the top, left, right and bottom by using top = [0,0,0,100,50-10/2]. The bottom left and right are done similarly. The issue with this method however is that I also want it to find the pixel which is closest to the center. What I can do is do the whole search by in iteration and do something like search 1 line above the center search 1 line below, search 1 line to the left search 1 line to the right. Starting at the 6th pixel from the center such that i ignore that 10x10... but that would be a mess. TLDR; Is there an easy method to search an area like such that you still return the pixel which matches closest to the center? _____________ | o | | ___ | | | | | | o |___| | | o | |____________| Thanks! -ShikiPiki
JohnOne Posted September 14, 2013 Posted September 14, 2013 Search the whole area, if a result is found in center area, disregard it and continue from a point adjacent to it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Solution DW1 Posted September 14, 2013 Solution Posted September 14, 2013 The >Advanced Pixel Search Library allows for exclusion rectangles to be added. AutoIt3 Online Help
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now