Thread: How do I get&use my AI's camera's images if I don't have them beforehand in my code!

  1. #46
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    It says right on the page what it does.

    I remind you that you asked a very general question today:
    Now, c++ was easy to learn 40% of it in 4days, it was all there in a manual I found. But putting it in a robot to manage its memory is not, so for this part at least I must hire. Can you even make some c++ code affect my pc's HD disk memory or other programs or is it not connected??
    This is what I originally read -- other details arrived after my answer had been posted. Since it was a general question, I answered it in a general way. There are a broad range of HDD affects. Making files is a common concern, and only later did you specify deleting files. Later still did it become clear that you were ignoring advice and trying to code computer vision yourself, instead of using a library to speed along the process of making an AI.


    Man, I have to say... you've made talking about AIs boring. That's a novel achievement.

  2. #47
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    Thank you. I acknowledge that. It's so ever exciting to me though. I stay home everyday and only work on it. I have 0 fun. It's all for immortality.

    It must do what I said in opening post, though no no deleting, maybe memory fade though by lowering rank=lower match at meaning it will soon never be able to be retrieved.

    Also from the 2 links I just posted, *to me*, no, I don't know why I'd want to use them or what they do.
    Last edited by ADVANCESSSS; 01-10-2016 at 05:04 PM.

  3. #48
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    I have this feeling the code I'm working on below won't be noticed for what it is. It's probably as good as telling you how it works. It guesses, then once it gets acceleration sense it will save guessed actions and are linked to saved sense, then sensing acceleration again matches mem sense linking to actions to initiate, it crawls forward, into wall, after a while body gives pain which links to actions&sense in latest memory, then this stops actions since neg senses label actions as -, then it guesses and turns around from wall, eventually so much pain it stops totaly, enough to get lots of energy and go right back to crawl actions initiated once see open space, then when sees next wall it matches mem of wall which links to neg labeled actions and links to good turn around, ends up different places since room isnt total open square walled nor where it went in its direction ex crawled at angle, now by pain again or repeatitive sense/action it goes to guess mode and deviates off maybe by new saved crawl actions but without the sammmme sense it was getting that was repetitive, it now crawls the house avoiding walls.

    Code:
    #include <iostream>
    #include <stdlib.h>
    #include <time.h>
    #include <ctime>
    
    
    using namespace std;
    
    
    static int x = 0;
    static int y = 0;
    
    
    int legnum(int legnumber)
    {
        if (legnumber < 2000)
        return 1;
        else if (legnumber < 15800)
        return 2;
        else if (legnumber < 45000)
        return 3;
        else if (legnumber < 60000)
        return 4;
    }
    
    
    int legs(int leg)
    {
        static int doItAgain = 0;
        ++doItAgain;
        if (doItAgain == 5)
        doItAgain = doItAgain - 4;
    
    
        if (doItAgain == 1)
        cout << "leg 1 ";
        else if (doItAgain == 2)
        cout << "leg 2 ";
        else if (doItAgain == 3)
        cout << "leg 3 ";
        else if (doItAgain == 4)
        cout << "leg 4 ";
    
    
        if (leg < 2000)
        cout << "moved left" << endl;
        else if (leg < 15800)
        cout << "moved forward" << endl;
        else if (leg < 45000)
        cout << "moved backward" << endl;
        else if (leg < 60000)
        cout << "moved right" << endl;
    
    
        return 0;
    }
    
    
    int main()
    {
        tryAgain:
    
    
        srand( time(0));
        int guess1 = rand();
        int guess2 = rand();
        int guess3 = rand();
        int guess4 = rand();
    
    
        int leg1 = guess1;
        int leg2 = guess2;
        int leg3 = guess3;
        int leg4 = guess4;
        leg1 = legnum(leg1);
        leg2 = legnum(leg2);
        leg3 = legnum(leg3);
        leg4 = legnum(leg4);
    
    
        legs(guess1);
        legs(guess2);
        legs(guess3);
        legs(guess4);
    
    
        if (x == 8 && leg2 == 4)
        goto tryAgain;
        if (x == -8 && leg2 == 1)
        goto tryAgain;
        if (y == 8 && leg2 == 2)
        goto tryAgain;
        if (y == -8 && leg2 == 3)
        goto tryAgain;
    
    
        if (leg2 == leg3 && leg2 == leg4)
        cout << "Robot moved forward and got acceleration sense by accelometer, which is the trigger to save actions just guessed. The sense instantly matches a close match in memory and links to and initiates the saved actions, +labeled actions are done." << endl;
        else
        goto tryAgain;
    
    
        again:
        if (leg2 == 1)
        x = --x;
        else if (leg2 == 2)
        y = ++y;
        else if (leg2 == 3)
        y = --y;
        else if (leg2 == 4)
        x = ++x;
        cout << "Currently at tile " << x << " " << y << "." << endl;
    
    
        if (x == 8 || x == -8 || y == 8 || y == -8)
        cout << "Robot gently walks into wall. After a while has passed, its body sends pain, and it goes to guess mode" << endl;
    
    
        if (x == 8 || x == -8 || y == 8 || y == -8)
        {
            cout << "Enter a number to continue." << endl;
            int CONTINUE;
            cin >> CONTINUE;
        }
    
    
        if (x == 8 || x == -8 || y == 8 || y == -8)
        goto tryAgain;
    
    
        cout << "Enter a number to continue." << endl;
        int CONTINUE2;
        cin >> CONTINUE2;
    
    
        cout << "Robot moved forward again" << endl;
        goto again;
    
    
        goto tryAgain;
    
    
        return 0;
    }

  4. #49
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    Sigh.

    Using a pseudorandom number to decide actions is not guessing. It's just acting upon pseudorandom numbers.

  5. #50
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    That does use guesses from the clock date by srand() bro, it does, and if the number is higher or lower than " " then it will say either leg moved left or forward...you can see it all happen from running it, it also does more after that too I have added.

    IF YOU MEAN GUESS LIKE GUESS, THEN THATS FROM A KNOWLEDGEABLE HUMAN GUESS..........WE ARE TALKING ABOUT RANDDOOOOM GUESSES THAT ARE RANDOM AND UNPREDICTABLE EVEN THOUGH THEY ALL ARE PREDICTABLE AND GO BY DESTINY, I FORGIVE YOUR BRAINFART.
    Last edited by ADVANCESSSS; 01-10-2016 at 11:03 PM.

  6. #51
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    Also tell me that thing you said I didn't know about the pc's electronic algorithms I gotta add it to my hoard of knowledge.

  7. #52
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    Random movement is not guessing, it's just random movement. Check the Wikipedia article on guessing, for example:
    A guess (or an act of guessing) is a swift conclusion drawn from data directly at hand, and held as probable or tentative, while the person making the guess (the guesser) admittedly lacks material for a greater degree of certainty.
    When the data at hand does not seem to help the guess, the guess is often called a blind guess. In that case, there is still past experience or general knowledge applied. For example, if someone asks you to guess what color the sky is while you both are inside and cannot see the sky, you're probably not going to guess "brown", because it is neither common nor interesting for the color of the sky.

    When the data at hand does help making a likely correct guess, it is often called an informed guess. In that case, there are clear reasons for making that guess, although not enough reliable information to claim it reliable. For example, you could have been outside fifteen minutes ago, so it's likely that the sky is still the same color as then; or perhaps someone commented about it a while ago and you vaguely remember their remark.

    Guessing does not necessarily involve any randomness at all. Consider the guessing game. You can write a computer program that asks you, the user, to think of an integer between 1 and 1,000,000. It will then guess a number, and you'll tell it whether that is the number you are thinking of, or whether the number you are thinking of is greater or smaller. The program does not need any random numbers at all, and is guaranteed -- if you play honestly -- to guess your number with 21 questions or less. (In general, the number of guesses needed is at most 1+⌈log2(max-min+1)⌉.)

    Consider a maze-walking robot. If you make it pick each intersection at random, it is not guaranteed to solve the maze. It often will, but it is never guaranteed, and the larger the maze is, the stupider its choices seem (as the solution takes longer and longer). On the other hand, if your robot always picks the rightmost passage when it comes to an intersection, it will solve every single solvable maze, and especially with larger mazes, it looks pretty clever. It does not even need to remember where it has already been, or where it is (in relation to the maze) at any point.

  8. #53
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    We want the robot AI to (when first turned on as a baby) make random guesses NOT like a knowledgeable human would but rather random which if a knowledgeable human can even do such anymore~ As for it receiving these generated movements, at first it has nothing to go on to mod them meaning we must send it random movements, and, the only way we know what ones to keep or what ones to allow is by if we get the triggers!

    Also what was that thing you were saying I didn't know about.

    Oh what am I doing wrong...
    Code:
    #include <fstream>
    #include <iostream>
    
    
    using namespace std;
    
    
     int main()
      {
        int x = 5000;
        ifstream infile;
        infile.open("testpic.PNG", ios::binary | ios::in);
        infile.read(&x, 5000);
        infile.close();
      }

  9. #54
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Why are you doing it? I wrote a simple hex viewer if you just want to see the image's binary format. It's in C#, though; the actual processing of bytes would be similar in C++. Maybe you can learn from that?

  10. #55
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    Firstly anyone knowledgeable in Machine Learning knows how it starts off like I said above with those guesses, ...you're a newb.......

    Secondly I cannot get to your source code whiteflags...and I have 7zip.

    Thirdly, if none of you's can answer my opening question, then clearly none of yous have ever put code into a robot that integrates at least one of those tasks listed. And it's not like it's a discovery, it's a manual answer, of which humans have not corrected indexed cus I can't find it. Maybe I'll hire/ask for free someone that knows the answer - a small piece of some codes that do the opening post's things.

    I'm gonna code my AI today. As soon as I put it in any robot (human better becomes human)(da hands & mouth) and get it doing those tasks in the robot said in opening post (I'll try searching Google today, too bad no Search-Tree I find the answer!), we're gonna become immortal in weeks in the health center they make and maintain.

    https://www.youtube.com/watch?v=RKfd...Bst_m&index=43
    Go to these times.
    13:59 - 13:18

    24:41 - 23:27
    18:52 - 17:42
    9:36 - 8:50
    5:40 - 4:10
    1:47 - 1:29
    00:39 - 00:00
    Last edited by ADVANCESSSS; 01-11-2016 at 02:01 PM.

  11. #56
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Quote Originally Posted by ADVANCESSSS View Post
    Secondly I cannot get to your source code whiteflags...and I have 7zip.
    You can download the executable if you just want to see the bytes of some image. You would need a C# IDE to open the files if you downloaded them. If you don't want to do that, then the code tab should show you everything.

    I don't really offer support for my application.

  12. #57
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    Also read the thirdly again I added some text at the end of its sentence.

  13. #58
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    omggg this stupid opencvvvvvv......whyyy........it can't just be installed, it needs me to do all this stuff and it won't even prob. work on my old windows xp nor codeblocks unless I do more stuff, little own what the secret code will be, oh, oh, how I'm thinking about hiring someone for this part, oh, god, oh god.

  14. #59
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    You guys do realize I didn't want opencv's face recognition ect right? Only how to get a camera's images and then IIIIII can myself make it match my own little coded apparatus mechanism gizmo, isn't there anyyyy other way to get a cameras images, ?

  15. #60
    Registered User
    Join Date
    Dec 2015
    Posts
    142
    Wahahah, wahahahah......SimpleCV, 1 click installers that *set it up* and easier to code the meat functions:
    Blog - SimpleCV
    If I'm correct..................................it may all be a fairy tail in my mind maybe it's not what I think...............................let's hope...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 12-28-2012, 11:14 PM
  2. creating images using C# code
    By synyyy in forum C# Programming
    Replies: 1
    Last Post: 01-26-2011, 11:27 PM
  3. ip camera
    By sgh in forum C# Programming
    Replies: 3
    Last Post: 03-12-2009, 01:50 PM
  4. Following camera
    By pandu in forum Game Programming
    Replies: 5
    Last Post: 06-10-2008, 07:20 PM
  5. Digital Camera -> Slo-Mo Camera??
    By Masa in forum Tech Board
    Replies: 6
    Last Post: 12-24-2003, 11:11 AM

Tags for this Thread