Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

use cin for choice an operation

hi. I have below code and i want if I entered 0 then condition if (intensity1 > intensity6) be review and if i entered 1 then condition if (intensity1 < intensity6) be rewiew. ` int main(int argc, char* argv[]) { VideoCapture cap(0); // open the video camera no. 0

if (!cap.isOpened())  // if not success, exit program
{
    cout << "Cannot open the video cam" << endl;
    return -1;
}
int Darker = 0;
int Clearer = 1;
Mat frame;
namedWindow("MyVideo", CV_WINDOW_AUTOSIZE);

cout << "Difference Intensity: " << endl
    << "0---if Darker " << endl
    << "1---if Clearer " << endl;  cin >>  Darker;cin >> Clearer;

while (1)
{...

`

` if (intensity1 > intensity6) {

        line(frame, pt25, pt26, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt27, pt28, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt29, pt30, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt31, pt32, Scalar(255, 255, 255), 1, 8, 0);
    }
    else
        if (intensity1 < intensity6)
            cout << "lotus89" << endl;`

I am very grateful if you help me.thanks a lot..

use cin for choice an operation

hi. I have below code and i want if I entered 0 then condition if (intensity1 > intensity6) be review and if i entered 1 then condition if (intensity1 < intensity6) be rewiew. ` int main(int argc, char* argv[]) { VideoCapture cap(0); // open the video camera no. 0

if (!cap.isOpened())  // if not success, exit program
{
    cout << "Cannot open the video cam" << endl;
    return -1;
}
int Darker = 0;
int Clearer = 1;
Mat frame;
namedWindow("MyVideo", CV_WINDOW_AUTOSIZE);

cout << "Difference Intensity: " << endl
    << "0---if Darker " << endl
    << "1---if Clearer " << endl;  cin >>  Darker;cin >> Clearer;

while (1)
{...
{

//...

`

` if (intensity1 > intensity6) {

        line(frame, pt25, pt26, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt27, pt28, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt29, pt30, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt31, pt32, Scalar(255, 255, 255), 1, 8, 0);
    }
    else
        if (intensity1 < intensity6)
            cout << "lotus89" << endl;`

I am very grateful if you help me.thanks a lot..

use cin for choice an operation

hi. I have below code and i want if I entered 0 then condition if (intensity1 > intensity6) be review and if i entered 1 then condition if (intensity1 < intensity6) be rewiew. ` int main(int argc, char* argv[]) { VideoCapture cap(0); // open the video camera no. 0

if (!cap.isOpened())  // if not success, exit program
{
    cout << "Cannot open the video cam" << endl;
    return -1;
}
int Darker = 0;
int Clearer = 1;
Mat frame;
namedWindow("MyVideo", CV_WINDOW_AUTOSIZE);

cout << "Difference Intensity: " << endl
    << "0---if Darker " << endl
    << "1---if Clearer " << endl;  cin >>  Darker;cin >> Clearer;

while (1)
{

//...

`

` if (intensity1 > intensity6) {

        line(frame, pt25, pt26, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt27, pt28, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt29, pt30, Scalar(255, 255, 255), 1, 8, 0);
        line(frame, pt31, pt32, Scalar(255, 255, 255), 1, 8, 0);
    }
    else
        if (intensity1 < intensity6)
            cout << "lotus89" << endl;`

I am very grateful if you help me.thanks a lot..