Thursday, November 24, 2016

Gulp: Failed to load external module coffee-script/register

For anyone coming across an issue with the
Failed to load external module coffee-script/register
issue, check if you indeed have coffee-script installed:
$ npm ls coffee-script
your-app@1.0.0
└── coffee-script@1.9.0
If you have it installed, delete the node_modules folder, and rerun your install:
$ rm -rf node_modules && npm install

OpenCV: can't predict the confidence

Predict function is not sending the result of confidence/distance

Remove the CV_WRAP from predict function on file
/opencv_contrib/modules/face/include/opencv2/face.hpp

and Recompile the opencv

-----------------------------
A better way that was already present in the opencv3, suggested by Abdul Jalil

result = cv2.face.MinDistancePredictCollector()
        recognizer.predict(face,result, 0)
        recog = result.getLabel()
        conf = result.getDist()


gulp: Error 'node' no such file or directory

I've found this is often a misnaming error, if you install from a package manager you bin may be called nodejs so you just need to symlink it like so "ln -s /usr/bin/nodejs /usr/bin/node"

Saturday, November 19, 2016

opencv facerecognizer tutorial llink

http://hanzratech.in/2015/02/03/face-recognition-using-opencv.html

http://answers.opencv.org/question/82294/cant-get-predict-confidence/

https://courses.cit.cornell.edu/ece5990/ECE5990_Fall15_FinalProjects/Andre_Heil/ece5990_final_report/avh34_jr986.html

Opencv3 Cv2.cv.HAAR_SCALE_IMAGE cv not found

Solution
cv2.CASCADE_SCALE_IMAGE

Opencv3: no attribute name 'CV_AA'

In opencv3
change CV_AA to LINE_AA

for testing
import cv2
cv2.LINE_AA in python

Tuesday, November 15, 2016

dlib on ubuntu

pip install dlib
You will need boost python. To get it:
sudo apt-get install libboost-all-dev

Saturday, November 12, 2016

opencv installation errors: math.h or stdlib.h not found

Solution
Without  gstreamer and with gcc  version 6, installation generates too many errors.  

$sudo apt-get install gstreamer1.0*
$sudo apt-get install gstreamer-plugins-base1.0.dev


install gcc and g++ version 5
and downgrade gcc  and g++ version
$sudo update-alternatives  --install /usr/bin/gcc gcc /usr/bin/gcc-5 100
$sudo update-alternatives  --install /usr/bin/g++ g++ /usr/bin/g++-5 100