Ask Your Question

pythonCoder's profile - activity

2020-09-20 10:32:08 -0600 marked best answer OpenCV image display

Hello World!

I have been very interested in OpenCV for a while now, but never bothered getting it. I ended up downloading it through pip, making sure I had numpy, matplotlib, and the cv2 modules working. I tried running a very simple program:

from __future__ import print_function

import cv2 as cv

src1 = cv.imread(cv.samples.findFile('LinuxLogo.jpg'))
src2 = cv.imread(cv.samples.findFile('WindowsLogo.jpg'))

however I get this error:

Traceback (most recent call last):  
File
"C:/Users/•••••••••/Documents/Python_Programs/adding_images.py",
line 5, in <module>
src1 = cv.imread(cv.samples.findFile('LinuxLogo.jpg'))
cv2.error: OpenCV(4.4.0)
C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-m5rt9vz0\opencv\modules\core\src\utils\samples.cpp:62:
error: (-2:Unspecified error) OpenCV
 samples: Can't find required data
 file: LinuxLogo.jpg in function
 'cv::samples::findFile'

I think what may be happening here is that this module was set up on the user appveyor and it doesn't work on my computer? Or, (probably more likely) something completely different. Either way, any help is greatly appreciated! (Note:Open CV version is up to date, python 3 is used)

2020-09-16 13:10:39 -0600 commented question OpenCV image display

I saw the documentation about the .findFile part but not sure how to use it.

2020-09-16 13:05:42 -0600 commented question OpenCV image display

mvuroi what would be the syntax to do that?

2020-09-16 11:48:58 -0600 asked a question OpenCV image display

OpenCV image display Hello World! I have been very interested in OpenCV for a while now, but never bothered getting it.

2020-09-16 11:48:58 -0600 asked a question OpenCV image display

OpenCV image display Hello World! I have been very interested in OpenCV for a while now, but never bothered getting it.