Correct Architecture for Qt Application

  • Guys I am developing an application in which interfaces with the camera using opencv.
    Also working on algorithms related to camera which i have developed in python.
    I have to use the algorithms in qt application and I am restricted so cannot use pyQt.
    I just want to know the correct approach which should be followed which do not my hamper my QT application. Some of the approach which comes to me is:

    Approach 1:
    Writing the python alog in c++.
    Challenges faced:
    Python have lot of support library which i may not get for c++

    Approach 2:
    Set a mode of communication between two application and operate in parallel mode.
    Challenges faced:
    Both the application will interface camera managing them will be difficult
    And what approach should be followed to manage the application.

    Guys just want to know proper methodology which should be apply which do not hamper my application and its performance.

  • Lifetime Qt Champion

    @Kira I would try to port the algorithms to C++.
    Using second approach would have performance impacts as you would need to communicate between two processes which isn't fast.

  • @jsulm : Thanks for the reply.
    Ok the first approach seem good. One more thing if i have to go through the approach two.
    How can the communication take place . For ex: If i want to receive a frame generated by python program into qt.
    Is there any standard defined or what approch should be followed.

  • Lifetime Qt Champion

    @Kira There are many different IPC approaches:

    • Shared memory
    • Sockets
    • D-Bus
    • Networking

Log in to reply