Ask Your Question

franken's profile - activity

2020-06-29 15:10:31 -0600 received badge  Famous Question (source)
2019-09-09 00:25:55 -0600 received badge  Popular Question (source)
2019-01-21 07:07:58 -0600 received badge  Notable Question (source)
2018-07-23 06:23:41 -0600 received badge  Notable Question (source)
2018-02-26 10:07:48 -0600 received badge  Notable Question (source)
2017-11-17 04:52:43 -0600 received badge  Popular Question (source)
2017-08-09 05:27:47 -0600 received badge  Notable Question (source)
2017-07-04 03:20:47 -0600 received badge  Popular Question (source)
2017-05-08 06:49:40 -0600 received badge  Popular Question (source)
2016-07-20 13:42:19 -0600 received badge  Popular Question (source)
2015-10-16 11:06:48 -0600 commented question What is "convexityDefects" in opencv ?

@LBerger thanks that was helpfull :)

2015-10-12 15:53:21 -0600 commented question can't get image in color mode using opencv c++ with raspberry camera module

@Eduardo yes you're right , thanks

2015-10-12 15:52:00 -0600 asked a question What is "convexityDefects" in opencv ?

Hi , i am implementing a hand recognition system using opencv , i found that i must be using "convexityDefects" : what i have understand from this page documentation : convexityDefects

that it is used to count fingers of the hand hull by determining the minimum distance between the two points on the hand .... but i still don't know exactly how this procedure is done , can anybody give me more explannation about it also what algorithm is used for hand gesture recognition in opencv

Any help will be appreciated , thanks

2015-09-01 09:50:03 -0600 received badge  Student (source)
2015-08-29 14:09:08 -0600 commented question A way to count how many people have been detected in faceDetect.cpp

@berak yes just in time the person is viewing the camera , itt's about beign able to measure the audiance for a smart billboard wich is equiped with a camera

  • i was thinking about getting the coordinate of the face if it's detected and if it is not going way from and interval 10 < x < 30 and for y too , i can see that the face detected is in the same place and so it's the same person .......
  • and for the recognition , i don't know much about it or how to integrate it with the actual code !!!
2015-08-29 13:49:20 -0600 asked a question Erros whe uninstalling opencv 2.4.10

Hi , i want to uninstall opencv 2.4.10 from ubuntu 14.04 and install opencv 3.0.0 i have enter to the build directory where i have install from opencv with cmake . so when running

sudo make uninstall

i get this output

 -- Detected version of GNU GCC: 48 (408)
-- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libIlmImf.so
-- checking for module 'gstreamer-base-1.0'
--   package 'gstreamer-base-1.0' not found
-- checking for module 'gstreamer-video-1.0'
--   package 'gstreamer-video-1.0' not found
-- checking for module 'gstreamer-app-1.0'
--   package 'gstreamer-app-1.0' not found
-- checking for module 'gstreamer-riff-1.0'
--   package 'gstreamer-riff-1.0' not found
-- checking for module 'gstreamer-pbutils-1.0'
--   package 'gstreamer-pbutils-1.0' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Found Sphinx 1.2.2: /usr/bin/sphinx-build
-- Found apache ant 1.9.3: /usr/bin/ant
-- The imported target "vtkParseJava" references the file
   "/usr/bin/vtkParseJava"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtkWrapJava" references the file
   "/usr/bin/vtkWrapJava"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtkCommonJava" references the file
   "/usr/lib/jni/libvtkCommonJava.so.5.8.0"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtkFilteringJava" references the file
   "/usr/lib/jni/libvtkFilteringJava.so.5.8.0"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtkImagingJava" references the file
   "/usr/lib/jni/libvtkImagingJava.so.5.8.0"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtkGraphicsJava" references the file
   "/usr/lib/jni/libvtkGraphicsJava.so.5 ...
(more)
2015-08-27 03:09:33 -0600 commented question A way to count how many people have been detected in faceDetect.cpp

@berak i think that recognition is impossible since my application turn in real time , i'm just looking for a trick to estimate the number of persons , or maybe there is nothing i can do , thanks

2015-08-26 16:08:49 -0600 asked a question A way to count how many people have been detected in faceDetect.cpp

