This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to comnect the Webcam automaticly

Well i am an inactive user so i am trying to share smth very valuable.

I have working sauce code written by me in C to connect webcam automaticly and it gets a frame when you want. Also if you want you can get frames using loops. This source code is a fundemental stone for all image processing projects.
Only thing you have to is call this code from your source code while your webcam is running.
but I dont know how to connect webcam to processor! I tried connecting to the port pins but it didnt work properly. do I Need To connect to the UsB Pins of the processor? but I cannot find the usb connector?

If You Can Help me I Will Let You have Some of my Code.

  • "I make It and There are No Errors"

    That is absolutely no guarantee whatsoever that the code will actually work!

    It simply shows that you haven't broken any of the syntax rules of the language - it is still thoroughly possible that you have logical and other errors that would prevent it from actually working.

    " I tried connecting the webcam to them but I Dont see the video in the code."

    How are you expecting to "see" video "in the code"?

  • I dont know how to connect webcam to processor! I tried connecting to the port pins but it didnt work properly. do I Need To connect to the UsB Pins of the processor? but I cannot find the usb connector?

    Any webcam I know of is an USB slave and no '51 I know of is an USB master. Thus, the twain shall never meet.

    Erik

  • "Ba'al, not Baal."

    Sorry, I stand corrected.

    There is extraordinary width and depth to so many topics on this forum ;)

  • Are you sure that your processor even has USB pins?

    "I cannot find the usb connector?"

    Clearly, the processor itself - ie, the chip - won't have a built-in USB connector!
    Therefore, it must be on the board somewhere - if your processor and your board both have USB support.
    If you can't see it, that's probably because there is no USB support.

    As Erik says, you'd need USB Host support anyhow - which is even more unlikely!

  • "no '51 I know of is an USB master"

    Maybe his magical working sauce code bit bangs full speed USB ???

    Now that would be worth seeing ;)

  • As Erik very correctly notes, a lot of people defines "working code" as code that the developer hasn't seen any problem with (yet). The problem is that the developer most of the time have forgotten a huge number of tests, so the code may look as if it works - until a fool starts to use the product. The fool may find a huge number of glaring errors, just by using the device differently than the developer thought. So who would then be the fool?

    That was also what I meant with my note "That shouldn't be the full definition, but at least a starting point for working code."

    But in your case, you don't seem to have reached even this step, i.e. you haven't been able to run the code and seen any working output since you don't even know how to connect (or if it is possible to connect) the webcam. Any such code can't even be called "tested".

    What you have to do, is take a couple of steps back. Look at the documentation for the webcam. Figure out all you can about it's interface and how to control it. Then spend a significant time with your processor manual. Either you will be able to find a solution, or you will find out that your processor can't do the job. Then you can decide how to continue - either interface the camera, switch to another webcam or switch to another processor.

    This is job you must do. Even if we can help by saying that processor xx can (or can not) interface with webcamy yy, _you_ must understand why it can, or why it can not. Why? If you don't understand how something works, then you can't write the code. If you don't know why something does not work, you can't look around for a better solution. And if you do not spend the time to learn what makes things tick, you will not be able to present a working solution or a clear report stating the failure to your teacher or your boss or whatever.

    If you fail without knowing why, your teacher/boss will think that you are a failure. If you fail but can point out that you must fail because you have been given incompatible building blocks, why they are incompatible and what building blocks you should have been given (under the assumption that it wasn't you who selected them in the first place) you might even get a very high grade on a school job despite not producing a working solution.

    The school does not look for working solutions, but for students who understands what they do, why they do it and know how to analyse situations. The teacher wants to measure knowledge, not look at flashing LEDs.