background-substraction

BackgroundSubtractor throws 'Unrecognized or unsupported array type in function cvGetMat' Exception

北城余情 提交于 2019-12-24 02:04:44
问题 I have searched a lot for this problem, but I did not find any solution. I have a program which receives JPEG format file data through socket (in bytes), then I convert the byte array to OpenCV Mat object as below: Mat mat = Imgcodecs.imdecode(new MatOfByte(byteArray), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED); It converts well without any exception, then (for test case to ensure the data is OK) I convert the Mat object to BufferedImage and then show it in a JPanel , everything goes well without any