I am running the code faceDetect.cpp , i need to count how many people are beign detected , i can detect how many people are in in the same frame by incrementing a variable for each face detected but in the case for example if the person appear , disapear and re-appear i couldn't find a way to count it as just one person the complete code can be found here

https://github.com/Itseez/opencv/blob...

we are interrested in this part of the code (the function detectAndDraw) where the face and the eye are beign detected

void detectAndDraw( Mat& img, CascadeClassifier& cascade,
                CascadeClassifier& nestedCascade,
                double scale, bool tryflip )
{
    int i = 0;
    double t = 0;
    vector<Rect> faces, faces2;
    const static Scalar colors[] =  { CV_RGB(0,0,255),
        CV_RGB(0,128,255),
        CV_RGB(0,255,255),
        CV_RGB(0,255,0),
        CV_RGB(255,128,0),
        CV_RGB(255,255,0),
        CV_RGB(255,0,0),
        CV_RGB(255,0,255)} ;
    Mat gray, smallImg( cvRound (img.rows/scale), cvRound(img.cols/scale), CV_8UC1 );

cvtColor( img, gray, COLOR_BGR2GRAY );
resize( gray, smallImg, smallImg.size(), 0, 0, INTER_LINEAR );
equalizeHist( smallImg, smallImg );

t = (double)cvGetTickCount();
cascade.detectMultiScale( smallImg, faces,
    1.1, 2, 0
    //|CASCADE_FIND_BIGGEST_OBJECT
    //|CASCADE_DO_ROUGH_SEARCH
    |CASCADE_SCALE_IMAGE
    ,
    Size(30, 30) );
if( tryflip )
{
    flip(smallImg, smallImg, 1);
    cascade.detectMultiScale( smallImg, faces2,
                             1.1, 2, 0
                             //|CASCADE_FIND_BIGGEST_OBJECT
                             //|CASCADE_DO_ROUGH_SEARCH
                             |CASCADE_SCALE_IMAGE
                             ,
                             Size(30, 30) );
    for( vector<Rect>::const_iterator r = faces2.begin(); r != faces2.end(); r++ )
    {
        faces.push_back(Rect(smallImg.cols - r->x - r->width, r->y, r->width, r->height));
    }
}
t = (double)cvGetTickCount() - t;
printf( "detection time = %g ms\n", t/((double)cvGetTickFrequency()*1000.) );
for( vector<Rect>::const_iterator r = faces.begin(); r != faces.end(); r++, i++ )
{
    Mat smallImgROI;
    vector<Rect> nestedObjects;
    Point center;
    Scalar color = colors[i%8];
    int radius;

    double aspect_ratio = (double)r->width/r->height;
    if( 0.75 < aspect_ratio && aspect_ratio < 1.3 )
    {
        center.x = cvRound((r->x + r->width*0.5)*scale);
        center.y = cvRound((r->y + r->height*0.5)*scale);
        radius = cvRound((r->width + r->height)*0.25*scale);
        circle( img, center, radius, color, 3, 8, 0 );
    }
    else
        rectangle( img, cvPoint(cvRound(r->x*scale), cvRound(r->y*scale)),
                   cvPoint(cvRound((r->x + r->width-1)*scale), cvRound((r->y + r->height-1)*scale)),
                   color, 3, 8, 0);
    if( nestedCascade.empty() )
        continue;
    smallImgROI = smallImg(*r);
    nestedCascade.detectMultiScale( smallImgROI, nestedObjects,
        1.1, 2, 0
        //|CASCADE_FIND_BIGGEST_OBJECT
        //|CASCADE_DO_ROUGH_SEARCH
        //|CASCADE_DO_CANNY_PRUNING
        |CASCADE_SCALE_IMAGE
        ,
        Size(30, 30) );
    for( vector<Rect>::const_iterator nr = nestedObjects.begin(); nr != nestedObjects.end(); nr++ )
    {
        center.x = cvRound((r->x + nr->x + nr->width*0.5)*scale);
        center.y = cvRound((r->y + nr->y + nr->height*0.5)*scale);
        radius = cvRound((nr->width + nr->height)*0.25*scale);
        circle( img, center, radius, color, 3, 8, 0 );
    }
}
cv::imshow( "result", img );

}

