Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Getting a color from a PictureBox

Hi I have an application that screenshots and gathers three cards from a texas holdem game.

These images are then OCR identified and presented in 1-10 J-A - however i have a code that tries to determine the suit of the card since i use a 4 color deck however this code is not doing it's job properly.

If someone can help me i would be forever in your debt :)) I can also arrange a contract with you once we speak more about the project.

PS my budget for this is not superhuge

-Shapeless
Show us the relevant code and explain what is not working, it will increase your chance of getting help for free.
This is solved, thank you for your offer for help :)
(Sep 22, 2019 07:46 AM)Shapeless Wrote:  This is solved, thank you for your offer for help :)

And how do you solved this ?

Thank you
(Sep 22, 2019 07:53 AM)Le-coyote Wrote:  And how do you solved this ?

Thank you

It's a matter of image recognition which you can do by feeding an AI pictures of different card colours and predicting the closest match. At least that's what I envision.
https://github.com/dotnet/machinelearnin...ction_Onnx
[Image: vp6iypF.gif]
(Sep 22, 2019 07:53 AM)Le-coyote Wrote:  And how do you solved this ?

Thank you

If you want to see source or have a copy pm me :)

But basicly i used ocr to capture the numbers and letters 1-10 J-Ace and then used pixel to get ranges of RGB then if statements :)
(Sep 23, 2019 12:46 PM)MavenGradle Wrote:  It's a matter of image recognition which you can do by feeding an AI pictures of different card colours and predicting the closest match. At least that's what I envision.
https://github.com/dotnet/machinelearnin...ction_Onnx

I think you mean either ANN or ML model instead of AI here. Image recognition though is a typical use case with machine learning, however it might not be necessary here if all of the images for the cards remain the same. Simple pixel difference detection by sampling even 1 or 2 pixels that are unique for each card will be much faster too.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Sep 24, 2019 11:24 AM)0xDEAD10CC Wrote:  I think you mean either ANN or ML model instead of AI here. Image recognition though is a typical use case with machine learning, however it might not be necessary here if all of the images for the cards remain the same. Simple pixel difference detection by sampling even 1 or 2 pixels that are unique for each card will be much faster too.

Was indeed talking about ML. However, ML is a subset or application of AI, depending on who you ask. I consider it an application of artificial intelligence, as was the content of ML in university considered as such back in the day. Now things might have changed and ML might no longer be considered as a part of AI or machine intelligence. Call me old school.

Agreed though, but again harder to do if the cards are in motion, have the ability to use customized card packs or are animated with a certain degree of randomness or variation in color which is something you can quite often find in casino games online to apply an additional layer of security. Not even casino games related but I believe a game called Overwatch implemented some kind of color randomness for example to prevent aimbots from working correctly, which is quite clever:
https://www.kitguru.net/gaming/matthew-w...g-aimbots/
[Image: vp6iypF.gif]
You're getting the concepts entirely mixed up. AI is not at all a subset of machine learning and it never was, because machine learning and deep learning are both subsets of AI; deep learning is a subset of machine learning. This I/O for this functionality would rely on structured data; machine learning. Not even autonomous vehicles of any kind use AI today, they use deep learning to improve over time with guidance.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Sep 25, 2019 02:39 PM)0xDEAD10CC Wrote:  You're getting the concepts entirely mixed up. AI is not at all a subset of machine learning and it never was, because machine learning and deep learning are both subsets of AI; deep learning is a subset of machine learning. This I/O for this functionality would rely on structured data; machine learning. Not even autonomous vehicles of any kind use AI today, they use deep learning to improve over time with guidance.

That's what I said, wasn't it. Let me write it down once again. Quote: ML is a subset or application of AI. Application being something that is applied or added to artificial intelligence. On that we can agree.

However, I am not up to a discussion about the meaning or definition of artificial intelligence but I will leave this here:

Quote:The study of how to produce computers that have some of the qualities of the human mind, such as the ability to understand language, recognize pictures, solve problems, and learn:

https://dictionary.cambridge.org/diction...telligence

Taking the cambridge dictionary meaning, you are completely wrong in saying that autonomous driving cars don't use AI. If you look at other dictionaries you'll get other definitions which might prove you right.

