Ask Your Question

Thomas_N's profile - activity

2015-07-31 03:37:14 -0600 received badge  Famous Question (source)
2014-09-29 06:22:28 -0600 received badge  Taxonomist
2014-05-11 04:05:29 -0600 received badge  Notable Question (source)
2013-10-31 09:58:57 -0600 received badge  Popular Question (source)
2013-02-03 18:17:53 -0600 received badge  Nice Question (source)
2012-12-25 10:00:23 -0600 asked a question OpenCV and tesseract

Dear All, My project is OCR implementation and I use both OpenCV and tesseract in iOS. My OpenCV version is 2.4.3 and tesseract version is 3.02. The problem is when I set C++ Standard Library to libc++(LLVM C++ standard library), all tesseract library files problem in compilation with armv7 as Undefined symbols for architecture armv7: "std::string::data() const", referenced from:

When I set the C++ Standard Library to Compiler Default (as suggested by some users), OpenCV has problem as

Undefined symbols for architecture armv7: "std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&)", referenced from: My both OpenCV and tesseract are built and compatible with armv6,7 and 7s. My tesseract is built as discussed in http://lois.di-qual.net/blog/compile-tesseract-for-ios-sdk-6-0/ What should i do? Thanks

2012-09-24 21:04:04 -0600 received badge  Editor (source)
2012-09-24 21:02:44 -0600 asked a question OpenCV face detection in iPhone

Dear All,

I implement OpenCV face detection in iPhone 4. When I look at the time taken for the implementation of the function

face_cascade->detectMultiScale(*grayMat, faces, haar_scale,
                                   haar_minNeighbors, haar_flags, haar_minSize );

It takes nearly 120msec. I can't tolerate that amount of time for my application. How can I improve the performance to reduce the processing time? My configurations are:

float haar_scale = 1.15;  
int haar_minNeighbors = 3;  
int haar_flags = 0 | CV_HAAR_SCALE_IMAGE | CV_HAAR_DO_CANNY_PRUNING;  
cv::Size haar_minSize = cvSize(60, 60);

Thanks.
Thomas

2012-09-23 03:46:40 -0600 answered a question image data processing in cv::Mat

HI ALL. Thanks for the suggestions. But according to this tutorial http://docs.opencv.org/trunk/doc/tutorials/ios/video_processing/video_processing.html#opencviosvideoprocessing If I set self.videoCamera.grayscale = NO; data output will be 32 bit BGRA. So i still need to skip 1 byte data. Thanks

2012-09-22 20:02:47 -0600 commented answer image data processing in cv::Mat

thanks that is what I am looking for

2012-09-22 12:24:15 -0600 asked a question image data processing in cv::Mat

Dear All, i have image info in Z matrix, say cv:Mat Z;

If i use x, y index to access the data in the unsigned char data matrix inside Z, how can I access the green channel data value only for that particular x, y index. I like to implement most efficient way in terms of processing speed. Thanks, Thomas

2012-09-22 02:13:05 -0600 asked a question CvVideoCamera, exposure time and white balance

Dear All, I use CvVideoCamera to capture video at iPhone. I like to lock exposure time and white balance. How can i do that? Thanks thomas

2012-09-22 01:46:28 -0600 received badge  Student (source)
2012-09-21 23:17:59 -0600 asked a question iOS semantic build issue (CV_CAP_IOS undeclared)

Dear All,
I am learning face detection from the following link: http://code.opencv.org/svn/gsoc2012/ios/trunk/shared/ . When I build the project, CvCaptureController.mm has a symbol named CV_CAP_IOS and compiler can't find. The error is "Use of undeclared identifier CV_CAP_IOS". I can't find the symbol anywhere.

How can I solve the problem?

2012-09-21 18:43:01 -0600 answered a question Image size reduction

Yes it does.Thanks

2012-09-21 13:32:09 -0600 asked a question Face detection in Objective C

Dear All,
I am trying to implement face detection at iPhone.
But I don't know why I always get faces.size() is 0 at the following code.
Can I get help?

