Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imencode exception in second thread

Hello,

I'm having problems encoding an image to jpg in a second thread. It's doing well in main thread but got an exception again and again when i try from other thread.

So, i have a Mat object called A in main thread and have a struct containing A and other variables that i passed to new thread as a parameter. I think this part is well because i can view Mat A object in new thread with debugger and has the correct size. After that, i do the encoding and got the exception, i don't have very much info about the exception:

code: 0xe06d7363 flags=0x1 (execution cannot be continued)

and in funtion levels

0 level: RaiseException -> File: KernelBase

1level: CxxThrowException -> File: MSVCR120

2level: cv::error -> File:opencv_core249

3level: cvWaitKey -> File:opencv_highgui249

4level: cv::imencode -> File:highgui249

I'm very lost so any help i really appreciate.

Thanks

imencode exception in second thread

Hello,

I'm having problems encoding an image to jpg in a second thread. It's doing well in main thread but got an exception again and again when i try from other thread.

So, i have a Mat object called A in main thread and have a struct containing A and other variables that i passed to new thread as a parameter. I think this part is well because i can view Mat A object in new thread with debugger and has the correct size. After that, i do the encoding and got the exception, i don't have very much info about the exception:

code: 0xe06d7363 flags=0x1 (execution cannot be continued)

and in funtion levels

0 level: RaiseException -> File: KernelBase

1level: CxxThrowException -> File: MSVCR120

2level: cv::error -> File:opencv_core249

3level: cvWaitKey -> File:opencv_highgui249

4level: cv::imencode -> File:highgui249

I'm very lost so any help i really appreciate.

Thanks