Point being, discussing about the meaning of AI is completely pointless because it's a discussion similar to the story of the chicken and the egg but both the egg and the chicken are made up out of DNA if you understand my analogy.
[Image: vp6iypF.gif]
(Sep 26, 2019 10:04 AM)MavenGradle Wrote:  That's what I said, wasn't it. Let me write it down once again. Quote: ML is a subset or application of AI. Application being something that is applied or added to artificial intelligence. On that we can agree.

However, I am not up to a discussion about the meaning or definition of artificial intelligence but I will leave this here:


https://dictionary.cambridge.org/diction...telligence

Taking the cambridge dictionary meaning, you are completely wrong in saying that autonomous driving cars don't use AI. If you look at other dictionaries you'll get other definitions which might prove you right.

Point being, discussing about the meaning of AI is completely pointless because it's a discussion similar to the story of the chicken and the egg but both the egg and the chicken are made up out of DNA if you understand my analogy.

I don't know what was edited in your post but I thought I read it the other way around... Although - If you're going to quote the definition of a word, you're not going to find the most detailed description in a general English dictionary website; those definitions are reserved for people who don't understand programming concepts. Getting a color from a picturebox does not require human mind traits, it requires a fixed machine learning algorithm that doesn't necessarily need guidance, but a structured dataset to train a model from and use. That's the difference between AI and machine learning.

AI: Essentially is the idea of replicating a human-like mind with algorithms
Machine learning: I/O that is trained based on a structure dataset to provide an appropriate output based on a fixed input (no concept here of training itself in any way)

Note: The approach/strategy is entirely different, but the goal might seem similar.

The only way to understand these differences is to take them from programmer articles from people knowledgeable enough on the subject to define the boundaries for each of these keywords. When describing something, you definitely can't use these phrases interchangeably. The definition of AI is well-defined, there's no subjectivity here; machine learning is fixed, AI and deep learning are ever-changing in terms of their capabilities. The confusion from these terms comes from people who aren't educated on the topic who don't/can't understand the differences between deep learning and machine learning because they don't understand the algorithms or math involved, so they use AI as a replacement term because it's a more broad term and is also more commonly known than the other phrases.

For example, my tool that checks for spelling and grammar in my old flash-based project files uses machine learning model to detect and suggest potential fixes... I need to provide it a structured dataset to train the model from, and then I use my new model after it's been tested for accuracy to check my production files. The parsing is entirely separate because I need to provide it with the expected data, it can't just be free form.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Sep 27, 2019 10:59 AM)0xDEAD10CC Wrote:  AI: Essentially is the idea of replicating a human-like mind with algorithms
Machine learning: I/O that is trained based on a structure dataset to provide an appropriate output based on a fixed input (no concept here of training itself in any way)

Code
Machine learning: A branch of artificial intelligence in which a computer generates rules underlying or based on raw data that has been fed into it
Again, it is pointless to discuss the meaning behind these words because they meanings are NOT fixed at all. Take the word gay for example. Depending on who you ask, you'll either get a synonym that resembles 'happy' or 'someone who is interested in relationships with people who share their gender'.

(Sep 27, 2019 10:59 AM)0xDEAD10CC Wrote:  The only way to understand these differences is to take them from programmer articles from people knowledgeable enough on the subject to define the boundaries for each of these keywords.

That's not the way language works, as pointed out by my previous example of the word 'Gay'. But again, I am not interested in discussing linguistics. I am interested in discussing a way to solve issues, looking at said solution and providing input to said solution. More examples: Nice, silly, clue, myriad, naughty, guy. I can keep going if you want me to.
[Image: vp6iypF.gif]
(Sep 27, 2019 11:07 AM)MavenGradle Wrote:  
Code
Machine learning: A branch of artificial intelligence in which a computer generates rules underlying or based on raw data that has been fed into it
Again, it is pointless to discuss the meaning behind these words because they are NOT fixed at all like you said. Take the word gay for example. Depending on who you ask, you'll either get a synonym that resembles 'happy' or 'someone who is interested in relationships with people who share their gender'.