#ifdef __cplusplus   
- (void)processImage:(Mat&)grayMat  
{  
    //Mat image_copy;  
    cv::vector<cv::Rect> faces;  
    cv::Size newSize = cvSize(0, 0);  
    Mat small_image;  
    cv::resize(grayMat, small_image, newSize, 0.5,0.5, INTER_LINEAR);  
    float haar_scale = 1.2f;  
    int haar_minNeighbors = 3;  
    int haar_flags = CV_HAAR_DO_CANNY_PRUNING;//CV_HAAR_SCALE_IMAGE;  
    cv::Size haar_minSize = cvSize(20, 20);  
    face_cascade->detectMultiScale(small_image, faces, haar_scale,
                                   haar_minNeighbors, haar_flags, haar_minSize );  
    for( int i = 0; i < faces.size(); i++ ) {  

    }
}
#endif
2012-09-21 12:51:03 -0600 asked a question Image size reduction

Dear all,
My input image is in Mat matrix format I like to reduce the image size, then i implement as in the following way. But it does not work at cvPyrDown(img, small_image, CV_GAUSSIAN_5x5);
The program does not crush, but some how the program does not run beyond that line and showing "signal SIGABRT" Any reason?
- (void)processImage:(Mat&)grayMat
{
IplImage* img = new IplImage(grayMat);
int scale = 2;
IplImage *small_image = cvCreateImage(cvSize(img->width/scale, img->height/scale),IPL_DEPTH_8U, 3);
cvPyrDown(img, small_image, CV_GAUSSIAN_5x5);
}
Thanks,
Thomas

2012-09-21 11:51:08 -0600 asked a question Reducing the cv::Mat size

If i use the image, the image size can be reduced as follow

int scale = 2;  
IplImage *small_image = cvCreateImage(cvSize(image->width/scale,image->height/2), IPL_DEPTH_8U, 3);  
cvPyrDown(image, small_image, CV_GAUSSIAN_5x5);

But now my image data is in cv::Mat matrix. How can I reduce the matrix size to have the same effect as in the above discussion?

2012-09-21 09:03:27 -0600 answered a question Can't detect face testing in iPhone

Sorry my code is not easy to understand

(void)processImage:(Mat&)grayMat; {

// Do some OpenCV stuff with the image Mat image_copy;

std::vector<cv::rect> faces;

cvtColor( grayMat, image_copy, CV_BGR2GRAY );

equalizeHist( image_copy, image_copy );

// invert image float haar_scale = 1.2;//1.15;

int haar_minNeighbors = 2;

int haar_flags = CV_HAAR_SCALE_IMAGE;//| CV_HAAR_DO_CANNY_PRUNING;

cv::Size haar_minSize = cvSize(60, 60);

face_cascade->detectMultiScale(image_copy, faces, haar_scale, haar_minNeighbors, haar_flags, haar_minSize );

for( int i = 0; i < faces.size(); i++ ) {

cv::Point center( faces[i].x + faces[i].width0.5, faces[i].y + faces[i].height0.5 );

cv::ellipse( image_copy, center, cv::Size( faces[i].width0.5, faces[i].height0.5), 0, 0, 360, cv::Scalar( 255, 0, 255 ), 4, 8, 0 );

} }

2012-09-21 05:32:26 -0600 asked a question Can't detect face testing in iPhone

Dear All, I am trying face detection for iphone application. My code is as follow. But I can never detect face, faces.size() is always 0. What could be the problem?

  • (void)processImage:(Mat&)grayMat; { // Do some OpenCV stuff with the image Mat image_copy; std::vector<cv::rect> faces; cvtColor( grayMat, image_copy, CV_BGR2GRAY ); equalizeHist( image_copy, image_copy ); // invert image float haar_scale = 1.2;//1.15; int haar_minNeighbors = 2; int haar_flags = CV_HAAR_SCALE_IMAGE;//| CV_HAAR_DO_CANNY_PRUNING; cv::Size haar_minSize = cvSize(60, 60);

    face_cascade->detectMultiScale(image_copy, faces, haar_scale, haar_minNeighbors, haar_flags, haar_minSize );

    for( int i = 0; i < faces.size(); i++ ) { cv::Point center( faces[i].x + faces[i].width0.5, faces[i].y + faces[i].height0.5 ); cv::ellipse( image_copy, center, cv::Size( faces[i].width0.5, faces[i].height0.5), 0, 0, 360, cv::Scalar( 255, 0, 255 ), 4, 8, 0 ); } }