Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~10K People Reached
Favorite Tags

8 Posted Topics

Member Avatar for kedarm

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 …

Member Avatar for Ratzian
0
318
Member Avatar for mfierro

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 …

Member Avatar for kedarm
0
1K
Member Avatar for kedarm

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 …

Member Avatar for mitrmkar
0
955
Member Avatar for uday.rnsit

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 …

Member Avatar for jephthah
-2
124
Member Avatar for kedarm

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 …

0
103
Member Avatar for kedarm

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 …

Member Avatar for Salem
0
1K
Member Avatar for idreu2go4it

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 …

Member Avatar for vegaseat
0
408
Member Avatar for kedarm

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 …

Member Avatar for kedarm
0
5K

The End.