2020-12-04 10:56:55 -0600
| marked best answer | createLBPHFaceRecognizer arguments grid_x and grid_y |
2020-07-13 05:20:24 -0600
| received badge | ● Popular Question
(source)
|
2018-08-26 23:39:28 -0600
| received badge | ● Popular Question
(source)
|
2016-11-27 02:05:54 -0600
| asked a question | Eclipse on OSX EL OpenCV3 I successfully compiled and installed the 3.1.0-dev pkg-config $pkg-config --libs --cflags opencv
-I/usr/local/include/opencv -I/usr/local/include -L/usr/local/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core
main.cpp: #include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace std;
using namespace cv;
Mat src; Mat dst;
char window_name1[] = "Unprocessed Image";
char window_name2[] = "Processed Image";
int main( int argc, char** argv )
{
/// Load the source image
src = imread( argv[1], 1 );
namedWindow( window_name1, WINDOW_AUTOSIZE );
imshow("Unprocessed Image",src);
dst = src.clone();
GaussianBlur( src, dst, Size( 15, 15 ), 0, 0 );
namedWindow( window_name2, WINDOW_AUTOSIZE );
imshow("Processed Image",dst);
waitKey();
return 0;
}
I can compile and execute main.o by using very simple argument g++ main.cpp `pkg-config --cflags --libs opencv` -o main.o
./main.o image.jpg
But when I put my include and libs directory to Eclipe 14:49:49 **** Incremental Build of configuration Debug for project aiyara ****
make all
Building target: aiyara
Invoking: MacOS X C++ Linker
g++ -L/usr/local/lib -o "aiyara" ./src/aiyara.o -lopencv_core -lopencv_highgui -lopencv_imgproc
Undefined symbols for architecture x86_64:
"cv::imread(cv::String const&, int)", referenced from:
_main in aiyara.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [aiyara] Error 1
14:49:49 Build Finished (took 126ms)
|
2016-11-26 08:55:34 -0600
| received badge | ● Critic
(source)
|
2016-11-26 07:22:27 -0600
| asked a question | OpenCV3 and Qt on OSX configuration I am trying to develope my toy project by using OpenCV and Qt
Here is my setup file and simple source from internet.
I install OpenCV3 by brew install opencv3 myproject.pro:
TEMPLATE = app
CONFIG += console c++11 link_pkgconfig
CONFIG -= app_bundle
CONFIG -= qt
QT_CONFIG -= no-pkg-config
PKGCONFIG += opencv
SOURCES += main.cpp
LIBS += -L/usr/local/lib \
-lopencv_core \
-lopencv_imgproc \
-lopencv_features2d\
-lopencv_highgui
main.cpp:
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace std;
using namespace cv;
Mat src; Mat dst;
char window_name1[] = "Unprocessed Image";
char window_name2[] = "Processed Image";
int main( int argc, char** argv )
{
/// Load the source image
src = imread( argv[1], 1 );
namedWindow( window_name1, WINDOW_AUTOSIZE );
imshow("Unprocessed Image",src);
dst = src.clone();
GaussianBlur( src, dst, Size( 15, 15 ), 0, 0 );
namedWindow( window_name2, WINDOW_AUTOSIZE );
imshow("Processed Image",dst);
waitKey();
return 0;
}
Here is my env variables: FYI:
Either PKG_CONFIG_PATH: /usr/local/opt/opencv3/lib/pkgconfig or /usr/local/Cellar/opencv3/3.1.0_4/lib/pkgconfig are not work Problem:
18:21:52: Running steps for project aiyara...
18:21:52: Configuration unchanged, skipping qmake step.
18:21:52: Starting: "/usr/bin/make"
/Users/el/Qt/5.7/clang_64/bin/qmake -spec macx-clang CONFIG+=x86_64 CONFIG+=qml_debug CONFIG+=force_debug_info CONFIG+=separate_debug_info -o Makefile ../aiyara/aiyara.pro
Project ERROR: opencv2 development package not found
make: *** [Makefile] Error 3
18:21:52: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project aiyara (kit: Desktop Qt 5.7.0 clang 64bit)
When executing step "Make"
18:21:52: Elapsed time: 00:00.
References: http://stackoverflow.com/questions/17... https://www.learnopencv.com/install-o... http://stackoverflow.com/questions/31... |
2015-12-20 19:48:38 -0600
| commented answer | How to use thread with mutliple cam? I tried (0,1), (1,2), and (0,0) as last comment. But I stop to running the camID since I am so afraid I am going to break something since I have no idea about the returned error at all. I will follow you reply (0,1), (0,2), ...(0,10). |
2015-12-20 05:53:57 -0600
| commented answer | How to use thread with mutliple cam? @Tetragramm Thank you for your comments. I had avoided USB overloading. That's why I can run 2 processces of webcam viewer simulataneously. and for the 2nd comment I had tried open calling same index twice. I called zero twice. Then got This libv4l2: error setting pixformat: Device or resource busy
VIDEOIO ERROR: libv4l unable to ioctl S_FMT
libv4l2: error setting pixformat: Device or resource busy
libv4l1: error setting pixformat: Device or resource busy
VIDEOIO ERROR: libv4l unable to ioctl VIDIOCSPICT |
2015-12-19 12:55:20 -0600
| commented question | How does stereocam prevents anti face spoofing? Thank you Eduardo. I will follow your given links and then back again. :] |
2015-12-19 02:58:42 -0600
| asked a question | How does stereocam prevents anti face spoofing? I am struck with face spoofing. Right now I can setup stereo webcam and take images from left and right webcam simulatenously(at least, I am practicing concurrent programming to do this job).
I can extract the eyes, nose, mouth, face center correctly. I had search on face spoofing publication. I usually found texture, skin, or something similar analysis on the single picture. And the prominent technique is 3D face scanner by maser Question:
I do not know how to let computer distinguish between single picture(spoofing case) and real face(human face).
I heard that is not difficult, but I could not figure out.
Please guide me some clue then I will report back what I found. |
2015-12-17 09:20:17 -0600
| commented answer | How to use thread with mutliple cam? VIDEOIO ERROR: V4L: index 2 is not correct! |
2015-12-17 02:29:56 -0600
| commented answer | How to use thread with mutliple cam? When I reach my computer I will inform you back here. Put index 1 and 2 is never come up in my mind. |
2015-12-16 10:35:50 -0600
| asked a question | How to use thread with mutliple cam? I successfully view 2 webcams parallely by using the multiple processes. As code below. I use dedicate USB bus each for single webcam. import cv2
from multiprocessing import Process
def f(camID):
vc = cv2.VideoCapture(camID)
camIDstr = str(camID)
cv2.namedWindow("preview" + camIDstr)
if vc.isOpened(): # try to get the first frame
rval, frame = vc.read()
else:
rval = False
while rval:
cv2.imshow("preview" + camIDstr, frame)
rval, frame = vc.read()
key = cv2.waitKey(20)
if key == 27: # exit on ESC
break
cv2.destroyWindow("preview" + camIDstr)
if __name__ == '__main__':
#f(0)
'''
t0 = threading.Thread(target=f, args= (0,))
t0.start()
t1 = threading.Thread(target=f, args= (1,))
t1.start()
'''
p0 = Process(target=f, args=(0,))
p0.start()
p1 = Process(target=f, args=(1,))
p1.start()
And here is my simplistic thread version.
import cv2
#from multiprocessing import Process
import threading
def f(camID):
vc = cv2.VideoCapture(camID)
camIDstr = str(camID)
cv2.namedWindow("preview" + camIDstr)
if vc.isOpened(): # try to get the first frame
rval, frame = vc.read()
else:
rval = False
while rval:
cv2.imshow("preview" + camIDstr, frame)
rval, frame = vc.read()
key = cv2.waitKey(20)
if key == 27: # exit on ESC
break
cv2.destroyWindow("preview" + camIDstr)
if __name__ == '__main__':
#f(0)
t0 = threading.Thread(target=f, args= (0,))
t0.start()
t1 = threading.Thread(target=f, args= (1,))
t1.start()
Update :
For further information. When I cut all the function and let my main function just this. for i in range(0,11):
vc = cv2.VideoCapture(i)
if vc.isOpened():
print i
The available indexes are 0 and 1. 0
1
VIDEOIO ERROR: V4L: index 2 is not correct!
VIDEOIO ERROR: V4L: index 3 is not correct!
VIDEOIO ERROR: V4L: index 4 is not correct!
VIDEOIO ERROR: V4L: index 5 is not correct!
VIDEOIO ERROR: V4L: index 6 is not correct!
VIDEOIO ERROR: V4L: index 7 is not correct!
VIDEOIO ERROR: V4L: index 8 is not correct!
VIDEOIO ERROR: V4L: index 9 is not correct!
VIDEOIO ERROR: V4L: index 10 is not correct!
Problem :
Program retunrs 1 line with error message as follows.
VIDEOIO ERROR: V4L: index 1 is not correct!
Question :
How come V4L says my index is incorrect?
If they are not 0 or 1. What number it will be?
New Question :
Is it possible to create stereo camera by using thread?
Or I need process? |
2015-12-13 03:58:51 -0600
| asked a question | Installation problem : libopencv end by *.a? I am successfully run example program in opencv/build/bin
for example opencv_test_core cpp-example-opencv_version . My version is 3.0-dev.
It looks find. But when I try manually without make . I got error.
The error comes when I remove libopencv2.4 which is Debian package from my computer and then compiled and installed latest version from github. sarit@cmd-center:~/opencv/samples/cpp$ g++ -I/usr/local/include -L/usr/local/lib -lopencv_core opencv_version.cpp
/tmp/cciphMKR.o: In function `main':
opencv_version.cpp:(.text+0x69): undefined reference to `cv::CommandLineParser::CommandLineParser(int, char const* const*, cv::String const&)'
opencv_version.cpp:(.text+0x99): undefined reference to `cv::CommandLineParser::has(cv::String const&) const'
opencv_version.cpp:(.text+0xb7): undefined reference to `cv::CommandLineParser::printMessage() const'
opencv_version.cpp:(.text+0xc8): undefined reference to `cv::CommandLineParser::check() const'
opencv_version.cpp:(.text+0xdb): undefined reference to `cv::CommandLineParser::printErrors() const'
opencv_version.cpp:(.text+0x104): undefined reference to `cv::CommandLineParser::has(cv::String const&) const'
opencv_version.cpp:(.text+0x11b): undefined reference to `cv::getBuildInformation()'
opencv_version.cpp:(.text+0x171): undefined reference to `cv::CommandLineParser::~CommandLineParser()'
opencv_version.cpp:(.text+0x19e): undefined reference to `cv::CommandLineParser::~CommandLineParser()'
opencv_version.cpp:(.text+0x1da): undefined reference to `cv::CommandLineParser::~CommandLineParser()'
/tmp/cciphMKR.o: In function `cv::String::String(char const*)':
opencv_version.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x4f): undefined reference to `cv::String::allocate(unsigned long)'
/tmp/cciphMKR.o: In function `cv::String::~String()':
opencv_version.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x14): undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
Here is my pkg-config sarit@cmd-center:~/opencv/samples/cpp$ pkg-config --cflags --libs opencv
-I/usr/local/include/opencv -I/usr/local/include -L/usr/local/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_shape -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_calib3d -lopencv_features2d -lopencv_objdetect -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudawarping -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_video -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_cudaarithm -lopencv_core -lopencv_hal -lopencv_cudev
Installed library. But I don't know why they end with *.a
sarit@cmd-center:~/opencv/samples/cpp$ ls /usr/local/lib
cmake libflandmark.so.1 libopencv_cudabgsegm.a libopencv_cudalegacy.a libopencv_cudev.a libopencv_imgcodecs.a libopencv_shape.a libopencv_videoio.a python3.4
libclandmark.so libflandmark.so.1.5 libopencv_cudacodec.a libopencv_cudaobjdetect.a libopencv_features2d.a libopencv_imgproc.a libopencv_stitching.a libopencv_videostab.a
libclandmark.so.1 libopencv_calib3d.a libopencv_cudafeatures2d.a libopencv_cudaoptflow.a libopencv_flann.a libopencv_ml.a libopencv_superres.a node_modules
libclandmark.so.1.5 libopencv_core.a libopencv_cudafilters.a libopencv_cudastereo.a libopencv_hal.a libopencv_objdetect.a libopencv_ts.a pkgconfig
libflandmark.so libopencv_cudaarithm.a libopencv_cudaimgproc.a libopencv_cudawarping.a libopencv_highgui.a libopencv_photo.a libopencv_video.a python2.7
I am not sure if I create a symbolic link and end then by .so for example
$ ln -s libopencv_core.a libopencv_core.so
Will harm my system or not. I am so afriad I am going to break something then I ask you experts in forum here. OS : GNU/Linux Debian Jessie Question :
Is this all about linking problem?
Can I simply use ldconfig to get the job done?
|
2015-12-13 00:58:36 -0600
| asked a question | undefined reference to cv::CommandLineParser::CommandLineParser(int, char const* const*, cv::String const&) I am trying to repeat example to get the current version of opencv in my system. Because I just compiled and installed 3.0-dev.
The compilation seems find. I can run the example. sarit@cmd-center:~/opencv/build/bin$ ./cpp-example-opencv_version
Welcome to OpenCV 3.0.0-dev
Howerver, when I try repeat it. I got the error. sarit@cmd-center:~/opencv/samples/cpp$ g++ `pkg-config --cflags --libs opencv` opencv_version.cpp
/tmp/ccjiJvDa.o: In function `main':
opencv_version.cpp:(.text+0x69): undefined reference to `cv::CommandLineParser::CommandLineParser(int, char const* const*, cv::String const&)'
opencv_version.cpp:(.text+0x99): undefined reference to `cv::CommandLineParser::has(cv::String const&) const'
opencv_version.cpp:(.text+0xb7): undefined reference to `cv::CommandLineParser::printMessage() const'
opencv_version.cpp:(.text+0xc8): undefined reference to `cv::CommandLineParser::check() const'
opencv_version.cpp:(.text+0xdb): undefined reference to `cv::CommandLineParser::printErrors() const'
opencv_version.cpp:(.text+0x104): undefined reference to `cv::CommandLineParser::has(cv::String const&) const'
opencv_version.cpp:(.text+0x11b): undefined reference to `cv::getBuildInformation()'
opencv_version.cpp:(.text+0x171): undefined reference to `cv::CommandLineParser::~CommandLineParser()'
opencv_version.cpp:(.text+0x19e): undefined reference to `cv::CommandLineParser::~CommandLineParser()'
opencv_version.cpp:(.text+0x1da): undefined reference to `cv::CommandLineParser::~CommandLineParser()'
/tmp/ccjiJvDa.o: In function `cv::String::String(char const*)':
opencv_version.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x4f): undefined reference to `cv::String::allocate(unsigned long)'
/tmp/ccjiJvDa.o: In function `cv::String::~String()':
opencv_version.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x14): undefined reference to `cv::String::deallocate()'
collect2: error: ld returned 1 exit status
Here is my libs and flags sarit@cmd-center:~/opencv/build/bin$ pkg-config --libs --cflags opencv
-I/usr/local/include/opencv -I/usr/local/include -L/usr/local/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_cudawarping -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn -lopencv_dpm -lopencv_fuzzy -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_rgbd -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_face -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_imgproc -lopencv_cudaarithm -lopencv_core -lopencv_hal -lopencv_cudev
Question :
How to fix this error? |
2015-12-12 22:31:55 -0600
| answered a question | Method to detect eye, nose and mouth |
2015-12-12 11:55:15 -0600
| asked a question | Forgot make opencv_contrib Installation on Linux has 2 links. They are http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html http://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html#gsc.tab=0
I just found the later one. So I have to compile opencv_contrib one by one. My questions are :
1. Is it safe to follow 2nd link ?
2. Will make install just simply overwrite previous compilations?
3. Do I need to do make uninstall first?
It would be nice for first link let me know how to install opencv_contrib too. |
2015-12-06 02:27:44 -0600
| asked a question | HIGHGUI ERROR: V4L2: Unable to get property Hi
I am practicing VideoCapture and VideoWriter . I am now following http://stackoverflow.com/questions/13623394/how-to-write-video-file-in-opencv-2-4-3
Which is supposed to be a brief answer.
However, when I am doing it It got. $ ./simpleRec.out 0 a.avi
HIGHGUI ERROR: V4L2: Unable to get property <unknown property string>(5) - Invalid argument
HIGHGUI ERROR: V4L2: Unable to get property <unknown property string>(6) - Invalid argument
!!! Output video could not be opened
Here is my code :
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <iomanip>
#include <string>
#include <stdio.h>
using namespace std;
using namespace cv;
int main (int argc, const char** argv){
// Load input video
cv::VideoCapture input_cap(atoi( (argv[1]) ) );
if (!input_cap.isOpened())
{
std::cout << "!!! Input video could not be opened" << std::endl;
return -1;
}
// Setup output video
//double fps = input_cap.get(CV_CAP_PROP_FPS);
int width = input_cap.get(CV_CAP_PROP_FRAME_WIDTH);
int height = input_cap.get(CV_CAP_PROP_FRAME_HEIGHT);
cv::VideoWriter output_cap(argv[2],
CV_FOURCC('M','J','P','G'),
20,
cv::Size(width,height),
true);
if (!output_cap.isOpened())
{
std::cout << "!!! Output video could not be opened" << std::endl;
return 0;
}
// Loop to read from input and write to output
cv::Mat frame;
while (true)
{
if (!input_cap.read(frame))
break;
output_cap.write(frame);
}
input_cap.release();
output_cap.release();
}
Update :
I found it is a bug in issue. http://code.opencv.org/issues/1895 it is fps is -1
I had tried 10,20,30 but it still does not work with reply !!! Output video could not be opened
I changed VideoWriter initialization a bit. From
cv::VideoWriter output_cap(argv[2],
input_cap.get(CV_CAP_PROP_FOURCC),
input_cap.get(CV_CAP_PROP_FPS),
cv::Size(input_cap.get(CV_CAP_PROP_FRAME_WIDTH),
input_cap.get(CV_CAP_PROP_FRAME_HEIGHT)),
true);
to
//double fps = input_cap.get(CV_CAP_PROP_FPS);
int width = input_cap.get(CV_CAP_PROP_FRAME_WIDTH);
int height = input_cap.get(CV_CAP_PROP_FRAME_HEIGHT);
cv::VideoWriter output_cap(argv[2],
CV_FOURCC('M','J','P','G'),
20,
cv::Size(width,height),
true);
I have to comment fps out otherwise it will thrown an error HIGHGUI ERROR: V4L2: Unable to get property <unknown property string> Question :
1. What is wrong in my code?
2. How do I solve it?
|
2015-12-04 23:49:39 -0600
| asked a question | Python display delay when work with multiple cam Hi
I am in the early state of my project. I want to proof very simple concept on hardware performance.
Since I have a plenty of USB bus then I attach them individually to avoid bandwidth problem. I do not want to use MPEG because it consume my reading time and it slow down my program. Here is my bus. $ lsusb
Bus 006 Device 005: ID 0c45:6340 Microdia
Bus 003 Device 002: ID 0c45:62f1 Microdia
Here is my simple code which is has a delay. import cv2
cv2.namedWindow("preview")
cv2.namedWindow("preview2")
vc = cv2.VideoCapture(0)
vc2 = cv2.VideoCapture(1)
if vc.isOpened() and vc2.isOpened(): # try to get the first frame
rval, frame = vc.read()
rval2, frame2 = vc2.read()
else:
rval = False
rval2 = False
while rval and rval2:
cv2.imshow("preview", frame)
cv2.imshow("preview2", frame2)
rval, frame = vc.read()
rval2, frame2 =vc2.read()
key = cv2.waitKey(20)
if key == 27: # exit on ESC
break
cv2.destroyWindow("preview")
cv2.destroyWindow("preview2")
My attempt on python thread is as follow :
import cv2
import threading
def f(camID):
vc = cv2.VideoCapture(camID)
cv2.namedWindow("preview" + str(camID))
if vc.isOpened(): # try to get the first frame
rval, frame = vc.read()
else:
rval = False
while rval:
cv2.imshow("preview", frame)
rval, frame = vc.read()
key = cv2.waitKey(20)
if key == 27: # exit on ESC
break
cv2.destroyWindow("preview"+str(camID))
if __name__ == '__main__':
#f(0)
t0 = threading.Thread(target=f, args= (0,))
t0.start()
t1 = threading.Thread(target=f, args= (1,))
t1.start()
When I use t0 or t1 by comment the others off. It works just fine with the same response. Althought webcams are same model, but older than one 5 years. My error :
HIGHGUI ERROR: V4L: index 1 is not correct!
(preview1:5154): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
(preview1:5154): Gdk-CRITICAL **: IA__gdk_draw_rectangle: assertion 'GDK_IS_GC (gc)' failed
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted
My question : .
1. How to let program do a computing on captured image from webcam synchronously?
2. How to display the picture in the window without delay?
3. How to use python thread properly in my example?
|
2015-11-19 10:32:42 -0600
| commented question | collect2: error: ld returned 1 exit status Thank you berak. sarit@cmd-center:~/clandmark/examples$ g++ pkg-config --cflags opencv static_input.cpp -o static_input.out pkg-config --libs opencv -L/usr/local/include -lclandmark -lflandmark
The compilation is done, but got error while loading shared libraries: libclandmark.so.1: cannot open shared object file: No such file or directory. $ ldconfig -v will solve library problem |
2015-11-18 19:28:45 -0600
| commented question | collect2: error: ld returned 1 exit status I am away from my computer. When I reach it I will update to you as fast as I can. |
2015-11-18 10:18:01 -0600
| asked a question | collect2: error: ld returned 1 exit status I am now practicing new library for my app.
Here is what I have done so far with 3rd party lib. root@cmd-center:/home/sarit/clandmark/build# make install
[ 44%] Built target clandmark
[ 88%] Built target flandmark
[ 94%] Built target static_input
[100%] Built target video_input
Install the project...
-- Install configuration: "RELEASE"
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkTargets.cmake
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkTargets-release.cmake
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkConfig.cmake
-- Installing: /usr/local/lib/cmake/clandmark/CLandmarkConfigVersion.cmake
-- Installing: /usr/local/include/rapidxml_print.hpp
-- Installing: /usr/local/include/rapidxml.hpp
-- Installing: /usr/local/include/rapidxml_utils.hpp
-- Installing: /usr/local/include/rapidxml_iterators.hpp
-- Installing: /usr/local/share/doc/clandmark/manual.html
-- Installing: /usr/local/share/doc/clandmark/license.txt
-- Installing: /usr/local/include/CImg.h
-- Installing: /usr/local/share/doc/clandmark/README.txt
-- Installing: /usr/local/share/doc/clandmark/Licence_CeCILL_V2-en.txt
-- Installing: /usr/local/share/doc/clandmark/Licence_CeCILL-C_V1-en.txt
-- Installing: /usr/local/lib/libclandmark.so.1.5
-- Installing: /usr/local/lib/libclandmark.so.1
-- Installing: /usr/local/lib/libclandmark.so
-- Installing: /usr/local/lib/libflandmark.so.1.5
-- Installing: /usr/local/lib/libflandmark.so.1
-- Installing: /usr/local/lib/libflandmark.so
-- Removed runtime path from "/usr/local/lib/libflandmark.so.1.5"
-- Installing: /usr/local/include/msvc-compat.h
-- Installing: /usr/local/include/base64.h
-- Installing: /usr/local/include/CLandmark.h
-- Installing: /usr/local/include/CFeaturePool.h
-- Installing: /usr/local/include/CFeatures.h
-- Installing: /usr/local/include/CAppearanceModel.h
-- Installing: /usr/local/include/CDeformationCost.h
-- Installing: /usr/local/include/CLoss.h
-- Installing: /usr/local/include/CMaxSumSolver.h
-- Installing: /usr/local/include/CXMLInOut.h
-- Installing: /usr/local/include/CTimer.h
-- Installing: /usr/local/include/CTypes.h
-- Installing: /usr/local/include/CLandmarkConfig.h
-- Installing: /usr/local/include/Flandmark.h
-- Installing: /usr/local/include/CSparseLBPFeatures.h
-- Installing: /usr/local/include/CSparseLBPAppearanceModel.h
-- Installing: /usr/local/include/CDisplacementDeformationCost.h
-- Installing: /usr/local/include/CNormalizedEuclideanLoss.h
-- Installing: /usr/local/include/CTableLoss.h
-- Installing: /usr/local/include/CZeroLoss.h
-- Installing: /usr/local/include/CTreeMaxSumSolver.h
-- Installing: /usr/local/share/clandmark/models/flandmark_model.xml
-- Installing: /usr/local/share/clandmark/models/haarcascade_frontalface_alt.xml
-- Installing: /usr/local/share/clandmark/examples/static_input
-- Removed runtime path from "/usr/local/share/clandmark/examples/static_input"
-- Installing: /usr/local/share/clandmark/examples/video_input
-- Removed runtime path from "/usr/local/share/clandmark/examples/video_input"
Here is the libclandmark location. sarit@cmd-center:~/clandmark/libclandmark$ pwd
/home/sarit/clandmark/libclandmark
sarit@cmd-center:~/clandmark/libclandmark$ ls
base64.h CDeformationCost.h CFeatures.h CLoss.h CSparseLBPAppearanceModel.cpp CTimer.h CZeroLoss.cpp msvc-compat.h
CAppearanceModel.cpp CDisplacementDeformationCost.cpp clandmarkConfig.cmake.in CMakeLists.txt CSparseLBPAppearanceModel.h CTreeMaxSumSolver.cpp CZeroLoss.h
CAppearanceModel.h CDisplacementDeformationCost.h CLandmarkConfig.h.in CMaxSumSolver.cpp CSparseLBPFeatures.cpp CTreeMaxSumSolver.h flandmarkConfig.cmake.in
CDAGMaxSumSolver.cpp CFeaturePool.cpp CLandmark.cpp CMaxSumSolver.h CSparseLBPFeatures.h CTypes.h Flandmark.cpp
CDAGMaxSumSolver.h CFeaturePool.h CLandmark.h CNormalizedEuclideanLoss.cpp CTableLoss.cpp CXMLInOut.cpp Flandmark.h
CDeformationCost.cpp CFeatures.cpp CLoss.cpp CNormalizedEuclideanLoss.h CTableLoss.h CXMLInOut.h helpers.h
Compile : $ g++ `pkg-config --cflags opencv` static_input.cpp -o static_input.out ... (more) |
2015-10-12 10:46:44 -0600
| commented question | How to apply Odometry to maze game? Thank you for your reply. Your given links are my new knowledge for today :) |
2015-10-12 08:08:31 -0600
| asked a question | How to apply Odometry to maze game? Hi.
OpenCV is very fasinating. Currently, I want to play aroung with my game it is a FPS with maze game.
How to apply Odometry to help me figure out the maze by advancing the odometry to it?
I have seen odometry in action with online webcam and video file. However, they are not my case.
I want real time I/O from game. |
2015-08-16 07:31:32 -0600
| commented question | error: cannot convert ‘float*’ to ‘double*’ for argument ‘4’ to ‘int flandmark_detect(IplImage*, int*, FLANDMARK_Model*, double*, int*) @berak. Thank you so much! I was hitting the book about OO, CMake, and compilation with GCC. What a nightmare without your help. |
2015-08-16 07:22:37 -0600
| commented question | error: cannot convert ‘float*’ to ‘double*’ for argument ‘4’ to ‘int flandmark_detect(IplImage*, int*, FLANDMARK_Model*, double*, int*) |
2015-08-16 06:49:31 -0600
| asked a question | error: cannot convert ‘float*’ to ‘double*’ for argument ‘4’ to ‘int flandmark_detect(IplImage*, int*, FLANDMARK_Model*, double*, int*) I will study CMake later. For now I will use everything in the same directory.
I git clone the repo and put the example which I copy the website, name it as 'sarit.cpp'.
My questions is :
1. Do you think the developer confuses his own function? If he does. How can I fix it?
$ g++ sarit.cpp `pkg-config --cflags --libs opencv`
sarit.cpp: In function ‘int main(int, char**)’:
sarit.cpp:22:57: error: cannot convert ‘float*’ to ‘double*’ for argument ‘4’ to ‘int flandmark_detect(IplImage*, int*, FLANDMARK_Model*, double*, int*)’
flandmark_detect(img_grayscale, bbox, model, landmarks);
And here is is my pkg-config
$ pkg-config --libs --cflags opencv
-I/usr/include/opencv /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so -lopencv_calib3d /usr/lib/x86_64-linux-gnu/libopencv_contrib.so -lopencv_contrib /usr/lib/x86_64-linux-gnu/libopencv_core.so -lopencv_core /usr/lib/x86_64-linux-gnu/libopencv_features2d.so -lopencv_features2d /usr/lib/x86_64-linux-gnu/libopencv_flann.so -lopencv_flann /usr/lib/x86_64-linux-gnu/libopencv_gpu.so -lopencv_gpu /usr/lib/x86_64-linux-gnu/libopencv_highgui.so -lopencv_highgui /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so -lopencv_imgproc /usr/lib/x86_64-linux-gnu/libopencv_legacy.so -lopencv_legacy /usr/lib/x86_64-linux-gnu/libopencv_ml.so -lopencv_ml /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so -lopencv_objdetect /usr/lib/x86_64-linux-gnu/libopencv_ocl.so -lopencv_ocl /usr/lib/x86_64-linux-gnu/libopencv_photo.so -lopencv_photo /usr/lib/x86_64-linux-gnu/libopencv_stitching.so -lopencv_stitching /usr/lib/x86_64-linux-gnu/libopencv_superres.so -lopencv_superres /usr/lib/x86_64-linux-gnu/libopencv_ts.so -lopencv_ts /usr/lib/x86_64-linux-gnu/libopencv_video.so -lopencv_video /usr/lib/x86_64-linux-gnu/libopencv_videostab.so -lopencv_videostab
My file :
#include "flandmark_detector.h"
#include "cv.h"
#include "opencv/highgui.h"
int main(int argc, char * argv[])
{
// load flandmark model structure and initialize
FLANDMARK_Model * model = flandmark_init("flandmark_model.dat");
// load input image
IplImage *img = cvLoadImage("photo.jpg");
// convert image to grayscale
IplImage *img_grayscale = cvCreateImage(cvSize(img->width, img->height), IPL_DEPTH_8U, 1);
cvCvtColor(img, img_grayscale, CV_BGR2GRAY);
// bbox with detected face (format: top_left_col top_left_row bottom_right_col bottom_right_row)
int bbox[] = {72, 72, 183, 183};
// detect facial landmarks (output are x, y coordinates of detected landmarks)
float * landmarks = (float*)malloc(2*model->data.options.M*sizeof(float));
flandmark_detect(img_grayscale, bbox, model, landmarks);
}
|
2015-08-01 21:45:15 -0600
| commented question | Distinguish person face algorithm @berak. Thank you berak. Feels like something exciting is waiting for me :o |
2015-07-31 09:03:31 -0600
| commented question | Distinguish person face algorithm @berak. Right now, I can detect eyes and mouth of person face. Suppose I use simple affine tranform http://docs.opencv.org/doc/tutorials/... to transform face from first picture to second image by mapping a pair of eyes and mouth. Is the result going to be a wrong one? If it wrong. What's wrong? |
2015-04-19 05:07:32 -0600
| received badge | ● Student
(source)
|
2015-04-18 13:52:56 -0600
| commented question | Eliminate false eye @berak. I though your eye answer will rely on face geometry ratio or length of them. I am now observing the variation of them. Let me try and return to forum again.
Do you think mouth is impact by face area? Since my Neo detected face has very near edge to the mouth. |
2015-04-18 13:26:49 -0600
| commented question | Eliminate false eye @berak. Hello berak. Do you have any idea?
Any keyword I can find out on my own? |
2015-04-18 13:10:11 -0600
| asked a question | Eliminate false eye Hi I'm using OpenCV 2.4.10.
I can detect pair eyes and mouth for alignment with fair accuracy rate.
Here is my situation.
https://www.youtube.com/watch?v=0ZY5U... My problems are :
1. Eyes detection return false eye. I got 3rd eye in nearby the correct one.
2. Neo's mouth has been dropped on many frames.
Any help would be appreciated.
Sarit |
2015-04-07 11:29:01 -0600
| asked a question | Training set preparation Hi
My goal is create a program that focus on human face and screen out the duplicate picture.
Now I am stuck with eyes and mouth extraction. They are feature that I use to transform a picture to be a mugshot.
I understand it will has a distortion, but that's ok.
I want to know.
1. Do you expert do a transformation from detected face to be frontal face?
2. Does Machine Learning require that?
Thanks
Sarit |