Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Can Turing recognize colours?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
chimerix




PostPosted: Wed Dec 30, 2009 11:41 am   Post subject: Can Turing recognize colours?

Ive got a problem. Say you have two boxes coloured blue and red, then green dots randomly being placed in these two boxes. Can I write a line of code that allows turing to acknowledge which box the dot has landed in based on colour, not any other variables.
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Wed Dec 30, 2009 11:49 am   Post subject: RE:Can Turing recognize colours?

WhatDotColour.
Search each pixel for green. then recursively go off in a direction (If the box is always withing a square) and if the colour is different from green then thats what box its in. That's one way that is terrible to do.
Tony




PostPosted: Wed Dec 30, 2009 1:26 pm   Post subject: RE:Can Turing recognize colours?

As Zren is leading up to -- if you know where your boxes are, and where to check for colour... then you don't really need the colour, as you have enough information to tell you exactly which box the location is in.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
chimerix




PostPosted: Wed Dec 30, 2009 2:12 pm   Post subject: RE:Can Turing recognize colours?

I was using boxes for a simple example. What I am trying to do is actually find if the green dot lands in an irregular shape or not; like the geographical picture of the US.
Tony




PostPosted: Wed Dec 30, 2009 3:09 pm   Post subject: RE:Can Turing recognize colours?

Then you would need a unique colour for every country, and it will likely still be inaccurate around borders.

Besides, ultimately checking for a colour is still checking against "boxes"; it's just that each box happens to be 1 pixel in size.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: