简体   繁体   中英

Connecting C++ and Node JS

I have been working on a project where I am interacting with a 3D camera(on a single machine) through its SDK written in C++. The extent of my knowledge in that language is just as good as what a basic crash course could teach. I need to provide an interface(web) which shows the camera preview from the SDK and when the capture image is clicked, I need to capture an Image using the SDK with a specified filename and path. The approaches I thought of are:

  1. Using NodeJS exec to capture images the compiled version(exe) of my program in C++. I am communicating the filepath and using json.
  2. I could learn and use C++ CGI to simply control C++ SDK stuff.

Any help/suggestions would be greatly appreciated. Thanks in advance.

You can use one of the C++ CGI libraries out there but, as easy as they are to use, just calling an executable seems easier and cleaner. I think the scanner should come with a bundled tool to drive it, doesn't it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM