Closed KaiH-0 closed 2 years ago
Thank you for your interest.
Mac version? Unfortunately, there is no Mac version of this project, and currently, I have no plan to make it. Because Windows and Mac have completely different APIs especially media-related API which is required to build libraries like this project.
Plugin? Sorry, I don't understand what you mean by a plugin. Is it related to Mac?
Using it with OpenCV
I recommend starting with a sample program provided by the OpenCV project.
For example: https://github.com/opencv/opencv/blob/master/samples/cpp/videocapture_basic.cpp
In OpenCV, an RGB image is expressed with the class cv::Mat.
In the above videocapture_basic.cpp
, the variable frame
will have the video frame.
So you could write a code like the below to send the frame to Softcam:
scCamera cam = scCreateCamera(frame_width, frame_height, 0);
for (;;) { cap.read(frame); if (frame.empty()) { break; }
// ... you can draw something on or process the frame.
scSendFrame(cam, frame.ptr());
}
I hope it will help you to make your application.
Thanks.
Thank you this example is very helpful, one issue, I have been trying to use softcam in visual studio code instead of normal visual studio. It keeps complaining about #include <softcam/softcam.h>, saying it can't find it, I have been trying to reference it in the include path but I don't think I'm doing it right.
If you have the file softcam.h
in a directory c:\path\to\dist\include\softcam
, the corresponding include path is c:\path\to\dist\include
, not the path of that directory that contains the file, so that the relative path softcam/softcam.h
points to the file based on the include path.
But, this is just my guess of what happening to you :)
That doesn't seem to be working, I have tried it in every way, not sure why it still can't find it.
Sorry for the late response. If you are still in trouble with this project, don't hesitate to post further questions.
Hi, I have tried this project and it was so simple to setup! This is an amazing project, I am currently making an application that will be used by a few of my colleagues, one of them has a Mac, I was wondering whether there will ever be a plugin version of this, also could you give me an example on making it use an image for the camera as I am going to use OpenCV with it.