OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /opt/opencv/modules/highgui/src/window.cpp, line 331
terminate called after throwing an instance of 'cv::Exception'
what(): /opt/opencv/modules/highgui/src/window.cpp:331: error: (-215) size.width>0 && size.height>0 in function imshow
You’re probably not the only person who will have this problem!
Google will point people with this problem at this forum thread.
To help the other people who will have this problem (even if it’s an “obvious” problem like missing package, type, etc,) you should post the actual answer to your own question here.
After all, you asked all of us, a bunch of complete strangers, to help you out. Thus, it’s fair that you post the solution you arrived at, so that other complete strangers can in turn be helped.
Of course.
I use cameras DFK23UP1300. The problem was with the drivers.
I contacted with technical support and they said that I need to install this version of drivers.
git clone https://github.com/theimagingsource/tiscamera tiscamera-working
cd tiscamera-working
git checkout v-tiscamera-0.9.1
mkdir build
cd build
cmake -DBUILD_ARAVIS=OFF -DBUILD_GST_1_0=ON -DBUILD_TOOLS=ON -DBUILD_V4L2=ON
-DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install