note that the color is changed every time a new face is detected , that is the case when multiple image are detected in the same frame , but i am interrested in one person where the color normally doesn't change

any hints ?

2015-08-26 08:54:19 -0600 commented question How to run faceDetect faster

@sturkmen yes it a way to do so but it won't detect the big faces , i am using size(30,30)

2015-08-26 08:51:10 -0600 commented question How to run faceDetect faster

@berak like i said if i increase the scale factor the accuracy is gone , yes i can limit the space in detectMultiscale function it's set to 30,30 but it the limit if i decrease it more it will not detect more faces

2015-08-26 06:45:32 -0600 commented question How to run faceDetect faster

@berak you're right LBP is faster (a few times faster) but less accurate. (10-20% less than Haar). , for me it's about 5 times faster that's because i use eye detection too with haar classifier using 'haarcascade_eye_tree_eyeglasses.xml' , i have not found an XML file for eye detection using lbpCascade , so what you suggest to do ...

2015-08-25 12:10:15 -0600 asked a question How to run faceDetect faster

Hi i'm a newbie in opencv , i want to run the code faceDetect.cpp in sample folder on a raspberry pi 2 overclocked to 1GHZ , i'm using faceDetect.cpp to detect face and eye gaze

the program is a little bit slow due to the detection i want that the program runs in real time ... the only improvement that i can done is to increase the scale but the accuracy decreases a lot ... is there any alternative that can be done without affecting much the accuracy !!! thanks a lot.

2015-08-06 06:27:08 -0600 commented question How to properly install opencv 3 with QT on Raspberry

@StevenPuttemans the problem is to use it with raspberry =D not in laptop , maybe there is no difference since both the pi and laptop (ubuntu) are linux based systems ??

2015-08-06 06:23:08 -0600 commented question How to properly install opencv 3 with QT on Raspberry

@StevenPuttemans the link you have posted is for cross compiling QT for raspberry ... do i realyy need it or just this https://wiki.qt.io/Apt-get_Qt4_on_the...

2015-08-06 05:42:11 -0600 commented question How to properly install opencv 3 with QT on Raspberry

@StevenPuttemans but there is some issues on using QT 5 with OPENCV 3.0 ... maybe i sould use QT 4.8.6 unstead of QT 5

2015-08-06 04:16:48 -0600 commented question How to properly install opencv 3 with QT on Raspberry

yes yes but what about QT , do i need just to include the qt flag in cmake ??

2015-08-06 04:12:52 -0600 commented question How to use OPENCV 2.4.10 with QTCreator 3.4.1

@theodore , NO i haven't compiled opencv with QT flag :p , the problem was in the developpement kit , i use the default where both QT 5.4.2 and QT 4.8.6 are checked , so i have now checked just QT 4.8.6 and it worked .. thanks man ......... Now i want to use opencv 3 with QT on raspberry have you any link or tutorial ?

2015-08-06 03:46:33 -0600 asked a question How to properly install opencv 3 with QT on Raspberry

HI all, i want to install opencv 3 with QT enabled on my raspberry B+ , any suggestions or links to do all the procedure thanks

2015-08-05 05:53:58 -0600 commented answer Errors after wrong installation of opencv

please see the "update section"

2015-08-05 05:48:00 -0600 received badge  Scholar (source)
2015-08-05 05:47:59 -0600 commented answer Errors after wrong installation of opencv

solve it now from the previous post .... now i will update my question or just add another post thanks

2015-08-05 05:39:56 -0600 commented question Redeclaration issue

@StevenPuttermans Hi steven , ok thank you i have used #include <opencv2 imgproc="" imgproc.hpp=""> and comment the line //#include <opencv2 imgcodecs.hpp=""> now it worked so i have opencv 2.4.10 but not if i uncomment imgcodecs

2015-08-05 05:27:56 -0600 commented question How to use OPENCV 2.4.10 with QTCreator 3.4.1

@theodore i have added a capture

2015-08-05 05:04:54 -0600 asked a question Errors after wrong installation of opencv

Hi , i'm trying to run an example of face detection using opencv , C++ , and QT from here : https://github.com/benhoff/opencv when running make i get the following errors

