title: OpenALPR not work with PyQt
body: <p>I tried to build a GUI app with PyQt and openalpr, but there are an issue with my code. A simple example:</p>
  
  <pre><code>from openalpr import Alpr
  from PyQt4 import QtCore, QtGui
  
  class AnalizePlate(object):
  
      def __init__(self):
  
          self.alpr = None
          try:
              self.alpr = Alpr("eu", "/etc/openalpr/openalpr.conf", "/usr/share/openalpr/runtime_data")
              if not self.alpr.is_loaded():
                  print("Error loading OpenALPR")
          except:
              print "Error"
  
  
      def proccess(self):
          self.alpr.set_top_n(7)
          self.alpr.set_default_region("md")
  
          results = self.alpr.recognize_file("/tmp/1487428945.14.jpg")
          print results
  
  a = AnalizePlate()
  a.proccess()
  </code></pre>
  
  <p>Above code works like a charm, but if GUI is involved, strange behavior occurs.</p>
  
  <pre><code>from openalpr import Alpr
  from PyQt4 import QtCore, QtGui
  
  class AnalizePlate(object):
  
      def __init__(self):
  
          self.alpr = None
          try:
              self.alpr = Alpr("eu", "/etc/openalpr/openalpr.conf", "/usr/share/openalpr/runtime_data")
              if not self.alpr.is_loaded():
                  print("Error loading OpenALPR")
          except:
              print "Error"
  
  
      def proccess(self):
          self.alpr.set_top_n(7)
          self.alpr.set_default_region("md")
  
          results = self.alpr.recognize_file("/tmp/1487428945.14.jpg")
          print results
  
  class Window(QtGui.QWidget):
  
      def __init__(self):
          super(Window, self).__init__()
          self.resize(1198, 651)
          self.analize = AnalizePlate()
          self.analize.proccess()
          QtCore.QMetaObject.connectSlotsByName(self)
  
  
  if __name__ == "__main__":
      import sys
      import sip
      app = QtGui.QApplication(sys.argv)
      window = Window()
  
      window.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>It's a basic example, but error is still here. Tried to implement <code>openalpr</code> code directly to <code>Window</code> class with no luck. So basicly, if there is no gui, code works. Using <code>openALPR version 2.2.4</code> and <code>PyQT4</code>. Also, checked the image, it's there. The same apply when <code>recognize_array()</code> is used instead of <code>recognize file</code>. Error I got is:</p>
  
  <blockquote>
    <p>OpenCV Error: Assertion failed (scaleFactor > 1 &amp;&amp; image.depth() ==
    CV_8U) in detectMultiScale, file
    /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/objdetect/src/cascadedetect.cpp,
    line 1081 Caught exception in OpenALPR recognize:
    /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/objdetect/src/cascadedetect.cpp:1081:
    error: (-215) scaleFactor > 1 &amp;&amp; image.depth() == CV_8U in function
    detectMultiScale</p>
    
    <p>Traceback (most recent call last):   File "analize.py", line 39, in
    
        window = Window()   File "analize.py", line 31, in <strong>init</strong>
        self.analize.proccess()   File "analize.py", line 22, in proccess
        results = self.alpr.recognize_file("/tmp/1487428945.14.jpg")   File "/usr/lib/python2.7/dist-packages/openalpr/openalpr.py", line
    132, in recognize_file
        response_obj = json.loads(json_data)   File "/usr/lib/python2.7/json/<strong>init</strong>.py", line 339, in loads
        return _default_decoder.decode(s)   File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())   File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
        obj, end = self.scan_once(s, idx) ValueError: Expecting property name: line 1 column 122 (char 121)</p>
  </blockquote>