php-opencv/php-opencv-examples

explanation

BbenWeb1 opened this issue · 0 comments

I tried the examples on Windows, but I befriended the problem of paths images and files, and corrected them by defining their full path, such as:
in the detect_face_by_cascade_classifier.php file
There is

line 8 :
$src = imread("images/faces.jpg");

put in place

$root = dirname(__FILE__).DIRECTORY_SEPARATOR;
$src = imread($root."images".DIRECTORY_SEPARATOR."faces.jpg");

this code run in all systeme
@morozovsk