Rust binding for OpenCV seems to be missing the face module - opencv

I'm using opencv as OpenCV bindings for rust and I'm trying to implement an EigenFaceRecogniser system. On docs.rs, the opencv::face module is listed inside the opencv crate. However, when I build my code, I get the error:
could not find face in opencv
I'm not really sure what's causing this as the face module is clearly listed in the documentation but for some reason I cannot use it. If anybody who has used these bindings before or knows anything about what could be going wrong could help, it would be appreciated.
I'm using OpenCV version 4.5.1.

The solution was to enable the contrib feature for the opencv package.
While I was writing the above question, I stumbled across this post asking about OpenCV having no face module in python. The solution to that question was to install the opencv-contrib-python package so I tried enabling the contrib feature in the opencv crate and it compiled. I thought I'd post this question anyway just in case somebody else was having this issue.

Related

How do I remove openCV

I am trying to remove opencv fully from my system. I was trying to learn ROS, while in tutorials I faced an issue. After creating empty workspace I invoke
catkin_make
It gives an common error, I searched and asked around in answers.ros
here is the link of the question
I think I found out the problem was opencv libraries which I had build before installing ROS-Noetic, creating the error, I searched around how to remove opencv, but non of the answers totally remove opencv without removing my opencv names files.
Is there a common solution on how to remove opencv?
Ubuntu 20.04
ROS Noetic
Best way if you installed opencv from source and still have the build directory, simply go there and call make uninstall. Another solution is to delete all opencv related files as you already know and suggested in many other similar questions like this. You could also try to use synaptic package manager if you installed using a package.
I suggest for the future to install development libraries a custom folder, so it will be just a matter of deleting that folder if something goes wrong. In this way you can also have different opencv versions in your system, this is how I do.

Linking Header File with Main.Cpp file in Codeblocks

I am trying to use codeblocks to compile the code available here
The thing is every time I try to build and run, I run into the following error:
|/.../head_pose_estimation/opencv2/core/core.hpp|48|fatal error: opencv2/core.hpp: No such file or directory
Does anyone know how I can fix this? Thank you!
You do not have the pre-built (compiled) version of OpenCV, what you currently have are the source files. If you want to do something special with OpenCV (Target/GPU SUpport etc) then you will need to build the framework using an appropriate guide.
If however you simply want to use OpenCV in the most common way then download the pre-built libraries from the OpenCV.org website.
NOTE:
If you are using OpenCV with MinGW compiler, I do not remember if the pre-built is actually pre-built for MinGW. (I dont think they do) In this case you will HAVE to built the libraries. You can find a guide here

Converting cpp file that uses opencv to mex file with matlab in ubuntu

I need some help converting a cpp file to a mex file.
I get the error below:
fatal error: opencv2/core/core.hpp: No such file or directory
Compilation terminated
The cpp file is using opencv header files. I'm not sure how to link Matlab with opencv in Ubuntu. I saw this link
http://xanthippi.ceid.upatras.gr/people/evangelidis/matlab_opencv/
but its for Windows and I'm not sure where Ubuntu stores opencv. There are a couple places I found opencv folders
usr/local/include/opencv and
usr/local/include/opencv2 and
usr/local/share/OpenCv
Tried these with OCVROOT but got 'Error: Unexpected Matlab Operator'. Not sure what I'm doing wrong here. Any help would be much appreciated.
Thank you!
Mex needs to be told where the OpenCV header files are. You can either fix it in ~/.matlab/R2013a/mexopts.sh or just put a -I argument on the mex command line. You will find the answer to How to link during Matlab's MEX compilation helpful.
You will have to sort out which of those OpenCV versions you want to use. Might be best to install you own so you know what you are dealing with.
'Error: Unexpected Matlab Operator' would be cause by an error in your matlab code.
matlab_opencv should work fine on Linux, the only windows specific thing about it the instructions, as far as I know.
unless you have a custom mexopts.sh, I don't think setting OCVROOT will hve any affect on Matlab.

Using OpenCV with DevCPP

I am a newbie to OpenCV and I am trying to use it with DevC++. Although I am aware I could use Visual Studio for the same , I would still like to use DevC++.
The OpenCV Wiki-how seems obsolete with this information. Can you please tell me the steps with which I can modify the Compiler Options in DevCpp so that I may kick-off with OpenCV.
Any help is highly appreciated ...
Also, OpenCV wiki directs me to paste the following code in the Compiler Options ,
-L"C:\Program Files\OpenCV\lib" -lcxcore -lcv -lcvaux -lhighgui -lml -lcvcam
Sadly , I did not find the lib folder in my OpenCV directory..

Intel AVCSR - (Lip reading to augment Voice Recognition)

I am interested in using a library that supports lip reading to augment audio/voice recognition. I found out that Intel's AVCSR (which was bundled with OpenCV library) would be an interesting option to consider. Would there be any other libraries that can be used to achieve the same (lip reading to augment voice recognition)?
Also I have not been able to locate a source to download this library from. I already tried the OpenCV package from SourceForge (http://sourceforge.net/projects/opencvlibrary/) but it does not seem to have the AVCSR packages/files. Could someone who has already worked with something similar point me to the place where I can find these source files (either within OpenCV or elsewhere)?
Thank you.

Resources