Ask Your Question

stackprogramer's profile - activity

2015-08-13 10:31:14 -0600 answered a question Could not find OpenCV Sample - face-detection.apk! (not build opencv sample for Android)

i imported only face detection sample,after i imported opencv4android directory ,and i do these work ,it worked correctly;

1)i downloaded OpenCV-2.4.9-android-sdk;

2)c/c++ build i setted ${NDKROOT}/ndk-build

3)i set NDKROOT system varrible;

4)goto Preference → Android → NDK and i choosed my ndk location

4)c/c++ build >ToolChain Editor i seted current builder =android builder

5)i too installed opencv manager

6)i installed CDT plugin

2015-08-11 00:33:51 -0600 commented question Could not find OpenCV Sample - face-detection.apk! (not build opencv sample for Android)

i may have renamed the project, and the eclipse forgot to rename the "Refresh Policy".

Just update "Project properties -> C/C++ Build -> Refresh Policy" manually solved my problem.

but it have previous errors?

description Resource Path Location Type * Android NDK: Aborting. . Stop. OpenCV Sample - face-detection line 155, external location: K:\android-ndk-r10b\build\core\build-local.mk C/C++ Problem

2015-08-11 00:28:25 -0600 commented question Could not find OpenCV Sample - face-detection.apk! (not build opencv sample for Android)

after this i setted Project Properties>C/C++ Build

(uncheck) use default build command
Build command: ndk-build
(uncheck) generate Makefiles automatically

now it has these errors

Description Resource Path Location Type * Android NDK: Aborting. . Stop. OpenCV Sample - face-detection line 155, external location: K:\android-ndk-r10b\build\core\build-local.mk C/C++ Problem

2015-08-11 00:19:00 -0600 commented question Could not find OpenCV Sample - face-detection.apk! (not build opencv sample for Android)

after this problem i went to Project Properties>C/C++ Build>Tool Chain Editor and i setted Current toolchain: Android GCC Current builder: Android Builder now we have this errors
Errors running builder 'CDT Builder' on project 'OpenCV Sample - face-detection'.

2015-08-10 09:36:28 -0600 asked a question Could not find OpenCV Sample - face-detection.apk! (not build opencv sample for Android)

hi my friends,i use opencv library for android,i run other sample opencv successfully but for Sample - face-detection this have a message "Could not find OpenCV Sample - face-detection.apk! "; i seted opencv in eclipse according below:

1)i downloaded OpenCV-2.4.9-android-sdk;

2)c/c++ build i setted ${NDKROOT}/ndk-build

3)i set NDKROOT system varrible;

4)goto Preference → Android → NDK and i choosed my ndk location

4)c/c++ build >ToolChain Editor i seted current builder =android builder

5)i too installed opencv manager

6)i installed CDT plugin

please help me

2015-07-27 05:09:00 -0600 commented question when i use pre-built opencv i can use all full advanced technology in it??

finally i succeed,i first for PDB errors tools>option>debugging>outputwindow>moduleloadmessage >off and then i tools>option>debugging>symbols>microsoft symbols server not checked and then i chnge capture.open( -1 ); to capture.open( 0 ); now by seting in opencv itworks,thanks very much

2015-07-27 05:08:19 -0600 commented question error in runing source face detection in opencv 2.4.9 and vs 2012

finally i succeed,i first for PDB errors tools>option>debugging>outputwindow>moduleloadmessage >off and then i tools>option>debugging>symbols>microsoft symbols server not checked and then i chnge capture.open( -1 ); to capture.open( 0 ); now by seting in opencv itworks,thanks very much

2015-07-27 05:06:08 -0600 commented answer why the source code face detection that find from doc opencv dose'nt show any thing

finally i succeed,i first for PDB errors tools>option>debugging>outputwindow>moduleloadmessage >off and then i tools>option>debugging>symbols>microsoft symbols server not checked and then i chnge capture.open( -1 ); to capture.open( 0 ); now by seting in opencv itworks,thanks very much

2015-07-27 04:06:43 -0600 commented question error in runing source face detection in opencv 2.4.9 and vs 2012

it in opnencv 3,but this is in opencv2.4.9

2015-07-27 03:54:09 -0600 asked a question error in runing source face detection in opencv 2.4.9 and vs 2012

i use pre-build opencv 2.4.9 i test the image show in opencv 2.4.9 it works,but for this source its have error?! if this errors is that i use pre-build opencv?what to do what not to do copy the xml file in current folder and my hardware corei5,Radeon ATI graphic

#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/ml.h>

void doMosaic(IplImage* in, int x, int y,
              int width, int height, int size);

