0

Hello everyone I am working on a project I have version 4.6 of opencv apparently does not detect this method. As if it didn't exist, it doesn't return any error either. I put an image. Image if recognized, it would display the following expected

it could be that something is not installed correctly or there is a problem with the version ?

update

import cv2 as cv
import numpy as np

cv.CascadeClassifier.detectMultiScale()
  • Visual Studio Code IDE detects the methods and give some information about the parametrs in this case says Any like not exist Regards. – Broliton syan Feb 02 '23 at 20:48
  • If you have installation issues please try a fresh virtual environment! If you need more help please add details to your question like IDE (e.g. VSCode), installer (e.g. pip), package info (e.g. from pip list) etc. to your question. Read [ask]. Additionally please check this [tutorial](https://docs.opencv.org/3.1.0/d7/d8b/tutorial_py_face_detection.html#gsc.tab=0) how to use `CascadeClassifier`. – Markus Feb 03 '23 at 09:08
  • Hello, I have the suspicion that it may be some error because of the way to install it, I am using visual studio code . I installed it using pip install opencv-python I have tried version 4.7 and I get the same error. In the documentation indicates that these methods exist in these versions so I think that is the way to install it is not done correctly. But other things in opencv let me use them, so it's weird. – Broliton syan Feb 04 '23 at 20:06
  • Do you use a virtual environment for your project? https://code.visualstudio.com/docs/python/environments – Markus Feb 05 '23 at 14:54
  • Hi @Markus I have tried to use pycharm and I get this error Cannot find reference 'CascadeClassifier' in module __init__.py and in Visual Studio Code find the reference but the method is missing i upload an updated image – Broliton syan Feb 05 '23 at 20:44
  • Do you use a virtual environment for your project? https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html – Markus Feb 06 '23 at 07:58
  • Additionally please be aware of this: https://stackoverflow.com/a/73551085/18667225 – Markus Feb 06 '23 at 20:49

0 Answers0