I am looking for a library that could capture streams of images from webcam
or USB camera
, and then converting image data into multidimensional matrices, in order to do some mathematical operation on them; afterward saving the result as a png
file.
I am stuck in the first step. It seems there is only opencv
to capture images from camera, which uses highgui.dll
for the job. Unfortunately after installing opencv
using nimble install opencv
, and running a simple code
import opencv/imgproc
import opencv/highgui
import opencv/core
var capture = captureFromCam(CAP_ANY)
the error could not load: (lib|)opencv_highgui(249|231|)(d|).dll
arises. Opencv
cannot find the library to import necessary functions from it. So far I could not find any way to overcome this issue. In standard libraries of Nim
, there are two libraries serial
and winim
that if I am not wrong, are handling device ports. I could not find a simple way to use them. The question is, what is the proper library for handling devices and how to use them in a simple manner?
For the rest of the job (manipulating image data) I think pixie
is a good library to use. It would be good to know, if there is better library, in simplicity and performance.