int main (int argc, char **argv)
    {
    int i, c;
    IplImage *src_img = 0, *src_gray = 0;
    const char *cascade_name = "haarcascade_frontalface_alt.xml";
    CvHaarClassifierCascade *cascade = 0;
    CvMemStorage *storage = 0;
    CvSeq *faces;

    cascade = (CvHaarClassifierCascade *) cvLoad (cascade_name, 0, 0, 0);
    cvNamedWindow ("Capture", CV_WINDOW_AUTOSIZE);
    CvCapture *capture = cvCreateCameraCapture(0);
    assert(capture != NULL);

    while (1) {
        src_img = cvQueryFrame (capture);
        src_gray = cvCreateImage (cvGetSize(src_img), IPL_DEPTH_8U, 1);

        storage = cvCreateMemStorage (0);
        cvClearMemStorage (storage);
        cvCvtColor (src_img, src_gray, CV_BGR2GRAY);
        cvEqualizeHist (src_gray, src_gray);

        faces = cvHaarDetectObjects (src_gray, cascade, storage,
            1.11, 4, 0, cvSize (40, 40));
        for (i = 0; i < (faces ? faces->total : 0); i++) {
            CvRect *r = (CvRect *) cvGetSeqElem (faces, i);
            doMosaic(src_img, r->x, r->y, r->width, r->height, 20);
            }

        cvShowImage("Capture", src_img);
        cvReleaseImage(&src_gray);

        c = cvWaitKey (2);
        if (c == '\x1b')
            break;
        }

    cvReleaseCapture (&capture);
    cvDestroyWindow ("Capture");

    return 0;
    }

void doMosaic(IplImage* in, int x0, int y0,
              int width, int height, int size)
    {
    int b, g, r, col, row;

    int xMin = size*(int)floor((double)x0/size);
    int yMin = size*(int)floor((double)y0/size);
    int xMax = size*(int)ceil((double)(x0+width)/size);
    int yMax = size*(int)ceil((double)(y0+height)/size);

    for(int y=yMin; y<yMax; y+=size){
        for(int x=xMin; x<xMax; x+=size){
            b = g = r = 0;
            for(int i=0; i<size; i++){
                if( y+i > in->height ){
                    break;
                    }
                row = i;
                for(int j=0; j<size; j++){
                    if( x+j > in->width ){
                        break;
                        }
                    b += (unsigned char)in->imageData[in->widthStep*(y+i)+(x+j)*3];
                    g += (unsigned char)in->imageData[in->widthStep*(y+i)+(x+j)*3+1];
                    r += (unsigned char)in->imageData[in->widthStep*(y+i)+(x+j)*3+2];
                    col = j;
                    }
                }
            row++;
            col++;
            for(int i=0;i<row;i++){
                for(int j=0;j<col;j++){
                    in->imageData[in->widthStep*(y+i)+(x+j)*3]   = cvRound((double)b/(row*col));
                    in->imageData[in->widthStep*(y+i)+(x+j)*3+1] = cvRound((double)g/(row*col));
                    in->imageData[in->widthStep*(y+i)+(x+j)*3+2] = cvRound((double)r/(row*col));
                    }
                }
            }
        }
    }

the error is a break in microsoft ,please help me.thanks very much

First-chance exception at 0x75C4B727 in opencv.exe: Microsoft C++ exception: cv::Exception at memory location 0x003CF678.

If there is a handler for this exception, the program may be safely continued.
2015-07-27 00:16:42 -0600 received badge  Enthusiast
2015-07-26 09:40:48 -0600 answered a question why the source code face detection that find from doc opencv dose'nt show any thing

by set microsft symbol serveor warning solved but yet my webcam dont work!!!

i created new ask,for that this problem is related pre-built but answers this is not related to prebuilt link text

i am sure set opencv in vs2012 correctly why dont work?

finally i succeed,i first for PDB errors tools>option>debugging>outputwindow>moduleloadmessage >off and then i tools>option>debugging>symbols>microsoft symbols server not checked and then i chnge capture.open( -1 ); to capture.open( 0 ); now by seting in opencv itworks,thanks very much stackprogramer (just now)edit

2015-07-26 09:33:35 -0600 commented question when i use pre-built opencv i can use all full advanced technology in it??

i asked this before please go to this my question

http://answers.opencv.org/question/66...

thanks very much

2015-07-26 09:26:30 -0600 commented question when i use pre-built opencv i can use all full advanced technology in it??

your talk means that my program that use object detection by classifer adaboost alogorithm and use webcam should work?

2015-07-26 09:02:16 -0600 commented question why the source code face detection that find from doc opencv dose'nt show any thing

now i see in open cv docs

Note

To use the OpenCV library you have two options: Installation by Using the Pre-built Libraries or Installation by Making Your Own Libraries from the Source Files. While the first one is easier to complete, it only works if you are coding with the latest Microsoft Visual Studio IDE and doesn’t take advantage of the most advanced technologies we integrate into our library.

i guees that i should not use pre-build opencv i should use making opencv thanks very much my friend

2015-07-26 09:00:26 -0600 commented question why the source code face detection that find from doc opencv dose'nt show any thing

i use pre-built opencv and my program not have any error but it dosn't work! it warning cant find PDB file,its for debugging and not influence in execution program. for not have this warning i go tools>options>debugger>checked microsoft symbol server warning now not have but it dosent work?!

2015-07-26 08:54:59 -0600 asked a question when i use pre-built opencv i can use all full advanced technology in it??

hi to my dear friend,in docs opencv write that