usr/local/include/opencv2/highgui/highgui.hpp:165:5: note: previous declaration ‘cv::<anonymous enum=""> IMREAD_UNCHANGED’ /usr/local/include/opencv2/imgcodecs.hpp error: redeclaration of ‘IMREAD_GRAYSCALE’ /usr/local/include/opencv2/imgcodecs.hpp error: redeclaration of ‘IMREAD_COLOR’ /usr/local/include/opencv2/imgcodecs.hpp:70:28: error: redeclaration of ‘IMREAD_ANYDEPTH’

...................

there are plenty of them

i think the problem is that i have installed firstly opencv 3.0.0 alpha and i want to change it to opencv 2.4.10 so what i have did is deleting manually all libraries and headers in /usr/local/lib and /usr/local/include (that because i haven't found a tutorial explaining how to properly delete opencv or re-install it) and after that i installed opencv 2.4.10

that's is the source of the error but now how can i solve this ?? solution ;: the code included 2 headers in the same time so i have commented the second line because i have opencv 2.4.10

#include <opencv2/imgproc/imgproc.hpp>  /* for opencv 2.4.10 */
//#include <opencv2/imgcodecs.hpp>       /* for opencv 3.0.0  */

update : here what i get now after make :

here is the error now after make :

faceDetector.cpp: In member function ‘void FaceDetector::process(cv::Mat)’: faceDetector.cpp:76:78: error: no matching function for call to ‘QImage::QImage(const unsigned char*, int&, int&, cv::Mat::MStep&, QImage::Format, void (*)(void*), cv::Mat*)’
                        QImage::Format_RGB888, &matDeleter, new cv::Mat(frame));
                                                                              ^ faceDetector.cpp:76:78: note: candidates are: In file included from /usr/include/qt4/QtGui/QImage:1:0,
                 from faceDetector.h:9,
                 from faceDetector.cpp:1: /usr/include/qt4/QtGui/qimage.h:139:5: note: QImage::QImage(const QImage&)
     QImage(const QImage &);
     ^ /usr/include/qt4/QtGui/qimage.h:139:5: note:   candidate

Any suggestion will be appreciated :)

NB : I'm using ubuntu 14.04 , opencv 2.4.10 , QT 4.8.6

2015-08-05 04:38:11 -0600 commented question Redeclaration issue

so what was the solution ???

2015-08-04 19:04:51 -0600 edited question How to use OPENCV 2.4.10 with QTCreator 3.4.1

HI all, i want to use opencv with qtcreator on ubutnu 14.04 , can you help me to do this .

i have followed this link http://rodrigoberriel.com/2014/11/usi... but i get an error in compilation : cannot find -lopencv_imgcodecs

update : by doing pkg-config --libs opencv i cant find something like /usr/local/lib/libopencv_imgcodecs.so

the output of pkg-config --libs opencv

/usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_ocl.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_superres.so /usr/local/lib/libopencv_ts.a /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videostab.so /usr/local/lib/libopencv_viz.so /usr/lib/x86_64-linux-gnu/libXext.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so -ltbb -lrt -lpthread -lm -ldl

and pkg-config --cflags opencv is

-I/usr/local/include/opencv -I/usr/local/include The source file : image description

The project configuration file --------------------------------------------------------------------- image description

thanks a lot

2015-08-04 09:02:44 -0600 commented question How to use OPENCV 2.4.10 with QTCreator 3.4.1

up up up ...

2015-08-03 16:41:00 -0600 commented question How to use OPENCV 2.4.10 with QTCreator 3.4.1

@theodore ok now i have added the 2 lines and tried by system package => the compilation worked if i don't have some manipulation in opencv like just cv::Mat frame; (the same thing previously mentionned) .... if i add smth like cv::VideoCapture cap(0); or cv::Mat test_image = cv::imread("elarbi.jpg"); or cv::namedWindow("Disp"); i got the same error and the msg The program has crashed (it's the same thing as previously ) => i'm wondering what could be the problem because i don't have any errors in the opencv headers that i have included in the main.cpp ..... thanks

2015-08-03 08:40:36 -0600 commented question How to use OPENCV 2.4.10 with QTCreator 3.4.1

@berak i have deleted the libs and added LIBS += pkg-config opencv --libs to the .pro file project ... now the error disapeared but i get realloc(): invalid pointer if i put any instruction related to opencv