- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
14 Posted Topics
I am trying to use 2 USB webcams with OpenCV. I can get a visual with one webcam but I haven't done with two webcams. Can anybody help me? I use this code for a webcam. [CODE]void WebCam() { char Vid[] = "WebCam"; IplImage * frm; CvCapture * capture; capture … | |
I am trying to use the CalcOpticalFlowBM function but I don't understand hot it works. I want to find a motion vector for every blocks but I don't understand that the CalcOpticalFlowBM yields velX and velY. I wrote below code . [CODE]/* Create an object that decodes the input video … | |
Re: Write a square function, [CODE]#include <climits> #include <cmath> using namespace std; int square(int q) {} int main() { int number, min = INT_MAX; for(int i = 1; i < number/2; ++i) { if((temp_min = abs(square(i) - number)) <= min) { min = temp_min; nearest_s = i; } } cout << … | |
Re: Do you know functions? İf not, learn them immediately and divide you program to functions. In this code you should write two function at least, one of them is power and one of them is factorial function. You use pow for power function so you just need factorial ones. [CODE]double … | |
Re: [CODE=c] int main() { unsigned int number = 0, i = 0; printf("Give the number: "); scanf("%u", &number); for(i = 0; i < sizeof(int) * 8; ++i) { if(0 == number % 2) printf("0"); else printf("1") ; number /= 2; } return 0; } [/CODE] | |
Re: Object array_[10]; is an array of Object and all off the Objects are constructed with default constructor. But the code that below Object * array_[10]; is an array of Object pointer. The array_ array holds just pointers and the pointers point the Object class's object and non of them was … | |
Re: That's not possible actually but you can use the switch-case structure for this operation. | |
[CODE]int C[10][20]; int * mmatrix (int A[ 10 ][ 5 ], int B[ 5 ][ 20 ]) { int i, j, k; for(i = 0; i < 10; ++i) for(j = 0; j < 20; ++j) { for(k = 0; k < 5; ++k) C[ i ][ j ] += … | |
Hello Everyone; I made a USB to RS232 converter but I need to do something else. The device is shown under device management in My Computer but I have to show "a new device found" baloon when every connection to my computer like a flash disk connected. How can I … | |
Re: You should try *PointerBaseClass = new DerivedClass[ size ]; | |
Re: The most common style of '+' overloading is as Herb Sutter told, define operator +() function as a global function and, definfe operator +=() function as a member funtion is becuase you can use the '+' operator as a left or right operand. | |
Re: dwOldTime = GetTickCount(); DoSomething(); dwTimeElapsed = GetTickCount() – dwOldTime; | |
Re: [CODE]struct TwoVals { int a; int b; }; int main() { TwoVals varray[ 1 ]; varray[ 0 ].a = 1; }[/CODE] Or you can do as Narue said. | |
Re: Try it [CODE=cplusplus] // Firstli Don't use the heade //#include <iostream.h> // The correct form is #include <iostream> using namespace std; // And very deprecated using for conio //#include <conio.h> // main should return int int main() { /* int kwh,rate1,rate2,base1,base2,rate3,regning; rate1=22; rate2=33; rate3=15; base1=25; base2=35; */ // Why don't … |
The End.