Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8073493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:21:19+00:00 2026-06-05T14:21:19+00:00

I have a demo application that is written in Python. It uses a lot

  • 0

I have a demo application that is written in Python. It uses a lot of existing C++ code (written by me) that relies on OpenCV for image processing. Currently, communication between Python and C++ is being done through file I/O and subprocess calls, which isn’t very efficient. What is the best way to wrap the C++ code so that it can be called from Python?

There is too much C++ code to think about porting it to Python, so that’s not really an option.

A long time ago, the Python OpenCV wrappers were written in SWIG, but it looks like the most recent version of the wrappers is completely different. Can anyone point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:21:21+00:00Added an answer on June 5, 2026 at 2:21 pm

    There are two ways that you can make your python program interact directly with your C/C++ program:

    1. Wrap your C/C++ code in a DLL with C-API only. Then, use ctypes
      to call C-function within the DLL. The advantage of this way is that you don’t need to include/link any other library.

    2. Extend python by adding new python module. You may use boost python to easily create a python module. The advantage of this way is that you don’t need to wrap your code to C-API.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a TCP server application written in .Net that receives and submits
I have an iPad application that only supports landscape mode (just for a demo
i am creating media recorder demo application. for that i have take two button
I have prepared an application that is a small demo of Student information manipulation.
I have a Silverlight application that uses a RadGridView control. When a user updates
I have a small web application that uses twitter bootstrap tabs. Recently it has
I have one demo application to check select for update query public class Test
i have created a demo application Using JSF & EJB 3.0 (Stateless session bean
In my rails application, I have a controller called demo which is stored at
Its too much code to paste here so, I have created demo please have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.