Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCV in SystemC

Tags:

c

opencv

systemc

I have been using both OpenCV and SystemC for several applications with great satisfaction.

Now, I have this application where I need to display images with OpenCV in a SystemC simulation environment. For some reason however, both packages seem to be incompatible "at runtime":

  • There is no problem when I call cvNamedWindow or cvShowImage in a SystemC class before sc_start() was called.
  • However, when cvNamedWindow or cvShowImage is called in a sc_thread, the execution of the program is aborted:

    Thread 1: EXC_BAD_ACCESS(code=2, address=0x7c91ad70).

There is no problem with querying frames (cvQueryFrame), only window-related functions seem to cause problems. If someone has an idea what could cause this problem and if there is a solution or a work-around for this issue, that would be great.

P.S. I'm using Xcode, but I suppose that the problem is not related to the coding environment.

like image 870
user2120472 Avatar asked Oct 04 '22 21:10

user2120472


1 Answers

It won't work, SystemC doesn't support GUIs (Graphical User Interfaces).

Somebody did some research on this subject: Implementing a Graphical User Interface for SystemC

SystemC is an open source library used for developing models of software algorithms, hardware architecture and system-level designs. Although SystemC is very rich in possibilities for Hardware Description, the simulation is made via a console application, thus textual only, hence it is cumbersome to view the results. Our objective is to develop a GUI for SystemC to provide a more intuitive representation of simulation results. We will document our experiment and compare the cost, in terms of simulation time, of our solution.

like image 67
karlphillip Avatar answered Oct 13 '22 09:10

karlphillip