title: OpenCV Assertion Error in detectMultiScale
body: <p>I'm trying to test out the facial recognition API in OpenCV. I have imported the <code>.jar</code> provided and it loads the DLL's correctly. The <code>imageLibIit()</code> function will load the DLL. I also have the provided XML files in a directory:<br><strong>src\main\resources\opencv</strong></p>
  
  <p><a href="https://i.stack.imgur.com/LkYVM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LkYVM.png" alt="enter image description here"></a></p>
  
  <pre><code>public boolean faceDetect(String inputFilename, String outputFilename){
      if(!loaded){
          if(!imageLibInit()){ // initializes and loads the dynamic libraries
              return false;
          }
      }
      //TODO @Austin fix image resource issues
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      String xmlResource = loader.getResource("opencv/haarcascade_frontalface_alt.xml").getPath();
      CascadeClassifier faceDetector = new CascadeClassifier(xmlResource);
      Mat inputImage = Imgcodecs.imread(inputFilename);
      ErrorUtils.println(xmlResource);
      if(inputImage.empty()){
          ErrorUtils.println("image is empty");
          return false;
      }
      MatOfRect facesDetected = new MatOfRect();
      faceDetector.detectMultiScale(inputImage, facesDetected);
      Rect[] detections = facesDetected.toArray();
      ErrorUtils.println("Faces detected in '" + inputFilename + "': " + detections.length);
      for(Rect detection : detections){
          Imgproc.rectangle(
                  inputImage,
                  new Point(detection.x, detection.y),
                  new Point(detection.x + detection.width, detection.y + detection.height),
                  new Scalar(0, 0, 255)
          );
      }
      Imgcodecs.imwrite(outputFilename, inputImage);
      return true;
  }
  </code></pre>
  
  <p>I'm still getting an error:</p>
  
  <pre><code>OpenCV Error: Assertion failed (!empty()) in cv::CascadeClassifier::detectMultiScale, file C:\builds\master_PackSlaveAddon-win64-vc12-static\opencv\modules\objdetect\src\cascadedetect.cpp, line 1639
  </code></pre>
  
  <p>I have researched this error and each time the solution seems to be something with the resources. It's more than likely an incredibly simple issue, but I am stuck as of now.</p>