Jump to content
Sodori

Strict pixel search

Recommended Posts

Sodori

Evening!

Doing bit of coding for me lass, darn woman giving me these intriguing challenges! ^^

So, picture (no pun intended!) a preferably *.jpg (must be compatible with Paint for reasons), that has no colours but white and.. well, not white. Autoit will read this image replacing all whites with a zero and all none whites with a one (so, a string or possibly array, as you see fit. Could even be binary broken down mind you!). I then want to scan the screen for a black pixel, and build it down from that pixel to see if I get any match. And if a match, return coords for the centre most (or ish) pixel on the screen. Much like the image search UDF that hovers about forums and whatnot, but with less colour options, as I just need to really work with a single colour. Not to mention I got that UDF working as long as I keep the background either checker board (Photoshop's way of saying transparent) or plain white. And that won't do, as there will be lines and such disturbing the image that said UDF can't deal with.

Daunting task, I know. I require no more than the first part would you mind that is scanning an image. Like a function that reads said image and returns the image in zeroes and ones (or whatever method you though would be coolest).

Anyone got some ideas? Thanks for your time!!

Share this post


Link to post
Share on other sites
JohnOne

I understand the get pixels into array, white = 0 and non white = 1, The array would have Height in pixels = rows and width in pixels = columns, but you totally lost me on the rest of it.

Perhaps if you explained the goal rather than your path to it, it may become more clear.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
Sodori

I understand the get pixels into array, white = 0 and non white = 1, The array would have Height in pixels = rows and width in pixels = columns, but you totally lost me on the rest of it.

Perhaps if you explained the goal rather than your path to it, it may become more clear.

Would you mind sharing any though on that part first? As I've reconsidered, I think the best way would be to use empty array cells to represent a white pixel, and a hex code to represent a no white pixel. Trying to figure out the second part as I am trying to figure how I also best can explain it :)

Share this post


Link to post
Share on other sites
Sodori

and no pic shared......even avoids the question all together....

You know this makes people think you are doing something that people will be upset with you. Just saying.

The whole point of this topic, is not about "I got this image and wishes it to be detected". It's about a certain method to recognize pixels for a certain task. I am sorry for ignoring your message, time was not plenty and I sough your request ill progressive. Quite in fact, I lack the possession of a image currently. You know the old riddle of a man trying to cross a stream with three items that mustn't be situated on the boat in a certain combination? It's quite irrelevant for the riddle if it's a fox, chicken and a bag of seed, or whatever variations you may have. As long as the riddle is but solved. Please proceed if you have more to say.

Share this post


Link to post
Share on other sites
Jos

Didn't your initial post started with " doing a bit of coding"  and you say now you don't have any exact case?

I hate all this word playing around here when its about  "i Need to find this fucking pixel/image".

One day i will come up with that automated 7x7 that will hit your heads when using this topic.

jos

  • Like 2

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Bert

The whole point of this topic, is not about "I got this image and wishes it to be detected". It's about a certain method to recognize pixels for a certain task. I am sorry for ignoring your message, time was not plenty and I sough your request ill progressive. Quite in fact, I lack the possession of a image currently. You know the old riddle of a man trying to cross a stream with three items that mustn't be situated on the boat in a certain combination? It's quite irrelevant for the riddle if it's a fox, chicken and a bag of seed, or whatever variations you may have. As long as the riddle is but solved. Please proceed if you have more to say.

After reading all this  - I have no reason to think you are legit - good luck with your project.

Share this post


Link to post
Share on other sites
JohnOne

Would you mind sharing any though on that part first? As I've reconsidered, I think the best way would be to use empty array cells to represent a white pixel, and a hex code to represent a no white pixel. Trying to figure out the second part as I am trying to figure how I also best can explain it :)

I just don't have the time pal.

It's your project, and it sounds like you understand what I wrote.

If you do that, the rest will come to you.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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

×