- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
8 Posted Topics
Hi! I'm trying to use the opencv bindings of Python. I tried the following code: [CODE]from opencv.highgui import * from opencv.cv import * cam = 'cam' cvNamedWindow(cam) cap = cvCreateCameraCapture(0) while cvWaitKey(1) != 27: img=cvQueryFrame(cap) cvShowImage(cam,img)[/CODE] Although the window seems to open fine, I cannot see any image. I just … | |
Re: Hi! I'm having a similar program. Here is the code I am using - [CODE]#define DATA 0x378 void strober() { int c; if (ioperm(DATA,3,1)) fprintf(stderr,"You need to be root!\n"); for (c=0; c<50; c++){ fprintf(stdout,"LED should turn on.\n"); fflush(stdout); outb(0x07,DATA); sleep(t); fprintf(stdout,"LED should turn off.\n"); fflush(stdout); outb(0x00,DATA); sleep(t); } } int … | |
Hi! I'm trying to use the nanosleep and sleep functions in a program I am trying to write. I first tried this - [CODE] fprintf(stdout,"Hey guys.."); struct timespec t_req, t_rem; t_req.tv_sec = 1; t_req.tv_nsec = 500; if (nanosleep(&t_req, &t_rem) < 0) return 0; fprintf(stdout,"...What's up?");[/CODE] Since the function nanosleep did … | |
Re: Hi Uday, A good practice is to google/bing/<search engine of your choice> for your request first. Quite often, you would find what you are looking for. A search on google ([URL="http://www.google.co.in/search?q=learn+C+programming&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:official&client=firefox-a"]here[/URL]) will direct you to various sites that will start with a simple Hello World program, and allow you to … | |
Hi! I am trying to convert my c/c++ code into a python module. The code captures an image which it then runs some algorithms upon. For a start, I am trying to write a code that just captures an image. I am using opencv for the image capture (in the … | |
Hi! My problems are more of porting a code to Windows, than the code itself. I need to download a file from a URL ( http://127.0.0.1/img.jpg ) and store it in a local file. I think I've screwed up the setting up of the libcurl libraries. I am using Visual … | |
Re: Well, the following should do the trick: [CODE]def func(x): y = (2*x*x*x) - (8*x*x) + x + 16 return y[/CODE] The best I can think of is a function that scans across the region of interest, maybe calculating f(x) for every 0.01 on the x axis. You can increase this … | |
Hi! I'm trying to build a Python extension with C/C++. I'm following the steps given in the documentation [URL="http://docs.python.org/extending/extending.html"]here[/URL]. I've followed the steps mentioned and written my first code. However, I have no clue on how to compile the project! I do not know how to create the .pyd file … |
The End.