(Python) ASSERT: “false” in file qasciikey.cpp [closed]

asked 2018-01-18 20:47:10 -0600

hw_gn gravatar image

updated 2018-01-18 23:24:47 -0600

Dear all,

I'm on lubuntu 16.04, using OpenCV 3.2.0, Python 2.7 and encountering this error after a brief moment of imshow() displaying a window with my camera stream.

ASSERT: "false" in file qasciikey.cpp, line 495 Aborted (core dumped)

My code appended below:

import numpy as np
import cv2

redcross_cascade = cv2.CascadeClassifier('rcrosscascade.xml')

cap = cv2.VideoCapture(2)

cv2.namedWindow('Haar', cv2.WINDOW_NORMAL)

while 1:
    ret, img = cap.read()
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

    redcross = redcross_cascade.detectMultiScale(gray, 50, 50)

    for (x,y,w,h) in redcross:
        cv2.rectangle(img,(x,y),(x+w,y+h),(255,255,0),2)

    cv2.imshow('Haar',img)
    key = cv2.waitKey(1) & 0xff
    if key == 27:
        break

cap.release()
cv2.destroyAllWindows()

Would appreciate any assistance on this matter, thank you!

EDIT: I have identified the trigger for this error - movement from my usb optical mouse. Disconnecting the mouse prevents the error from resurfacing but I've yet to find a reason for this occurrence.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-22 01:13:40.922776

Comments

unfortunately, qascii.cpp is not part of opencv's codebase, and the exception is not an opencv one.

berak gravatar imageberak ( 2018-01-19 01:56:12 -0600 )edit