Note To use the OpenCV library you have two options: Installation by Using the Pre-built Libraries or Installation by Making Your Own Libraries from the Source Files. While the first one is easier to complete, it only works if you are coding with the latest Microsoft Visual Studio IDE and doesn’t take advantage of the most advanced technologies we integrate into our library.

whats means most advanced technology in the quotation?

my question is in pre-built method i use full of ability opencv or i should use making opencv myself????? for example i use pre-built but the object recognition in webcam don't work???

please guided me ,thanks very much

2015-07-23 13:03:43 -0600 commented question why the source code face detection that find from doc opencv dose'nt show any thing

yes,same problem i examine configure vs 2012 tomorrow ,and i add comment result;thanks for replay

2015-07-23 12:08:07 -0600 commented question why the source code face detection that find from doc opencv dose'nt show any thing

thanks for replay,i test the image show open cv sample in s2012 it worked but this source not work

2015-07-23 10:51:03 -0600 commented question why the source code face detection that find from doc opencv dose'nt show any thing

yes,my laptop have webcam,i change it,the console opened and not closed,i test for show image i show image with opencv,but for this source have errors,this source is test in linux on opencv doc,but for win is not work,thanks for reply and attention to my question

2015-07-23 10:40:05 -0600 received badge  Editor (source)
2015-07-23 10:31:57 -0600 commented question why the source code face detection that find from doc opencv dose'nt show any thing

thanks very much,yes,debuger is in line

if ( ! capture.isOpened() ) { printf("--(!)Error opening video capture\n"); return -1; }

stop

i use full path,th message video source window opened when i applayed it closed! the picture i added question see please

2015-07-23 09:33:26 -0600 commented question why the source code face detection that find from doc opencv dose'nt show any thing

thanks for replay,but i configured the .xml file in the path project,

2015-07-23 08:11:46 -0600 asked a question why the source code face detection that find from doc opencv dose'nt show any thing

hi my code here (according of docs opencv)

#include "opencv2/objdetect.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
using namespace std;
using namespace cv;
/* Function Headers */
void detectAndDisplay( Mat frame );
/* Global variables */
String face_cascade_name = "haarcascade_frontalface_alt.xml";
String eyes_cascade_name = "haarcascade_eye_tree_eyeglasses.xml";
CascadeClassifier face_cascade;
CascadeClassifier eyes_cascade;
String window_name = "Capture - Face detection";
/* @function main */
int main( void )
    {
    VideoCapture capture;
    Mat frame;
    //-- 1. Load the cascades
    if( !face_cascade.load( face_cascade_name ) ){ printf("--(!)Error loading face cascade\n"); return -1; };
    if( !eyes_cascade.load( eyes_cascade_name ) ){ printf("--(!)Error loading eyes cascade\n"); return -1; };
    //-- 2. Read the video stream
    capture.open( -1 );
    if ( ! capture.isOpened() ) { printf("--(!)Error opening video capture\n"); return -1; }
    while (  capture.read(frame) )
        {
        if( frame.empty() )
            {
            printf(" --(!) No captured frame -- Break!");
            break;
            }
        //-- 3. Apply the classifier to the frame
        detectAndDisplay( frame );
        int c = waitKey(10);
        if( (char)c == 27 ) { break; } // escape
        }
    return 0;
    }
/* @function detectAndDisplay */
void detectAndDisplay( Mat frame )
    {
    std::vector<Rect> faces;
    Mat frame_gray;
    cvtColor( frame, frame_gray, COLOR_BGR2GRAY );
    equalizeHist( frame_gray, frame_gray );
    //-- Detect faces
    face_cascade.detectMultiScale( frame_gray, faces, 1.1, 2, 0|CASCADE_SCALE_IMAGE, Size(30, 30) );
    for( size_t i = 0; i < faces.size(); i++ )
        {
        Point center( faces[i].x + faces[i].width/2, faces[i].y + faces[i].height/2 );
        ellipse( frame, center, Size( faces[i].width/2, faces[i].height/2), 0, 0, 360, Scalar( 255, 0, 255 ), 4, 8, 0 );
        Mat faceROI = frame_gray( faces[i] );
        std::vector<Rect> eyes;
        //-- In each face, detect eyes
        eyes_cascade.detectMultiScale( faceROI, eyes, 1.1, 2, 0 |CASCADE_SCALE_IMAGE, Size(30, 30) );
        for( size_t j = 0; j < eyes.size(); j++ )
            {
            Point eye_center( faces[i].x + eyes[j].x + eyes[j].width/2, faces[i].y + eyes[j].y + eyes[j].height/2 );
            int radius = cvRound( (eyes[j].width + eyes[j].height)*0.25 );
            circle( frame, eye_center, radius, Scalar( 255, 0, 0 ), 4, 8, 0 );
            }
        }
    //-- Show what you got
    }

when i debug and run it no have errors and warning but a console show and close output vs 2012 show

'opencv.exe' (Win32): Loaded 'F:\Users\ROOT\Documents\Visual Studio 2012\Projects\opencv3\Release\opencv.exe'. Symbols loaded.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'K:\opencv\build\x86\vc12\bin\opencv_world300.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'opencv.exe' (Win32): Loaded 'F:\Windows\SysWOW64 ...
(more)