Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The camera is not working

I'm new and just starting to learn OpenCV. I do not initialize the camera while capturing the image, I tried different cameras, but there is no result, even a window with a black screen does not show (in the screenshots of 2 differently implemented programs and their assemblies) P.S (OpenCV - 3.41, Linux ubuntu 18.04)image description(/upfiles/1531772309288639.jpg)(/upfiles/1531772296699289.jpg)(/upfiles/15317722837398883.jpg)

click to hide/show revision 2
None

updated 2018-07-16 20:08:02 -0600

berak gravatar image

The camera is not working

I'm new and just starting to learn OpenCV. I do not initialize the camera while capturing the image, I tried different cameras, but there is no result, even a window with a black screen does not show (in the screenshots of 2 differently implemented programs and their assemblies) P.S (OpenCV - 3.41, Linux ubuntu 18.04)image description(/upfiles/1531772309288639.jpg)(/upfiles/1531772296699289.jpg)(/upfiles/15317722837398883.jpg)18.04

The camera is not working

I'm new and just starting to learn OpenCV. I do The camera is not initialize the camera while capturing the image, initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show (in show. Below information about the screenshots of 2 differently implemented programs and their assemblies) video:

Video I/O: DC1394: YES (ver 2.2.5) FFMPEG: YES avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: YES (ver 3.7.0) GStreamer: NO gPhoto2: YES

program text:

include <opencv2 opencv.hpp="">

include <iostream>

int main( int argc, char** argv ) { cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );

cv::VideoCapture cap;

if (argc == 1) cap.open(0); else cap.open( argv[1] );

// std::cout << cv::getBuildInformation() << std:: endl; if (!cap.isOpened()) { std::cerr << "Ошибка при открытии устройства захвата." << std::endl; return -1; }

cv::Mat frame;

for (;;) { cap >> frame; if (frame.empty()) break; cv::imshow( "Example10", frame ); if (cv::waitKey(33) == 27) break; }

return 0; }

P.S (OpenCV - 3.41, 3.4.1, Linux ubuntu 18.0418.04)

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

 Video I/O:
    DC1394:                      YES (ver 2.2.5)
    FFMPEG:                      YES
      avcodec:                   YES (ver 57.107.100)
      avformat:                  YES (ver 57.83.100)
      avutil:                    YES (ver 55.78.100)
      swscale:                   YES (ver 4.8.100)
      avresample:                YES (ver 3.7.0)
    GStreamer:                   NO
    gPhoto2:                     YES

YES program text:

include <opencv2 opencv.hpp="">

include <iostream>

text: #include <opencv2/opencv.hpp> #include <iostream> int main( int argc, char** argv ) { cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );

); cv::VideoCapture cap;

cap; if (argc == 1) cap.open(0); else cap.open( argv[1] );

); // std::cout << cv::getBuildInformation() << std:: endl; if (!cap.isOpened()) { std::cerr << "Ошибка при открытии устройства захвата." << std::endl; return -1; }

cv::Mat frame;

frame; for (;;) { cap >> frame; if (frame.empty()) break; cv::imshow( "Example10", frame ); if (cv::waitKey(33) == 27) break; }

} return 0; }

}

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

click to hide/show revision 5
None

updated 2018-07-18 01:40:03 -0600

berak gravatar image

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

 Video I/O:
    DC1394:                      YES (ver 2.2.5)
    FFMPEG:                      YES
      avcodec:                   YES (ver 57.107.100)
      avformat:                  YES (ver 57.83.100)
      avutil:                    YES (ver 55.78.100)
      swscale:                   YES (ver 4.8.100)
      avresample:                YES (ver 3.7.0)
    GStreamer:                   NO
    gPhoto2:                     YES
 

program text: text:

#include <opencv2/opencv.hpp>
#include <iostream>

int main( int argc, char** argv )
{
   cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );

   cv::VideoCapture cap;

   if (argc == 1)
   cap.open(0);
   else cap.open( argv[1] );

  // std::cout << cv::getBuildInformation() << std:: endl;
   if (!cap.isOpened())
   { 
       std::cerr << "Ошибка при открытии устройства захвата." << std::endl;
       return -1;
   } 

   cv::Mat frame;

   for (;;)
   {
      cap >> frame;
      if (frame.empty()) break;
      cv::imshow( "Example10", frame );
      if (cv::waitKey(33) == 27) break;
   }

  return 0;
}

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

 

Video I/O: DC1394: YES (ver 2.2.5) FFMPEG: YES avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: YES (ver 3.7.0) GStreamer: NO gPhoto2: YES

YES

program text:

#include <opencv2/opencv.hpp>
#include <iostream>

include <opencv2 opencv.hpp="">

include <iostream>

int main( int argc, char** argv ) { cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE ); );

cv::VideoCapture cap; cap;

if (argc == 1) cap.open(0); 1)

cap.open(0);

else cap.open( argv[1] ); // std::cout << cv::getBuildInformation() << std:: endl; );

if (!cap.isOpened()) { std::cerr << "Ошибка при открытии устройства захвата." "Error." << std::endl; return -1; }

cv::Mat frame; frame;

for (;;) { {

  cap >> frame;
   if (frame.empty()) break;
   cv::imshow( "Example10", frame );
   if (cv::waitKey(33) == 27) break;
   }

  

}

return 0; }

}

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

Video I/O: DC1394: YES (ver 2.2.5) FFMPEG: YES avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: YES (ver 3.7.0) GStreamer: NO gPhoto2: YES

program text:

include <opencv2 opencv.hpp="">

include <iostream>

int main( int argc, char** argv ) { cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );

); cv::VideoCapture cap;

cap; if (argc == 1)