That's not the way language works, as pointed out by my previous example of the word 'Gay'. But again, I am not interested in discussing linguistics. I am interested in discussing a way to solve issues, looking at said solution and providing input to said solution.

I know what the definitions of each are, and it isn't pointless discussing the definitions... As I said, they are well-defined for people who understand these concepts. You're missing the delta between these two definitions being "human mind" and the exclusion of that in the definition for machine learning. I know ML and DL are subsets of AI. There's no confusion between the differences here aside from people that don't know what they're talking about and so they resort to describing everything as AI...

Gay isn't a programming term, so your analogy isn't even a valid comparison here. We're not looking for synonyms here, we're looking for definitions that describe the difference between AI, deep learning, and machine learning.

Very simple:
https://www.geeksforgeeks.org/artificial...-learning/

Read these and you'll know the difference.

Quote:Why people relate machine learning and deep learning with artificial intelligence?
Machine learning and deep learning is a way of achieving AI, which means by the use of machine learning and deep learning we may able to achieve AI in future but it is not AI.

^ For people that don't see how the algorithms are used, it's hard to tell what is being applied, so it's easy to resort to describing something as AI, but when you understand exactly what is being used, you can't call everything AI. It's only for the people who don't know what they're talking about.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Sep 27, 2019 11:14 AM)0xDEAD10CC Wrote:  I know what the definitions of each are, and it isn't pointless discussing the definitions... As I said, they are well-defined for people who understand these concepts. You're missing the delta between these two definitions being "human mind" and the exclusion of that in the definition for machine learning. I know ML and DL are subsets of AI. There's no confusion between the differences here aside from people that don't know what they're talking about and so they resort to describing everything as AI...

Let me quote myself once again in order to stop this (but it's good that you pointed it out though):
Quote:Was indeed talking about ML.

(Sep 27, 2019 11:14 AM)0xDEAD10CC Wrote:  you can't call everything AI. It's only for the people who don't know what they're talking about.

If more than half of the population started calling viruses artificial intelligence, then I'm very sorry but a virus could be considered artificial intelligence if you know your linguistics. Not saying that they are right or wrong, but simply pointing out how the meaning of certain terms can change over time. It's not hard to understand that and has happened multiple times throughout history as I've been trying to demonstrate with the words gay, nice, silly, clue, myriad, naughty and guy. Let me add just a few more: cheater, furniture, girl.
[Image: vp6iypF.gif]
(Sep 27, 2019 11:30 AM)MavenGradle Wrote:  Let me quote myself once again in order to stop this:


If more than half of the population started calling viruses artificial intelligence, then I'm very sorry but a virus could be considered artificial intelligence if you know your linguistics. Not saying that they are right or wrong, but simply pointing out how the meaning of certain terms can change over time. It's not hard to understand that and has happened multiple times throughout history as I've been trying to demonstrate with the words gay, nice, silly, clue, myriad, naughty and guy. Let me add just a few more: cheater, furniture, girl.

Virus is too general to be described as AI, and I can guarantee that any of the old viruses were never using any machine learning or deep learning algorithms, so no. No virus in the past has had the rules of its infection governed by the computer itself, it was defined not by a dataset either, but by the programmers fixed written logic. That's like saying that the reason someones skin is red (without any context) is because they got a sunburn. What if it was a tattoo? A rash? I'm not arguing subjective semantics here -- the definitions of the phrases related to AI are still well defined if you read any whitepapers. We might have new terms in the future, or a slight change in the definition of existing words/phrases, but using that as an argument to allude to the confusion of AI's current definition is not valid.

If you say this is a machine learning problem, then we're on the right page there. Anything outside of that is likely incorrect by modern knowledge. This programming problem may not require ML though at all as I said in an earlier post, especially if you don't need to rely on uncertainty.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by JUSTINNov 9, 2017 11:42 AM 5 526 Nov 9, 2017 11:42 AM
Last Post: debug
[.NET] by Zilog80Jun 28, 2017 04:30 AM 1 341 Jun 28, 2017 04:30 AM
Last Post: Barret
[C#] by RamMay 16, 2017 11:17 PM 3 149 May 16, 2017 11:17 PM
Last Post: darkdoctor