cap.open(0);

1) cap.open(0); else cap.open( argv[1] );

); if (!cap.isOpened()) { std::cerr << "Error." << std::endl; return -1; }

cv::Mat frame;

frame; for (;;) {

{
      cap >> frame;
   if (frame.empty()) break;
   cv::imshow( "Example10", frame );
   if (cv::waitKey(33) == 27) break;

}

} return 0; }

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

Video I/O: DC1394: YES (ver 2.2.5) FFMPEG: YES avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: YES (ver 3.7.0) GStreamer: NO gPhoto2: YES

program text:

include <opencv2 opencv.hpp="">

include <iostream>

int main( int argc, char** argv ) { cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE ); );

cv::VideoCapture cap; cap;

if (argc == 1) cap.open(0); else cap.open(0);

else cap.open( argv[1] ); );

if (!cap.isOpened()) { std::cerr << "Error." << std::endl; return -1; }

cv::Mat frame; frame;

for (;;) { cap >> frame; if (frame.empty()) break; cv::imshow( "Example10", frame ); if (cv::waitKey(33) == 27) break; } }

return 0; }

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

click to hide/show revision 9
None

updated 2018-07-18 01:42:13 -0600

berak gravatar image

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

 Video I/O:
    DC1394:                      YES (ver 2.2.5)
    FFMPEG:                      YES
      avcodec:                   YES (ver 57.107.100)
      avformat:                  YES (ver 57.83.100)
      avutil:                    YES (ver 55.78.100)
      swscale:                   YES (ver 4.8.100)
      avresample:                YES (ver 3.7.0)
    GStreamer:                   NO
    gPhoto2:                     YES

YES

program text:

include <opencv2 opencv.hpp="">

include <iostream>

#include <opencv2/opencv.hpp>
#include <iostream>

int main( int argc, char** argv )
{
   cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );

); cv::VideoCapture cap;

cap; if (argc == 1) cap.open(0);

cap.open(0); else cap.open( argv[1] );

); if (!cap.isOpened()) { std::cerr << "Error." << std::endl; return -1; }

cv::Mat frame;

frame; for (;;) { cap >> frame; if (frame.empty()) break; cv::imshow( "Example10", frame ); if (cv::waitKey(33) == 27) break; }

} return 0; }

}

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

 

Video I/O: DC1394: YES (ver 2.2.5) FFMPEG: YES avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: YES (ver 3.7.0) GStreamer: NO gPhoto2: YES

YES

program text:

#include <opencv2/opencv.hpp>
#include <iostream>

include <opencv2 opencv.hpp="">

include <iostream>

int main( int argc, char** argv ) { {

  cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );
   cv::VideoCapture cap;
   if (argc == 1)
    cap.open(0);

   else
    cap.open( argv[1] );

   if (!cap.isOpened())
   { 
       std::cerr << "Error." << std::endl;
       return -1;
   } 

   cv::Mat frame;

   for (;;)
   {
       cap >> frame;
       if (frame.empty()) break;
       cv::imshow( "Example10", frame );
       if (cv::waitKey(33) == 27) break;
   }

  return 0;
}

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

click to hide/show revision 11
None

updated 2018-07-18 01:47:32 -0600

berak gravatar image

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

 Video I/O:
    DC1394:                      YES (ver 2.2.5)
    FFMPEG:                      YES
      avcodec:                   YES (ver 57.107.100)
      avformat:                  YES (ver 57.83.100)
      avutil:                    YES (ver 55.78.100)
      swscale:                   YES (ver 4.8.100)
      avresample:                YES (ver 3.7.0)
    GStreamer:                   NO
    gPhoto2:                     YES

YES

program text:

include <opencv2 opencv.hpp="">

include <iostream>

#include <opencv2/opencv.hpp>
#include <iostream>

int main( int argc, char** argv )
{

{

      cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );
   cv::VideoCapture cap;
   if (argc == 1)
      cap.open(0);

   else
      cap.open( argv[1] );

   if (!cap.isOpened())
   { 
        std::cerr << "Error." << std::endl;
        return -1;
   } 

   cv::Mat frame;

   for (;;)
   {

         cap >> frame;
         if (frame.empty()) break;
         cv::imshow( "Example10", frame );
         if (cv::waitKey(33) == 27) break;
    }

  return 0;
 }

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)

click to hide/show revision 12
retagged

The camera is not working

I'm new and just starting to learn OpenCV. The camera is not initialized during image capture I tried different cameras, but there is no result, even a window with a black screen does not show. Below information about the video:

 Video I/O:
    DC1394:                      YES (ver 2.2.5)
    FFMPEG:                      YES
      avcodec:                   YES (ver 57.107.100)
      avformat:                  YES (ver 57.83.100)
      avutil:                    YES (ver 55.78.100)
      swscale:                   YES (ver 4.8.100)
      avresample:                YES (ver 3.7.0)
    GStreamer:                   NO
    gPhoto2:                     YES

program text:

#include <opencv2/opencv.hpp>
#include <iostream>

int main( int argc, char** argv )
{

      cv::namedWindow( "Example10", cv::WINDOW_AUTOSIZE );
      cv::VideoCapture cap;
      if (argc == 1)
         cap.open(0);

      else
         cap.open( argv[1] );

      if (!cap.isOpened())
      { 
           std::cerr << "Error." << std::endl;
           return -1;
      } 

      cv::Mat frame;

      for (;;)
      {

            cap >> frame;
            if (frame.empty()) break;
            cv::imshow( "Example10", frame );
            if (cv::waitKey(33) == 27) break;
       }

     return 0;
    }

P.S (OpenCV - 3.4.1, Linux ubuntu 18.04)