Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

OpenCV · Open Source Computer Vision Library

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 48149
  • Category: Open Source
  • Founded: Jun 20, 2000
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 82234 - 82263 of 90774   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#82234 From: Alireza Dehghani <dehghanimiau@...>
Date: Fri Jul 29, 2011 12:08 pm
Subject: Stereo camera
samen50
Send Email Send Email
 
Hi everybody

I am new in OpenCV. I want to use it for stereo vision based body tracking. 
I want to know how the type of cameras affects on the stereo camera and calibration.
Should I use a commercial stereo camera, or I can build it by two ordinary webcam?
If so, what sort of parameters should be considered for cameras. I have seen that it should be CCD lens type.
on the other hand, how mush should be the distance between the cameras.

Thanks a lot for your help.
Regards
Alireza

#82235 From: "doylecorp" <doylecorp@...>
Date: Fri Jul 29, 2011 2:53 pm
Subject: Re: How to use the BackgroundSubtractor ??
doylecorp
Send Email Send Email
 
Whoops... where it says pBS, it should be pBSMOG.  I used pBS for the regular
background subtraction that I can't seem to get working.  I've edited it below.


--- In OpenCV@yahoogroups.com, "doylecorp" <doylecorp@...> wrote:
>
> I'm using OpenCV2.3 and basically use the following code to get
BackgroundSubtractorMOG to work:
>
> VideoCapture capture(0);
> if(!capture.isOpened()){
>   return -1;
> }
>
> int key = 0;
> Mat vFrame;
> Mat vFrameMask;
>
> BackgroundSubtractorMOG pBSMOG;
> pBSMOG.getBackgroundImage( vFrameMask );
>
> namedWindow( "Video:", CV_WINDOW_AUTOSIZE );
>
> while( key != 'q' ){
>   capture >> vFrame;
>   key = waitKey( 1 );
>
>   pBSMOG.operator()( vFrame, vFrameMask, -1 );
>   imshow( "Video:", vFrameMask );
> }
>
> pBSMOG.~BackgroundSubtractor();
> destroyWindow( "Video:" );
> capture.release();
>
>
> I haven't found any documentation.  As a matter of fact, I came out here
looking to see how the BackgroundSubtractor without MOG or MOG2 works.  I just
get video and can't seem to do straight up background subtraction.
>
> Hope this helps.
>
>
> --- In OpenCV@yahoogroups.com, "arnaud.grosjean" <arnaud.grosjean@> wrote:
> >
> > Hello I can't find any doc for the the implementation of the
BackgroundSubtractor of the 2.1 release !
> >
> > When doing a simple thing like (considering source is an image from a video)
> >
> > BackgroundSubtractorMOG bgs = BackgroundSubtractorMOG();
> > bgs(source, fgmask);
> >
> >
> > My fgmask do not evolve through time, I mean, the subtractor doesnt seems to
learn whats the background .
> > The first frame which feed the model seems to be taken as a permanent
background.
> >
> > Where could I find some doc ? plz help.
> >
> > Thx.
> >
>

#82236 From: "kishore_rathinavel" <kishore.r.318@...>
Date: Fri Jul 29, 2011 7:41 pm
Subject: Integration of Android and OpenCV2.3.1
kishore_rath...
Send Email Send Email
 
Hi all,

I have an android project which requires some image processing routines. So, I
built a cpp file based on openCV. Now, I want to integrate the 2 projects. And I
come across several challenges for this which are listed below:

1) if I try to mimic the sample projects such as the imagemanipulation
project(by writing out every c code line of my opencv project in its java
equivalent), I get several errors because my project requires the use of vectors
and contours and apparently I cant use it. I dont know why.

I tried to just declare a section of the variables I would need. Here's a part
of the code:

package nd.erwin.ColorimetricAnalysis10;


import org.opencv.*;
import org.opencv.imgproc.*;
import org.opencv.highgui.*;
import org.opencv.core.Point;
import org.opencv.core.Core;


class ImageProcessing{


		 int thresh = 255, N = 11;

		 String wndname = "Square Detection Demo";
		 vector<vector<Point> > squares;
		 vector<vector<Point> > contours;
		 vector<Point> approx;
		 Mat image, newimage, croppedimage;
		 int cosinelimit = 30;
		 int maxLength = 200;

}



2) so, I tried to retain the C file as it is but put it under the jni folder.
But there are a couple of sample projects that use the jni and the dont work at
all. none of the #include commands are working and they give the same error:
"unresolved inclusion". How do I overcome this unresolved inclusion? Also, am I
supposed to build opencv2.3.1 like opencv2.3.0 using the cmake/sh files in order
for the jni to work? am i supposed to do the ndk-build command for the jni files
to work?

#82237 From: "scorp1us" <scorp1us@...>
Date: Sat Jul 30, 2011 8:18 pm
Subject: "Dirty Windshield" algorithm.
scorp1us
Send Email Send Email
 
Hi all, I'm not really sure where to direct this, but I figure this would be a
good place to start.

I am looking for a way to detect a "dirty windshield" (DW) and compensate around
it. Let me explain what I mean by "dirty windshield". The DW is what happens
when there is stationary interference on the image. Imagine having old
translucent bug splatter on the windshield as you travel down the highway. The
image always changes, but the interference does not. After a few video frames,
it should be able to detect areas of the image that are consistently lighter or
darker than the rest of the image. Then we should be able to use that to create
a normalization function and normalize the image. Examples are bug platter,
reflections from camera optics, and now days, intentional overlays to give
texture to the video.

I'd be looking for a way to detect these, show the normalization, and the
normalized image.

They already use something like this in earth-based space observatories, where a
laser is used to sample the light interference from gasses in the observed
column. They then apply that image to create crisper images than just the
photography alone.

As a simple example, consider the 3 samples of a 3-pixel single row image: 121,
232, 343

Here, the normalized image is: 0,-1,0
We then apply the normalization to the frames an get: 111,222,333

Does anything like this exist?
Can this be done in OpenCVI?

Thanks.

#82238 From: "ziad" <shounia_ziad@...>
Date: Sat Jul 30, 2011 11:49 pm
Subject: Hough Transform help
shounia_ziad
Send Email Send Email
 
I took this code and adjusted it a bit.  For some reason the Hough image shows a
black image.  Please help (you may change the source of the image to whatever
you want)


#include "highgui.h"
#include "cv.h"
#include <iostream>

IplImage* doPyrDown(IplImage* in, int filter = IPL_GAUSSIAN_5x5)
{
     // Best to make sure input image is divisible by two.
     //
     assert( in->width%2 == 0 && in->height%2 == 0 );
     IplImage* out = cvCreateImage(cvSize( in->width/2, in->height/2 ),
in->depth, in->nChannels);
     cvPyrDown( in, out );
     return( out );
};


int main()
{
         IplImage* img = cvLoadImage("C:\\Users\\Public\\Pictures\\Sample
Pictures\\Lighthouse.jpg",0);
         IplImage* out = doPyrDown(img, IPL_GAUSSIAN_5x5);
         //IplImage* temp = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
         IplImage* dst = cvCreateImage( cvGetSize(img), IPL_DEPTH_8U, 1 );
         IplImage* color_dst = cvCreateImage( cvGetSize(img), IPL_DEPTH_8U, 3 );
         CvMemStorage* storage = cvCreateMemStorage(0);
         CvSeq* lines = 0;
         int i;
         cvCanny( out, out, 50, 200, 3 );
         cvCvtColor( dst, color_dst, CV_GRAY2BGR );

         lines = cvHoughLines2( dst,
                                storage,
                                CV_HOUGH_STANDARD,
                                1,
                                CV_PI/180,
                                100,
                                0,
                                0 );

         for( i = 0; i < MIN(lines->total,100); i++ )
         {
             float* line = (float*)cvGetSeqElem(lines,i);
             float rho = line[0];
             float theta = line[1];
             CvPoint pt1, pt2;
             double a = cos(theta), b = sin(theta);
             double x0 = a*rho, y0 = b*rho;
             pt1.x = cvRound(x0 + 1000*(-b));
             pt1.y = cvRound(y0 + 1000*(a));
             pt2.x = cvRound(x0 - 1000*(-b));
             pt2.y = cvRound(y0 - 1000*(a));
             cvLine( color_dst, pt1, pt2, CV_RGB(255,0,0), 3, 8 );
         }

         cvNamedWindow( "Source", 1 );
         cvShowImage( "Source", img );

         cvNamedWindow( "Hough", 1 );
         cvShowImage( "Hough", color_dst );

         cvWaitKey(0);

         return 0;
}

#82239 From: Salman Ul Haq <salman@...>
Date: Sun Jul 31, 2011 1:43 pm
Subject: CUVI Lib
m.salmanulhaq
Send Email Send Email
 
Hello guys,

Has anyone tried out CUVI Lib (CUDA Vision and Imaging Library) by TunaCode?

Best,
Salman

#82240 From: "erbstjohn" <erbstjohn@...>
Date: Sun Jul 31, 2011 2:27 pm
Subject: Stereo Calibration, Results
erbstjohn
Send Email Send Email
 
Hello,

I am trying to calibrate 2 Cameras with the sample code from opencv but i am getting bad results:
done with RMS error=35.3496
average reprojection err = 1.60836e+07

The Rectification and Undistort Output are very weird.

Maybe someone else gets useable results?
http://www.file-upload.net/download-3627102/images.tar.gz.html
I would be glad if someone could post a working code dor this images.

Thank You,
 -- john


#82241 From: "Julius Adorf" <jeadorf@...>
Date: Sun Jul 31, 2011 7:46 pm
Subject: Re: how to use the ORB descriptor
jeadorf
Send Email Send Email
 
Hi,

Weird. I did not use LSH directly. There is an experimental package
http://www.ros.org/wiki/tod_detecting which I used together with ORB, in
particularly the file
https://code.ros.org/svn/wg-ros-pkg/branches/trunk_diamondback/stacks/object_rec\
ognition/tod_detecting/src/Matcher.cpp

I am afraid that's all I can tell you right now because I did not
use it directly.

Julius

--- In OpenCV@yahoogroups.com, "kutawei@..." <kutawei@...> wrote:
>
> Hi, Julius. I test the ORB descriptor in opencv2.3 with LSH matcher in ROS you
instructed me. I was confuse that LSH was slower about 5 times than BruteForce
matcher. I want to know how you get the faster result. I used VS2010 so I only
modified the original lsh.cpp a little( __builtin_popcountll -> __popcnt) to
compile. but I don't think it's the reason. was I wrong something? and my test
program are base on the
> opencv example brief_match_test.cpp. I can't get lsh run under debug mode too,
strangely. could you please help me? thank you advance.
> --- In OpenCV@yahoogroups.com, "kutawei@" <kutawei@> wrote:
> >
> > thank you Julius again. I got it.
> >
> > --- In OpenCV@yahoogroups.com, "Julius Adorf" <jeadorf@> wrote:
> > >
> > > The ROS package rbrief is contained in ROS stack
object_recognition_experimental (be warned, the name already tells that
everything therein is very experimental):
> > >
> > >
https://code.ros.org/trac/wg-ros-pkg/browser/branches/trunk_diamondback/stacks/o\
bject_recognition_experimental/rbrief/src/lsh.cpp
> > >
> > > --- In OpenCV@yahoogroups.com, "kutawei@" <kutawei@> wrote:
> > > >
> > > > thank you julius. but I can't find the LSH implement in ROS, i seems
that was delete. if you have the code, can you share it? otherwise, we have to
wait opencv2.3.1 release.
> > > >
> > > > --- In OpenCV@yahoogroups.com, "Julius Adorf" <jeadorf@> wrote:
> > > > >
> > > > >
> > > > >
> > > > > Yeah, LSH will be introduced with OpenCV 2.3.1, according to
http://opencv.willowgarage.com/wiki/OpenCV%20Change%20Logs
> > > > >
> > > > > AFAIK, the LSH implementation will be migrated from the Robot
Operating System package rbrief in the stack object_recognition_experimental
over to OpenCV 2.3.1.
> > > > >
> > > > > Have you checked the development version of OpenCV? Is
> > > > > LSH already included therein?
> > > > >
> > > > > Some of my experiments with ORB and LSH showed that LSH is way faster
(25-50 times in my application) than brute-force matching. I think,  it's worth
a try.
> > > > >
> > > > > Julius
> > > > >
> > > > > --- In OpenCV@yahoogroups.com, "kutawei@" <kutawei@> wrote:
> > > > > >
> > > > > > hi, is there anybody find ways how to use the new ORB descriptor, as
it contain the rotate information, i need an example to see how to match two
images by ORB. another questions is LSH really suitable for BRIEF or ORB match?
i thought the nearest search a problem in hamming space, should i sit and wait
the opencv2.3.1 out?
> > > > > >
> > > > >
> > > >
> > >
> >
>

#82242 From: "bluedevil.knight" <bluedevil.knight@...>
Date: Fri Jul 29, 2011 6:03 pm
Subject: Help installing for idiot?
bluedevil.kn...
Send Email Send Email
 
Is there a page for total idiots to install it on Windows?

I go to the download page:
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3/

There I have two choices (OpenCV-2.3.0-win-superpack.exe versus
OpenCV-2.3.0-win-src.zip). Which one? Well, I know I like executables because it
will install it for me. So I got that, and it unpacks a folder. Then what?

I then install CMake, and enter C:/Program Files/OpenCV2.3/opencv in 'where is
the source code' and some random folder for the binaries. Then I get:
====================
The C compiler identification is unknown
The CXX compiler identification is unknown
Check for working C compiler: bcc32
CMake Error: your C compiler: "bcc32" was not found.   Please set
CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
Check for working C compiler: bcc32 -- broken
CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
   The C compiler "bcc32" is not able to compile a simple test program.
   It fails with the following output:
   CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
   CMakeLists.txt:56 (project)
CMake Error: your C compiler: "bcc32" was not found.   Please set
CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "bcc32" was not found.   Please set
CMAKE_CXX_COMPILER to a valid compiler path or name.
======================

Crap, I thought I had C installed on this computer. Now what?

#82243 From: "Jihed" <j.jihed@...>
Date: Fri Jul 29, 2011 1:22 pm
Subject: A working version of GLCM ??
jihed.joobeur
Send Email Send Email
 
Hi everybody,

I have some problems with GLCM. It doesn't work for me? i found a topic with a
new version proposed but it also doesn't work for me.
Any help :( ?
Thanks.

__
Joobeur.

#82244 From: "Jihed" <j.jihed@...>
Date: Fri Jul 29, 2011 1:19 pm
Subject: Re: An example of CvGLCM (with changed CvTexture)
jihed.joobeur
Send Email Send Email
 
Hi everybody,

I tried Opencv's Glcm and it doesn't work for me. after i found this group i tried the version mentionned above and also it doesn't work for me. 
does any body used Glcm before and have a working version ? 
Thanks a lot ...

Joobeur.

--- In OpenCV@yahoogroups.com, "russell.jing" <russell.jing@...> wrote:
>
> I did the change by this post: http://tech.groups.yahoo.com/group/OpenCV/message/54573
> also changed some other mirror issues about c99 standard.
> Note: For avoiding conflict with opencv CvGLCM, i changed them to Cv_GLCM.
> I upload the source code in the Files system.
> Here, i'd like to post the code again.
>
> The only one header file:
>
> #pragma once
>
> #include "cvaux.h"
>
> #define CV_MAX_NUM_GREY_LEVELS_8U 256
>
>
> struct Cv_GLCM
> {
> int matrixSideLength;
> int numMatrices;
> double*** matrices;
>
> int numLookupTableElements;
> int forwardLookupTable[CV_MAX_NUM_GREY_LEVELS_8U];
> int reverseLookupTable[CV_MAX_NUM_GREY_LEVELS_8U];
>
> double** descriptors;
> int numDescriptors;
> int descriptorOptimizationType;
> int optimizationType;
> };
>
> Cv_GLCM* cv_CreateGLCM( const IplImage* srcImage, int stepMagnitude,
> const int* srcStepDirections,/* should be static array..or if not the user should handle de-allocation */
> int numStepDirections, int optimizationType );
>
> void cv_CreateGLCMDescriptors( Cv_GLCM* destGLCM, int descriptorOptimizationType );
>
> double cv_GetGLCMDescriptor( Cv_GLCM* GLCM, int step, int descriptor );
>
> void cv_GetGLCMDescriptorStatistics( Cv_GLCM* GLCM, int descriptor, double* _average, double* _standardDeviation );
>
>
> IplImage* cv_CreateGLCMImage( Cv_GLCM* GLCM, int step );
>
> static void icv_CreateGLCM_LookupTable_8u_C1R( const uchar* srcImageData, int srcImageStep,
> CvSize srcImageSize, Cv_GLCM* destGLCM,
> int* steps, int numSteps, int* memorySteps );
>
> static void icv_CreateGLCM_LookupTable_8u_C1R( const uchar* srcImageData, int srcImageStep, CvSize srcImageSize,
> Cv_GLCM* destGLCM, int* steps, int numSteps, int* memorySteps );
>
> static void icv_CreateGLCMDescriptors_AllowDoubleNest( Cv_GLCM* destGLCM, int matrixIndex );
>
> void cv_ReleaseGLCM( Cv_GLCM** GLCM, int flag );
>
> The cpp file:
> /****************************************************************************************\
>
> Calculation of a texture descriptors from GLCM (Grey Level Co-occurrence Matrix'es)
> The code was submitted by Daniel Eaton [danieljameseaton@...]
>
> \****************************************************************************************/
>
> //#include "_cvaux.h"
>
> #include "cvGLCM.h"
>
> Cv_GLCM*
> cv_CreateGLCM( const IplImage* srcImage,
> int stepMagnitude,
> const int* srcStepDirections,/* should be static array..
> or if not the user should handle de-allocation */
> int numStepDirections,
> int optimizationType )
> {
> static const int defaultStepDirections[] = { 0,1,-1,1,-1,0,-1,-1 };
>
> int* memorySteps = 0;
> Cv_GLCM* newGLCM = 0;
> int* stepDirections = 0;
>
> CV_FUNCNAME( "cvCreateGLCM" );
>
> __BEGIN__;
>
> uchar* srcImageData = 0;
> CvSize srcImageSize;
> int srcImageStep;
> int stepLoop;
> const int maxNumGreyLevels8u = CV_MAX_NUM_GREY_LEVELS_8U;
>
> if( !srcImage )
> CV_ERROR( CV_StsNullPtr, "" );
>
> if( srcImage->nChannels != 1 )
> CV_ERROR( CV_BadNumChannels, "Number of channels must be 1");
>
> if( srcImage->depth != IPL_DEPTH_8U )
> CV_ERROR( CV_BadDepth, "Depth must be equal IPL_DEPTH_8U");
>
> // no Directions provided, use the default ones - 0 deg, 45, 90, 135
> if( !srcStepDirections )
> {
> srcStepDirections = defaultStepDirections;
> }
>
> //CV_CALL( stepDirections = (int*)cvAlloc( numStepDirections*2*sizeof(stepDirections[0])));
> CV_CALL( stepDirections = new int [numStepDirections*2*sizeof(stepDirections[0])]);
> memcpy( stepDirections, srcStepDirections, numStepDirections*2*sizeof(stepDirections[0]));
>
> cvGetImageRawData( srcImage, &srcImageData, &srcImageStep, &srcImageSize );
>
> // roll together Directions and magnitudes together with knowledge of image (step)
> // CV_CALL( memorySteps = (int*)cvAlloc( numStepDirections*sizeof(memorySteps[0])));
> CV_CALL( memorySteps = new int [ numStepDirections*sizeof(memorySteps[0]) ]);
>
> for( stepLoop = 0; stepLoop < numStepDirections; stepLoop++ )
> {
> stepDirections[stepLoop*2 + 0] *= stepMagnitude;
> stepDirections[stepLoop*2 + 1] *= stepMagnitude;
>
> memorySteps[stepLoop] = stepDirections[stepLoop*2 + 0]*srcImageStep +
> stepDirections[stepLoop*2 + 1];
> }
>
> //CV_CALL( newGLCM = (Cv_GLCM*)cvAlloc(sizeof(newGLCM)));
> CV_CALL( newGLCM = new Cv_GLCM [sizeof(newGLCM)] );
> memset( newGLCM, 0, sizeof(newGLCM) );
>
> newGLCM->matrices = 0;
> newGLCM->numMatrices = numStepDirections;
> newGLCM->optimizationType = optimizationType;
>
> if( optimizationType <= CV_GLCM_OPTIMIZATION_LUT )
> {
> int lookupTableLoop, imageColLoop, imageRowLoop, lineOffset = 0;
>
> // if optimization type is set to lut, then make one for the image
> if( optimizationType == CV_GLCM_OPTIMIZATION_LUT )
> {
> for( imageRowLoop = 0; imageRowLoop < srcImageSize.height;
> imageRowLoop++, lineOffset += srcImageStep )
> {
> for( imageColLoop = 0; imageColLoop < srcImageSize.width; imageColLoop++ )
> {
> newGLCM->forwardLookupTable[srcImageData[lineOffset+imageColLoop]]=1;
> }
> }
>
> newGLCM->numLookupTableElements = 0;
>
> for( lookupTableLoop = 0; lookupTableLoop < maxNumGreyLevels8u; lookupTableLoop++ )
> {
> if( newGLCM->forwardLookupTable[ lookupTableLoop ] != 0 )
> {
> newGLCM->forwardLookupTable[ lookupTableLoop ] =
> newGLCM->numLookupTableElements;
> newGLCM->reverseLookupTable[ newGLCM->numLookupTableElements ] =
> lookupTableLoop;
>
> newGLCM->numLookupTableElements++;
> }
> }
> }
> // otherwise make a "LUT" which contains all the gray-levels (for code-reuse)
> else if( optimizationType == CV_GLCM_OPTIMIZATION_NONE )
> {
> for( lookupTableLoop = 0; lookupTableLoop <maxNumGreyLevels8u; lookupTableLoop++ )
> {
> newGLCM->forwardLookupTable[ lookupTableLoop ] = lookupTableLoop;
> newGLCM->reverseLookupTable[ lookupTableLoop ] = lookupTableLoop;
> }
> newGLCM->numLookupTableElements = maxNumGreyLevels8u;
> }
>
> newGLCM->matrixSideLength = newGLCM->numLookupTableElements;
> icv_CreateGLCM_LookupTable_8u_C1R( srcImageData, srcImageStep, srcImageSize,
> newGLCM, stepDirections,
> numStepDirections, memorySteps );
> }
> else if( optimizationType == CV_GLCM_OPTIMIZATION_HISTOGRAM )
> {
> CV_ERROR( CV_StsBadFlag, "Histogram-based method is not implemented" );
>
> /* newGLCM->numMatrices *= 2;
> newGLCM->matrixSideLength = maxNumGreyLevels8u*2;
>
> icv_CreateGLCM_Histogram_8uC1R( srcImageStep, srcImageSize, srcImageData,
> newGLCM, numStepDirections,
> stepDirections, memorySteps );
> */
> }
>
> __END__;
>
> cvFree( &memorySteps );
> cvFree( &stepDirections );
>
> if( cvGetErrStatus() < 0 )
> {
> cvFree( &newGLCM );
> }
>
> return newGLCM;
> }
>
>
> void
> cv_ReleaseGLCM( Cv_GLCM** GLCM, int flag )
> {
> CV_FUNCNAME( "cvReleaseGLCM" );
>
> __BEGIN__;
>
> int matrixLoop;
>
> if( !GLCM )
> CV_ERROR( CV_StsNullPtr, "" );
>
> if( *GLCM )
> EXIT; // repeated deallocation: just skip it.
>
> if( (flag == CV_GLCM_GLCM || flag == CV_GLCM_ALL) && (*GLCM)->matrices )
> {
> for( matrixLoop = 0; matrixLoop < (*GLCM)->numMatrices; matrixLoop++ )
> {
> if( (*GLCM)->matrices[ matrixLoop ] )
> {
> cvFree( (*GLCM)->matrices[matrixLoop] );
> cvFree( (*GLCM)->matrices + matrixLoop );
> }
> }
>
> cvFree( &((*GLCM)->matrices) );
> }
>
> if( (flag == CV_GLCM_DESC || flag == CV_GLCM_ALL) && (*GLCM)->descriptors )
> {
> for( matrixLoop = 0; matrixLoop < (*GLCM)->numMatrices; matrixLoop++ )
> {
> cvFree( (*GLCM)->descriptors + matrixLoop );
> }
> cvFree( &((*GLCM)->descriptors) );
> }
>
> if( flag == CV_GLCM_ALL )
> {
> cvFree( GLCM );
> }
>
> __END__;
> }
>
>
> static void
> icv_CreateGLCM_LookupTable_8u_C1R( const uchar* srcImageData,
> int srcImageStep,
> CvSize srcImageSize,
> Cv_GLCM* destGLCM,
> int* steps,
> int numSteps,
> int* memorySteps )
> {
> int* stepIncrementsCounter = 0;
>
> CV_FUNCNAME( "icvCreateGLCM_LookupTable_8u_C1R" );
>
> __BEGIN__;
>
> int matrixSideLength = destGLCM->matrixSideLength;
> int stepLoop, sideLoop1, sideLoop2;
> int colLoop, rowLoop, lineOffset = 0;
> double*** matrices = 0;
>
> // allocate memory to the matrices
> //CV_CALL( destGLCM->matrices = (double***)cvAlloc( sizeof(matrices[0])*numSteps ));
> CV_CALL( destGLCM->matrices = new double** [sizeof(matrices[0])*numSteps] );
> matrices = destGLCM->matrices;
>
> for( stepLoop=0; stepLoop<numSteps; stepLoop++ )
> {
> /*CV_CALL( matrices[stepLoop] = (double**)cvAlloc( sizeof(matrices[0])*matrixSideLength ));
> CV_CALL( matrices[stepLoop][0] = (double*)cvAlloc( sizeof(matrices[0][0])*
> matrixSideLength*matrixSideLength ));*/
> CV_CALL( matrices[stepLoop] = new double* [sizeof(matrices[0])*matrixSideLength ]);
> CV_CALL( matrices[stepLoop][0] = new double [ sizeof(matrices[0][0])*matrixSideLength*matrixSideLength ]);
>
> memset( matrices[stepLoop][0], 0, matrixSideLength*matrixSideLength*
> sizeof(matrices[0][0]) );
>
> for( sideLoop1 = 1; sideLoop1 < matrixSideLength; sideLoop1++ )
> {
> matrices[stepLoop][sideLoop1] = matrices[stepLoop][sideLoop1-1] + matrixSideLength;
> }
> }
>
> //CV_CALL( stepIncrementsCounter = (int*)cvAlloc( numSteps*sizeof(stepIncrementsCounter[0])));
> CV_CALL( stepIncrementsCounter = new int [ numSteps*sizeof(stepIncrementsCounter[0])]);
> memset( stepIncrementsCounter, 0, numSteps*sizeof(stepIncrementsCounter[0]) );
>
> // generate GLCM for each step
> for( rowLoop=0; rowLoop<srcImageSize.height; rowLoop++, lineOffset+=srcImageStep )
> {
> for( colLoop=0; colLoop<srcImageSize.width; colLoop++ )
> {
> int pixelValue1 = destGLCM->forwardLookupTable[srcImageData[lineOffset + colLoop]];
>
> for( stepLoop=0; stepLoop<numSteps; stepLoop++ )
> {
> int col2, row2;
> row2 = rowLoop + steps[stepLoop*2 + 0];
> col2 = colLoop + steps[stepLoop*2 + 1];
>
> if( col2>=0 && row2>=0 && col2<srcImageSize.width && row2<srcImageSize.height )
> {
> int memoryStep = memorySteps[ stepLoop ];
> int pixelValue2 = destGLCM->forwardLookupTable[ srcImageData[ lineOffset + colLoop + memoryStep ] ];
>
> // maintain symmetry
> matrices[stepLoop][pixelValue1][pixelValue2] ++;
> matrices[stepLoop][pixelValue2][pixelValue1] ++;
>
> // incremenet counter of total number of increments
> stepIncrementsCounter[stepLoop] += 2;
> }
> }
> }
> }
>
> // normalize matrices. each element is a probability of gray value i,j adjacency in direction/magnitude k
> for( sideLoop1=0; sideLoop1<matrixSideLength; sideLoop1++ )
> {
> for( sideLoop2=0; sideLoop2<matrixSideLength; sideLoop2++ )
> {
> for( stepLoop=0; stepLoop<numSteps; stepLoop++ )
> {
> matrices[stepLoop][sideLoop1][sideLoop2] /= double(stepIncrementsCounter[stepLoop]);
> }
> }
> }
>
> destGLCM->matrices = matrices;
>
> __END__;
>
> cvFree( &stepIncrementsCounter );
>
> if( cvGetErrStatus() < 0 )
> cv_ReleaseGLCM( &destGLCM, CV_GLCM_GLCM );
> }
>
>
> void
> cv_CreateGLCMDescriptors( Cv_GLCM* destGLCM, int descriptorOptimizationType )
> {
> CV_FUNCNAME( "cvCreateGLCMDescriptors" );
>
> __BEGIN__;
>
> int matrixLoop;
>
> if( !destGLCM )
> CV_ERROR( CV_StsNullPtr, "" );
>
> if( !(destGLCM->matrices) )
> CV_ERROR( CV_StsNullPtr, "Matrices are not allocated" );
>
> CV_CALL( cv_ReleaseGLCM( &destGLCM, CV_GLCM_DESC ));
>
> if( destGLCM->optimizationType != CV_GLCM_OPTIMIZATION_HISTOGRAM )
> {
> destGLCM->descriptorOptimizationType = destGLCM->numDescriptors = descriptorOptimizationType;
> }
> else
> {
> CV_ERROR( CV_StsBadFlag, "Histogram-based method is not implemented" );
> // destGLCM->descriptorOptimizationType = destGLCM->numDescriptors = CV_GLCMDESC_OPTIMIZATION_HISTOGRAM;
> }
>
> //CV_CALL( destGLCM->descriptors = (double**)
> //cvAlloc( destGLCM->numMatrices*sizeof(destGLCM->descriptors[0])));
> CV_CALL( destGLCM->descriptors = new double* [destGLCM->numMatrices*sizeof(destGLCM->descriptors[0])]);
>
> for( matrixLoop = 0; matrixLoop < destGLCM->numMatrices; matrixLoop ++ )
> {
> //CV_CALL( destGLCM->descriptors[ matrixLoop ] =
> //(double*)cvAlloc( destGLCM->numDescriptors*sizeof(destGLCM->descriptors[0][0])));
> CV_CALL( destGLCM->descriptors[ matrixLoop ] = new double [destGLCM->numDescriptors*sizeof(destGLCM->descriptors[0][0])]);
> memset( destGLCM->descriptors[matrixLoop], 0, destGLCM->numDescriptors*sizeof(double) );
>
> switch( destGLCM->descriptorOptimizationType )
> {
> case CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST:
> icv_CreateGLCMDescriptors_AllowDoubleNest( destGLCM, matrixLoop );
> break;
> default:
> CV_ERROR( CV_StsBadFlag,
> "descriptorOptimizationType different from CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST\n"
> "is not supported" );
> /*
> case CV_GLCMDESC_OPTIMIZATION_ALLOWTRIPLENEST:
> icvCreateGLCMDescriptors_AllowTripleNest( destGLCM, matrixLoop );
> break;
> case CV_GLCMDESC_OPTIMIZATION_HISTOGRAM:
> if(matrixLoop < destGLCM->numMatrices>>1)
> icvCreateGLCMDescriptors_Histogram( destGLCM, matrixLoop);
> break;
> */
> }
> }
>
> __END__;
>
> if( cvGetErrStatus() < 0 )
> cv_ReleaseGLCM( &destGLCM, CV_GLCM_DESC );
> }
>
>
> static void
> icv_CreateGLCMDescriptors_AllowDoubleNest( Cv_GLCM* destGLCM, int matrixIndex )
> {
> int sideLoop1, sideLoop2;
> int matrixSideLength = destGLCM->matrixSideLength;
>
> double** matrix = destGLCM->matrices[ matrixIndex ];
> double* descriptors = destGLCM->descriptors[ matrixIndex ];
>
> //double* marginalProbability =
> //(double*)cvAlloc( matrixSideLength * sizeof(marginalProbability[0]));
> double* marginalProbability =
> new double [matrixSideLength * sizeof(marginalProbability[0])];
> memset( marginalProbability, 0, matrixSideLength * sizeof(double) );
>
> double maximumProbability = 0;
> double marginalProbabilityEntropy = 0;
> double correlationMean = 0, correlationStdDeviation = 0, correlationProductTerm = 0;
>
> for( sideLoop1=0; sideLoop1<matrixSideLength; sideLoop1++ )
> {
> int actualSideLoop1 = destGLCM->reverseLookupTable[ sideLoop1 ];
>
> for( sideLoop2=0; sideLoop2<matrixSideLength; sideLoop2++ )
> {
> double entryValue = matrix[ sideLoop1 ][ sideLoop2 ];
>
> int actualSideLoop2 = destGLCM->reverseLookupTable[ sideLoop2 ];
> int sideLoopDifference = actualSideLoop1 - actualSideLoop2;
> int sideLoopDifferenceSquared = sideLoopDifference*sideLoopDifference;
>
> marginalProbability[ sideLoop1 ] += entryValue;
> correlationMean += actualSideLoop1*entryValue;
>
> maximumProbability = MAX( maximumProbability, entryValue );
>
> if( actualSideLoop2 > actualSideLoop1 )
> {
> descriptors[ CV_GLCMDESC_CONTRAST ] += sideLoopDifferenceSquared * entryValue;
> }
>
> descriptors[ CV_GLCMDESC_HOMOGENITY ] += entryValue / ( 1.0 + sideLoopDifferenceSquared );
>
> if( entryValue > 0 )
> {
> descriptors[ CV_GLCMDESC_ENTROPY ] += entryValue * log( entryValue );
> }
>
> descriptors[ CV_GLCMDESC_ENERGY ] += entryValue*entryValue;
> }
>
> if( marginalProbability>0 )
> marginalProbabilityEntropy += marginalProbability[ actualSideLoop1 ]*log(marginalProbability[ actualSideLoop1 ]);
> }
>
> marginalProbabilityEntropy = -marginalProbabilityEntropy;
>
> descriptors[ CV_GLCMDESC_CONTRAST ] += descriptors[ CV_GLCMDESC_CONTRAST ];
> descriptors[ CV_GLCMDESC_ENTROPY ] = -descriptors[ CV_GLCMDESC_ENTROPY ];
> descriptors[ CV_GLCMDESC_MAXIMUMPROBABILITY ] = maximumProbability;
>
> double HXY = 0, HXY1 = 0, HXY2 = 0;
>
> HXY = descriptors[ CV_GLCMDESC_ENTROPY ];
>
> for( sideLoop1=0; sideLoop1<matrixSideLength; sideLoop1++ )
> {
> double sideEntryValueSum = 0;
> int actualSideLoop1 = destGLCM->reverseLookupTable[ sideLoop1 ];
>
> for( sideLoop2=0; sideLoop2<matrixSideLength; sideLoop2++ )
> {
> double entryValue = matrix[ sideLoop1 ][ sideLoop2 ];
>
> sideEntryValueSum += entryValue;
>
> int actualSideLoop2 = destGLCM->reverseLookupTable[ sideLoop2 ];
>
> correlationProductTerm += (actualSideLoop1 - correlationMean) * (actualSideLoop2 - correlationMean) * entryValue;
>
> double clusterTerm = actualSideLoop1 + actualSideLoop2 - correlationMean - correlationMean;
>
> descriptors[ CV_GLCMDESC_CLUSTERTENDENCY ] += clusterTerm * clusterTerm * entryValue;
> descriptors[ CV_GLCMDESC_CLUSTERSHADE ] += clusterTerm * clusterTerm * clusterTerm * entryValue;
>
> double HXYValue = marginalProbability[ actualSideLoop1 ] * marginalProbability[ actualSideLoop2 ];
> if( HXYValue>0 )
> {
> double HXYValueLog = log( HXYValue );
> HXY1 += entryValue * HXYValueLog;
> HXY2 += HXYValue * HXYValueLog;
> }
> }
>
> correlationStdDeviation += (actualSideLoop1-correlationMean) * (actualSideLoop1-correlationMean) * sideEntryValueSum;
> }
>
> HXY1 =- HXY1;
> HXY2 =- HXY2;
>
> descriptors[ CV_GLCMDESC_CORRELATIONINFO1 ] = ( HXY - HXY1 ) / ( correlationMean );
> descriptors[ CV_GLCMDESC_CORRELATIONINFO2 ] = sqrt( 1.0 - exp( -2.0 * (HXY2 - HXY ) ) );
>
> correlationStdDeviation = sqrt( correlationStdDeviation );
>
> descriptors[ CV_GLCMDESC_CORRELATION ] = correlationProductTerm / (correlationStdDeviation*correlationStdDeviation );
>
> delete [] marginalProbability;
> }
>
>
> double cv_GetGLCMDescriptor( Cv_GLCM* GLCM, int step, int descriptor )
> {
> double value = DBL_MAX;
>
> CV_FUNCNAME( "cvGetGLCMDescriptor" );
>
> __BEGIN__;
>
> if( !GLCM )
> CV_ERROR( CV_StsNullPtr, "" );
>
> if( !(GLCM->descriptors) )
> CV_ERROR( CV_StsNullPtr, "" );
>
> if( (unsigned)step >= (unsigned)(GLCM->numMatrices))
> CV_ERROR( CV_StsOutOfRange, "step is not in 0 .. GLCM->numMatrices - 1" );
>
> if( (unsigned)descriptor >= (unsigned)(GLCM->numDescriptors))
> CV_ERROR( CV_StsOutOfRange, "descriptor is not in 0 .. GLCM->numDescriptors - 1" );
>
> value = GLCM->descriptors[step][descriptor];
>
> __END__;
>
> return value;
> }
>
>
> void
> cv_GetGLCMDescriptorStatistics( Cv_GLCM* GLCM, int descriptor,
> double* _average, double* _standardDeviation )
> {
> CV_FUNCNAME( "cvGetGLCMDescriptorStatistics" );
>
> if( _average )
> *_average = DBL_MAX;
>
> if( _standardDeviation )
> *_standardDeviation = DBL_MAX;
>
> __BEGIN__;
>
> int matrixLoop, numMatrices;
> double average = 0, squareSum = 0;
>
> if( !GLCM )
> CV_ERROR( CV_StsNullPtr, "" );
>
> if( !(GLCM->descriptors))
> CV_ERROR( CV_StsNullPtr, "Descriptors are not calculated" );
>
> if( (unsigned)descriptor >= (unsigned)(GLCM->numDescriptors) )
> CV_ERROR( CV_StsOutOfRange, "Descriptor index is out of range" );
>
> numMatrices = GLCM->numMatrices;
>
> for( matrixLoop = 0; matrixLoop < numMatrices; matrixLoop++ )
> {
> double temp = GLCM->descriptors[ matrixLoop ][ descriptor ];
> average += temp;
> squareSum += temp*temp;
> }
>
> average /= numMatrices;
>
> if( _average )
> *_average = average;
>
> if( _standardDeviation )
> *_standardDeviation = sqrt( (squareSum - average*average*numMatrices)/(numMatrices-1));
>
> __END__;
> }
>
>
> IplImage*
> cv_CreateGLCMImage( Cv_GLCM* GLCM, int step )
> {
> IplImage* dest = 0;
>
> CV_FUNCNAME( "cvCreateGLCMImage" );
>
> __BEGIN__;
>
> float* destData;
> int sideLoop1, sideLoop2;
>
> if( !GLCM )
> CV_ERROR( CV_StsNullPtr, "" );
>
> if( !(GLCM->matrices) )
> CV_ERROR( CV_StsNullPtr, "Matrices are not allocated" );
>
> if( (unsigned)step >= (unsigned)(GLCM->numMatrices) )
> CV_ERROR( CV_StsOutOfRange, "The step index is out of range" );
>
> dest = cvCreateImage( cvSize( GLCM->matrixSideLength, GLCM->matrixSideLength ), IPL_DEPTH_32F, 1 );
> destData = (float*)(dest->imageData);
>
> for( sideLoop1 = 0; sideLoop1 < GLCM->matrixSideLength;
> sideLoop1++, (float*&)destData += dest->widthStep )
> {
> for( sideLoop2=0; sideLoop2 < GLCM->matrixSideLength; sideLoop2++ )
> {
> double matrixValue = GLCM->matrices[step][sideLoop1][sideLoop2];
> destData[ sideLoop2 ] = (float)matrixValue;
> }
> }
>
> __END__;
>
> if( cvGetErrStatus() < 0 )
> cvReleaseImage( &dest );
>
> return dest;
> }
>
> The main file:
>
> #include "highgui.h"
>
> #include "cvGLCM.h"
> #include <iostream>
>
> using namespace std;
>
> void main()
> {
> IplImage *img = cvLoadImage("test1.jpg",0);
> IplImage *img1 = cvLoadImage("test2.jpg", 0);
> IplImage *img2 = cvLoadImage("test.jpg", 0);
> /*cvSetImageROI(img,cvRect(100,100,100,100));
> cvSetImageROI(img1,cvRect(100,100,100,100));
> cvSetImageROI(img2,cvRect(100,100,100,100));*/
>
> Cv_GLCM *glcm = cv_CreateGLCM(img, 1, NULL, 4, CV_GLCM_OPTIMIZATION_LUT);
> Cv_GLCM *glcm1 = cv_CreateGLCM(img1, 1, NULL, 4, CV_GLCM_OPTIMIZATION_LUT);
> Cv_GLCM *glcm2 = cv_CreateGLCM(img2, 1, NULL, 4, CV_GLCM_OPTIMIZATION_LUT);
>
> // Cv_GLCM *glcm2 = cv_CreateGLCM(img, 1, NULL, 4, CV_GLCM_OPTIMIZATION_HISTOGRAM);
> cv_CreateGLCMDescriptors(glcm, CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST);
> cv_CreateGLCMDescriptors(glcm1, CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST);
> cv_CreateGLCMDescriptors(glcm2, CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST);
>
> double d0 = cv_GetGLCMDescriptor(glcm, 0, CV_GLCMDESC_ENTROPY);
> double d00 = cv_GetGLCMDescriptor(glcm1, 0, CV_GLCMDESC_ENTROPY);
> double d000 = cv_GetGLCMDescriptor(glcm2, 0, CV_GLCMDESC_ENTROPY);
> cout<<"Entropy: "<<d0<<" "<<d00<<" "<<d000<<endl;
>
> double d1 = cv_GetGLCMDescriptor(glcm, 0, CV_GLCMDESC_ENERGY);
> double d11 = cv_GetGLCMDescriptor(glcm1, 0, CV_GLCMDESC_ENERGY);
> double d111 = cv_GetGLCMDescriptor(glcm2, 0, CV_GLCMDESC_ENERGY);
> cout<<"Energy: "<<d1<<" "<<d11<<" "<<d111<<endl;
>
> double d2 = cv_GetGLCMDescriptor(glcm, 0, CV_GLCMDESC_CONTRAST);
> double d22 = cv_GetGLCMDescriptor(glcm1, 0, CV_GLCMDESC_CONTRAST);
> double d222 = cv_GetGLCMDescriptor(glcm2, 0, CV_GLCMDESC_CONTRAST);
> cout<<"Contrast: "<<d2<<" "<<d22<<" "<<d222<<endl;
>
> double d3 = cv_GetGLCMDescriptor(glcm, 0, CV_GLCMDESC_CORRELATION );
> double d33 = cv_GetGLCMDescriptor(glcm1, 0, CV_GLCMDESC_CORRELATION );
> double d333 = cv_GetGLCMDescriptor(glcm2, 0, CV_GLCMDESC_CORRELATION );
> cout<<"Correlation: "<<d3<<" "<<d33<<" "<<d333<<endl;
>
> double d4 = cv_GetGLCMDescriptor(glcm, 0, CV_GLCMDESC_HOMOGENITY );
> double d44 = cv_GetGLCMDescriptor(glcm1, 0, CV_GLCMDESC_HOMOGENITY );
> double d444 = cv_GetGLCMDescriptor(glcm2, 0, CV_GLCMDESC_HOMOGENITY );
> cout<<"Homogenity: "<<d4<<" "<<d44<<" "<<d444<<endl;
>
> double a = 1; double *ave = &a;
> double s = 1; double *sd = &s;
> cv_GetGLCMDescriptorStatistics(glcm, CV_GLCMDESC_ENERGY, ave, sd);
> double a1 = 1; double *ave1 = &a1;
> double s1 = 1; double *sd1 = &s1;
> cv_GetGLCMDescriptorStatistics(glcm1, CV_GLCMDESC_ENERGY, ave1, sd1);
> double a2 = 1; double *ave2 = &a2;
> double s2 = 1; double *sd2 = &s2;
> cv_GetGLCMDescriptorStatistics(glcm2, CV_GLCMDESC_ENERGY, ave2, sd2);
> cout<<"Energy ave: "<<*ave<<" "<<*ave1<<" "<<*ave2<<endl;
> cout<<"Energy sd : "<<*sd<<" " <<*sd1<<" " <<*sd2<<endl;
>
>
> cvNamedWindow("test1");
> cvShowImage("test1",img);
> cvNamedWindow("test2");
> cvShowImage("test2",img1);
> cvNamedWindow("test3");
> cvShowImage("test3",img2);
> cvWaitKey(0);
> }
>
>
>
> //#define CV_GLCM_OPTIMIZATION_NONE -2 //optimizationType
> //#define CV_GLCM_OPTIMIZATION_LUT -1
> //#define CV_GLCM_OPTIMIZATION_HISTOGRAM 0
> //
> //#define CV_GLCMDESC_OPTIMIZATION_ALLOWDOUBLENEST 10 //descriptorOptimizationType
> //#define CV_GLCMDESC_OPTIMIZATION_ALLOWTRIPLENEST 11
> //#define CV_GLCMDESC_OPTIMIZATION_HISTOGRAM 4
> //
> //#define CV_GLCMDESC_ENTROPY 0 //descriptor
> //#define CV_GLCMDESC_ENERGY 1
> //#define CV_GLCMDESC_HOMOGENITY 2
> //#define CV_GLCMDESC_CONTRAST 3
> //#define CV_GLCMDESC_CLUSTERTENDENCY 4
> //#define CV_GLCMDESC_CLUSTERSHADE 5
> //#define CV_GLCMDESC_CORRELATION 6
> //#define CV_GLCMDESC_CORRELATIONINFO1 7
> //#define CV_GLCMDESC_CORRELATIONINFO2 8
> //#define CV_GLCMDESC_MAXIMUMPROBABILITY 9
> //
> //#define CV_GLCM_ALL 0 //release flag
> //#define CV_GLCM_GLCM 1
> //#define CV_GLCM_DESC 2
>

#82245 From: "Jihed" <j.jihed@...>
Date: Fri Jul 29, 2011 1:31 pm
Subject: Re: Texture feature calculation in OpenCV
jihed.joobeur
Send Email Send Email
 
Hi,
GLCM id working for you ? can i have the working version ?
Thanx.


--- In OpenCV@yahoogroups.com, Neal Harvey <neal.harvey@...> wrote:
>
> These Haralick features - are these the Gray-Level Co-Occurrence Matrices
> (GLCM)? If so, as I stated in my previous emails, there is some code in OpenCV
> that is supposed to do this (in "cvaux", in v2.0.0, anyway. I think it is in
> "legacy" in v.2.2.0).
> However, it is broken. I posted some things that I did that seemed to get it
> working.
>
> I compared the results of using this (fixed?) code with what I got from the
GLCM
>
> functionality in Matlab and the results were similar, if not exactly the same.
>
>
>
> Cheers
>
> Harve
>
>
> ________________________________
> From: Dieter <dieter_lorenz@...>
> To: OpenCV@yahoogroups.com
> Sent: Wed, December 22, 2010 5:43:22 AM
> Subject: [OpenCV] Re: Texture feature calculation in OpenCV
>
>
> Hi,
>
> I also did not receive any response so I have implemented a subset of
Haralick's
> features by myself for my application.
>
> One possible implementation is here:
> http://murphylab.web.cmu.edu/publications/boland/boland_node101.html
>
> This version is not optimized for fast calculation but maybe a nice starting
> point for you.
>
> Regards
> Dieter
>
> --- In OpenCV@yahoogroups.com, Neal Harvey <neal.harvey@> wrote:
> >
> > I recently sent several emails on this subject, but got not one response.
> >
> >
> >
> >
> >
> > ________________________________
> > From: caillou.sylvain <caillou.sylvain@>
> > To: OpenCV@yahoogroups.com
> > Sent: Thu, December 16, 2010 11:20:00 AM
> > Subject: [OpenCV] Re: Texture feature calculation in OpenCV
> >
> >
> > Hi there,
> >
> > Same problem for me... Did you get any answer or solution to this problem ?
> >
> > Regards
> >
> > Sylvain
> >
> > --- In OpenCV@yahoogroups.com, "Dieter" <dieter_lorenz@> wrote:
> > >
> > > Hi there,
> > >
> > > I am looking for an implementation of the "classic" texture features which
> >were
> >
> > >published by Haralick et al.
> > >
> > > I am also interested in other region feature calculations (e.g. gray-level
> >run
> >
> > >lengths).
> > >
> > > My aim is to distinguish different areas in an image by classifying the
> >texture
> >
> > >features.
> > >
> > > Regards
> > > Dieter
> > >
> >
>

#82246 From: "kishore_rathinavel" <kishore.r.318@...>
Date: Sun Jul 31, 2011 4:42 am
Subject: How do I use the a .cpp code using opencv functions on an Android project?
kishore_rath...
Send Email Send Email
 
Hi All,

I have an Android project and I need some image processing tools built into it.
So, I have developed a .cpp code using opencv functions. Now, I want to use this
cpp code to do the image processing by passing the image to the cpp functions.

I dont want to use javaCV. I want to retain the cpp code as it is. I want to
know how to include the opencv libraries into my android project as well as the
cpp code i wrote and make it work.

I tried examples in the opencv2.3.1 prebuilt package and none of the JNI based
examples work. If some1 could give me an example project esp the essential parts
like the Android.mk and application.mk files, I would be very grateful.

#82247 From: "kishore_rathinavel" <kishore.r.318@...>
Date: Sun Jul 31, 2011 6:25 am
Subject: Re: JavaCV now works on Android too
kishore_rath...
Send Email Send Email
 
Dear Samuel,

I have attempted to re-write a code i wrote in c++ in javacv for my android
application. I am facing some problem like different function headers or
parameter names. eg. in C++ : we write (assume img to be of CvMat type).
img.rows to get the number of rows but in javaCV we write img.rows() i guess. My
problem is that I am not able to see how the CvMat is defined. And I want to see
how certain objects are defined so that i can exploit their parameters or
functions etc. I notice that javacv's src downloadable from
http://code.google.com/p/javacv/downloads/detail?name=javacv-src-20110705.zip&ca\
n=2&q=
has the option of seeing whats in the objects name.

is there a way by which i can use the javacv's src instead of the jar files?

Thank you.

--- In OpenCV@yahoogroups.com, Samuel Audet <samuel.audet@...> wrote:
>
> Hello all,
>
> Just wanted to let everyone know that I managed to make JNA, OpenCV, and
> JavaCV work on the Android platform. It was actually easier than I first
> thought. Consequently, it is now possible to access all of OpenCV's C
> API directly from Java without coding with any JNI or NDK.
>
> For those interested in a quick test, I also created a sample
> application named FacePreview (facedetect + CameraPreview). To install
> it, you may scan from your device the QR code on this page:
>
> http://code.google.com/p/javacv/downloads/detail?name=facepreview-20101202.apk
> Or click on this link if you are reading this message from an Android
> device:
>      http://javacv.googlecode.com/files/facepreview-20101202.apk
>
> It works fine with Android 2.2 on my HTC Desire, but it may not work on
> all devices.
>
> The source code of the sample
>      http://javacv.googlecode.com/files/facepreview-src-20101202.zip
> also contains the precompiled binaries of OpenCV and JNA.
>
> I hope others also find it useful!
>
> Samuel
>

#82248 From: "kutawei@..." <kutawei@...>
Date: Mon Aug 1, 2011 1:24 am
Subject: Re: how to use the ORB descriptor
kutawei...
Send Email Send Email
 
Hi, Julius. did you just miss my last post? I want to know how you experiment
with the LSH matcher from ROS. thank you. BTW, OpenCV doesn't integrate LSH
until now.

--- In OpenCV@yahoogroups.com, "Julius Adorf" <jeadorf@...> wrote:
>
> You're welcome. Just in case you're observing OpenCV trunk
> you might notify me in this thread as soon as LSH is integrated.
> I'm still interested in it as well.
>
> Julius
>
> --- In OpenCV@yahoogroups.com, "kutawei@" <kutawei@> wrote:
> >
> > thank you Julius again. I got it.
> >
> > --- In OpenCV@yahoogroups.com, "Julius Adorf" <jeadorf@> wrote:
> > >
> > > The ROS package rbrief is contained in ROS stack
object_recognition_experimental (be warned, the name already tells that
everything therein is very experimental):
> > >
> > >
https://code.ros.org/trac/wg-ros-pkg/browser/branches/trunk_diamondback/stacks/o\
bject_recognition_experimental/rbrief/src/lsh.cpp
> > >
> > > --- In OpenCV@yahoogroups.com, "kutawei@" <kutawei@> wrote:
> > > >
> > > > thank you julius. but I can't find the LSH implement in ROS, i seems
that was delete. if you have the code, can you share it? otherwise, we have to
wait opencv2.3.1 release.
> > > >
> > > > --- In OpenCV@yahoogroups.com, "Julius Adorf" <jeadorf@> wrote:
> > > > >
> > > > >
> > > > >
> > > > > Yeah, LSH will be introduced with OpenCV 2.3.1, according to
http://opencv.willowgarage.com/wiki/OpenCV%20Change%20Logs
> > > > >
> > > > > AFAIK, the LSH implementation will be migrated from the Robot
Operating System package rbrief in the stack object_recognition_experimental
over to OpenCV 2.3.1.
> > > > >
> > > > > Have you checked the development version of OpenCV? Is
> > > > > LSH already included therein?
> > > > >
> > > > > Some of my experiments with ORB and LSH showed that LSH is way faster
(25-50 times in my application) than brute-force matching. I think,  it's worth
a try.
> > > > >
> > > > > Julius
> > > > >
> > > > > --- In OpenCV@yahoogroups.com, "kutawei@" <kutawei@> wrote:
> > > > > >
> > > > > > hi, is there anybody find ways how to use the new ORB descriptor, as
it contain the rotate information, i need an example to see how to match two
images by ORB. another questions is LSH really suitable for BRIEF or ORB match?
i thought the nearest search a problem in hamming space, should i sit and wait
the opencv2.3.1 out?
> > > > > >
> > > > >
> > > >
> > >
> >
>

#82249 From: "Zzokaei" <z68bella8@...>
Date: Sat Jul 30, 2011 5:07 am
Subject: new idea
z68bella8
Send Email Send Email
 
My undergraduate final project topic is estimation of  position of the brush on
the LCD screen using a camera
Can someone give me an idea or solution?
I do this using Opencv
I am a beginner
thanks...

#82250 From: "doylecorp" <doylecorp@...>
Date: Fri Jul 29, 2011 2:50 pm
Subject: Re: How to use the BackgroundSubtractor ??
doylecorp
Send Email Send Email
 
Whoops... where it says pBS, it should be pBSMOG.  I used pBS for the regular
background subtraction that I can't seem to get working.  I've edited it below.


--- In OpenCV@yahoogroups.com, "doylecorp" <doylecorp@...> wrote:
>
> I'm using OpenCV2.3 and basically use the following code to get
BackgroundSubtractorMOG to work:
>
> VideoCapture capture(0);
> if(!capture.isOpened()){
>   return -1;
> }
>
> int key = 0;
> Mat vFrame;
> Mat vFrameMask;
>
> BackgroundSubtractorMOG pBSMOG;
> pBSMOG.getBackgroundImage( vFrameMask );
>
> namedWindow( "Video:", CV_WINDOW_AUTOSIZE );
>
> while( key != 'q' ){
>   capture >> vFrame;
>   key = waitKey( 1 );
>
>   pBSMOG.operator()( vFrame, vFrameMask, -1 );
>   imshow( "Video:", vFrameMask );
> }
>
> pBSMOG.~BackgroundSubtractor();
> destroyWindow( "Video:" );
> capture.release();
>
>
> I haven't found any documentation.  As a matter of fact, I came out here
looking to see how the BackgroundSubtractor without MOG or MOG2 works.  I just
get video and can't seem to do straight up background subtraction.
>
> Hope this helps.
>
>
> --- In OpenCV@yahoogroups.com, "arnaud.grosjean" <arnaud.grosjean@> wrote:
> >
> > Hello I can't find any doc for the the implementation of the
BackgroundSubtractor of the 2.1 release !
> >
> > When doing a simple thing like (considering source is an image from a video)
> >
> > BackgroundSubtractorMOG bgs = BackgroundSubtractorMOG();
> > bgs(source, fgmask);
> >
> >
> > My fgmask do not evolve through time, I mean, the subtractor doesnt seems to
learn whats the background .
> > The first frame which feed the model seems to be taken as a permanent
background.
> >
> > Where could I find some doc ? plz help.
> >
> > Thx.
> >
>

#82251 From: "Imi Ooseven" <imiooseven@...>
Date: Sun Jul 31, 2011 2:43 pm
Subject: Re: Install help with OpenCV-2.3.0-win-superpack
imiooseven...
Send Email Send Email
 
I found a solution to run my first application, based on this tutorial:

http://redkiing.wordpress.com/2010/10/03/opencv-and-visual-studio-2010-with-cmak\
e/

#82252 From: Jonathan Lenoff <Jonathan@...>
Date: Sat Jul 30, 2011 9:15 pm
Subject: Re: Re: Glad to join...General Questions
lookatmyvv
Send Email Send Email
 
Thanks I'll check that out, I'll let you know how it goes.

#82253 From: "boyfollowtutor" <boyfollowtutor@...>
Date: Mon Aug 1, 2011 6:53 am
Subject: Re: SVM train_auto classification method question
boyfollowtutor
Send Email Send Email
 
--- In OpenCV@yahoogroups.com, "hibchan8355" <chanbessie@...> wrote:
>
> Hi!
>
> I was wondering if anyone knew during the auto-train method, whether cvSVM
uses the [1 vs 1] or [1 vs all] classification method for multiple classes. Or
is it neither?
>
> Thanks!
>
have you solve the question ?

#82254 From: "Diego Andrade" <diegofandrade@...>
Date: Fri Jul 29, 2011 3:44 pm
Subject: Unhandled exception using cv::Mat
diegofandrade
Send Email Send Email
 
// Armisael.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include "cv.h"
#include "highgui.h"
#include "marker.h"

using namespace std;
using namespace cv;

int main( int argc, char** argv )
{

     IplImage* src;

//MarkerDetector MDetector;
vector<Point2f> detectedMarkers;
Mat camMatrix;
float MarkerSize=-1;

//  


    // the first command line parameter must be file name of binary
    // (black-n-white) image
    if( argc == 2 && (src=cvLoadImage(argv[1], 0))!= 0)
    {
        IplImage* dst = cvCreateImage( cvGetSize(src), 8, 3 );
        CvMemStorage* storage = cvCreateMemStorage(0);
        CvSeq* contour = 0;

        cvThreshold( src, src, 1, 255, CV_THRESH_BINARY );
        cvNamedWindow( "Source", 1 );
        cvShowImage( "Source", src );


vector<Point2f> MarkerCanditates;
detectedMarkers.clear();

cv::Mat InImage=cv::imread(argv[1]);
cv::Mat grey;
///Do threshold the image and detect contours
cv::cvtColor(InImage,grey,CV_BGR2GRAY);
//thresHold(_thresMethod,grey,thres);


cvNamedWindow( "Image", 1 );

}

cvWaitKey(0);
//Clean up
//cvReleaseImage(&src);
//cvDestroyWindow("Source");
//cvDestroyWindow("In");
        //cvWaitKey(0);
return(0);
}


Hello everyone my first post here I am having some problems initializing this 


cv::Mat InImage=cv::imread(argv[1]);
cv::Mat grey;

the error says: Unhandled exception at 0x715565af in Armisael.exe: 0xC0000005: Access violation reading location 0x67706a2e. 

I don't know why.. if any can help me please thank you!

#82255 From: Shervin Emami <shervin.emami@...>
Date: Sun Jul 31, 2011 3:25 am
Subject: Re: Re: Just getting started here-blank gray screen when I try to get input from webcam
emami_s
Send Email Send Email
 
When you create the camera capture device using OpenCV, instead of passing it 0 (which means the 1st camera it finds), try passing 1 or 2 or -1 to see if it starts working.

Cheers,
Shervin Emami.
http://www.shervinemami.info/openCV.html


On Thu, Jul 28, 2011 at 6:05 PM, mohsen <mohebbi.7610@...> wrote:
 


Hello
I have a problem like this. I can not improve that.
My system has a inside webcam(laptop) and a usb webcam, so when I use this code, just the led of inside webcam is turned on and show a gray screen.
I use opencv2.2 and VS2010for programming.
I read about a list of camera that opencv supports them. but when I run executable opencv2.1 samples, they work with my inside webcam and show captured picture.
WHERE IS MY MISTAKE?
Please Help to solve it.
Thanks a lot


--- In OpenCV@yahoogroups.com, "winchesterhill" <youaremyjunkmail@...> wrote:
>
> Small correction to my last post. When I said, "1 accesses the HP webcam, and 2 and 3 access the external while also making the webcam's software load up", what actually happens is that the external webcam is accessed but the HP webcam's software runs, which is odd, but also irrelevant.
>
> --- In OpenCV@yahoogroups.com, "winchesterhill" <youaremyjunkmail@> wrote:
> >
> > Thank you! I can sleep easy tonight without the gnawing feeling of an unresolved programming issue. Installing OpenCV 2.1 and reconfiguring Visual Studio did indeed do the trick and all systems are go!
> >
> > In case anyone is in a similar situation as I was here, my external webcam (a Microsoft LifeCam vx-5000) is recognized as 0 or -1 in the function cvCreateCameraCapture() when plugged into either of the two USB ports that I tested it with. Also, my HP webcam, which appears in the Device Manager as "HP Webcam", works as 0 or -1 when my external webcam was unplugged. With my external webcam plugged in, -1 and 0 access the external cam, 1 accesses the HP webcam, and 2 and 3 access the external while also making the webcam's software load up. I didn't go above 3.
> >
> > --- In OpenCV@yahoogroups.com, Shervin Emami <shervin.emami@> wrote:
> > >
> > > The code is correct so it should work. But make sure it isn't giving you any
> > > error messages when it starts running. If not, then maybe you have some
> > > wierd incompatibility with your camera driver and OpenCV, but that is rare
> > > for Windows. You could try an older version of OpenCV such as OpenCV 2.1,
> > > since 2.2 seems to be sort of in alpha or beta stage still.
> > >
> > > Another thing you could add to the code is this line, just before
> > > cvShowImage(), to see if it says anything and if sothen what it says:
> > >
> > > if (frame)
> > > printf("Size of camera frame: %d x %d pixels.\n", frame->width,
> > > frame->height);
> > >
> > >
> > > Cheers,
> > > Shervin Emami.
> > > http://www.shervinemami.co.cc/openCV.html
> > >
> > >
> > > On Tue, Jan 4, 2011 at 1:59 PM, winchesterhill <youaremyjunkmail@
> > > > wrote:
> > >
> > > >
> > > >
> > > > I've installed OpenCV and am running some of the sample codes that I've
> > > > found online and in O'Reilly's OpenCV book.
> > > >
> > > > I've successfully been able to load a single image and play a video but I'm
> > > > having trouble getting input from my webcam. I've tried the following code
> > > > with my laptop's internal webcam and a USB webcam with identical results.
> > > > When mywindow loads all it shows is a gray screen.
> > > >
> > > > #include "stdafx.h"
> > > > #include "cv.h"
> > > > #include "highgui.h"
> > > > #include <stdio.h>
> > > > #include <cvaux.h>
> > > >
> > > > int main() {
> > > > CvCapture* capture = cvCaptureFromCAM( 0 );
> > > > if( !capture ) {
> > > > fprintf( stderr, "ERROR: capture is NULL \n" );
> > > > getchar();
> > > > return -1;
> > > > }
> > > > cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
> > > > while( 1 ) {
> > > > IplImage* frame = cvQueryFrame( capture );
> > > > if( !frame ) {
> > > > fprintf( stderr, "ERROR: frame is null...\n" );
> > > > getchar();
> > > > break;
> > > > }
> > > > cvShowImage( "mywindow", frame );
> > > > if( (cvWaitKey(10) & 255) == 27 )
> > > > break;
> > > > }
> > > > cvReleaseCapture( &capture );
> > > > cvDestroyWindow( "mywindow" );
> > > > return 0;
> > > > }
> > > >
> > > > I've tried a few of the suggestions I've read online such as adding
> > > > cvWaitKey(some int) before cvShowImage( "mywindow", frame ) but that didn't
> > > > work. I also tried values from -1 to 15 for cvCaptureFromCAM(some int). Does
> > > > anyone have anymore suggestions as to what the problem might be? Like I said
> > > > in the subject, I'm just getting started using OpenCV so perhaps there's
> > > > something obvious I'm missing but I've been trying to solve this problem for
> > > > two days and it's bugging me.
> > > >
> > > > I'm running Vista on an HP laptop, OpenCV2.2 with Microsoft Visual C++ 2010
> > > > Express.
> > > > Thanks
> > > >
> > > >
> > > >
> > >
> >
>



#82256 From: Renan Mendes <renanmzmendes@...>
Date: Sat Jul 30, 2011 3:46 am
Subject: Re: cannot open file "opencv_core230d.lib
renanmzmendes87
Send Email Send Email
 
This file is in build/lib/. You have to include this folder when configuring your project so your IDE will know where to look for it.

On 30 July 2011 11:41, Long <longmai_89@...> wrote:
 

hello everyone!
i built code opencv2.3 in vs2010
but there is a error: cannot open file "opencv_core230d.lib"
also i cannot find this file in folder "...build/bin"
please help me



#82257 From: Shervin Emami <shervin.emami@...>
Date: Sun Jul 31, 2011 3:37 am
Subject: Re: Re : Adaptive Appearance Model
emami_s
Send Email Send Email
 
The AAM demos definitely don't use Haar detectors for each facial feature, since Haar is not too reliable at detecting eyes or nose or mouth. But from what I understood, they use Haar for approximate face detection to initialize AAM, then AAM or ASM is used for detecting or tracking the smaller features accurately, because Haar is good for finding the face and then AAM is good for finding the eyes & nose & mouth.

Cheers,
Shervin Emami.
http://www.shervinemami.info/openCV.html


On Fri, Jul 29, 2011 at 3:51 AM, christian.dompierre <christian.dompierre@...> wrote:
 

Really?! They find the iris, nostrils, mouth corners, etc. with Haar? How can it be so precise?

Thanks,
Christian



--- In OpenCV@yahoogroups.com, Franco Amato <cvfrank@...> wrote:
>
> Hi,
> AAM is used for motion tracking. The first detection is still performed
> using Haar.
> Regards,
> Franco
>
> 2011/7/25 Christian Dompierre <christian.dompierre@...>
>
> > **

> >
> >
> >
> > Hi Shervin,
> >
> > Are you telling me that all those nice demos of applications using AAM that
> > I have seen all use Haar detectors to find the features (like the pupils,
> > the mouth corners, the nostrils, etc.)? I'm surprised. How precise are Haar
> > detectors? They didn't seem really precise to me when I tested them. But I
> > saw some videos of impressively precise feature tracking online, especially
> > when I searched for AAM. I'm a little confused, can you clarify or give me
> > some easy to understand reference? I don't know how AAM works, but I'm
> > curious. The problem is that, as I said before, I don't have the time to try
> > to understand AAM perfectly, but I am definitely interested in learning more
> > on how it works.
> >
> > Thanks again,
> >
> > Christian
> >
> >
> >
> >
> > ------------------------------
> > *De :* Shervin Emami <shervin.emami@...>
> > *Ŕ :* OpenCV@yahoogroups.com

> > *Envoyé le :* Mardi 12 Juillet 2011 19h38
> > *Objet :* Re: Re : [OpenCV] Adaptive Appearance Model
> >
> >
> > Hi Christian,
> >
> > I don't know if AAM is what you need because I'm not entirely sure what you
> > are looking for, but AAM is currently considered one of the best techniques.
> > The fact that it is cutting-edge means you can't expect to easily find free
> > libraries and free help to use it well without understanding how it works
> > and spending a lot of time customizing it. The Haar face detector in OpenCV
> > is considered fairly amazing for its speed and simplicity, hence why it is
> > used by so many researchers and companies (despite the patent on it). So if
> > you need much better results than the Haar detector and you need it to run
> > fairly realtime then you will probably need to spend a lot of time (ie:
> > months) looking & testing before you find something adequate, and be aware
> > that a lot of techniques (including AAM) often use the same Haar detector as
> > a base for finding the face.
> >
> > Cheers,
> > Shervin Emami.
> > http://www.shervinemami.info/openCV.html
> >
> >
> > On Wed, Jul 13, 2011 at 2:34 AM, Christian Dompierre <
> > christian.dompierre@...> wrote:
> >
> > **
> >
> > Hi Shervin,
> >
> > Thanks for your reply. So I guess that you think that I am looking for the
> > right thing? You think AAM is what I need? Indeed I found those libraries
> > before I asked for help. Unfortunately none of them is ready to run on a
> > mac. I am trying to build #3), the face tracker (which is no longer in
> > development BTW) but so far I have no luck. I cannot use Stegmann's code of
> > #2) since it's for windows only, but if I don't get what I want from the
> > face tracker, then I guess I'll give a try to the other library #1).
> >
> > Anyone else has some hint/code to share?
> >
> > Thanks a lot!
> >
> > Christian
> >
> > ------------------------------
> > *De :* Shervin Emami <shervin.emami@...>
> > *Ŕ :* "OpenCV@yahoogroups.com" <OpenCV@yahoogroups.com>

> > *Envoyé le :* Lundi 11 Juillet 2011 10h13
> > *Objet :* [OpenCV] Haar features, template matching, SIFT and now Adaptive
> > Appearance Model...
> >
> > Hi Christian,
> >
> > There are actually 2 different libraries freely available for AAM, so
> > you could give it a try:
> >
> > 1) http://www.isbe.man.ac.uk/~bim/software/am_tools_doc/index.html
> >
> > 2) http://www2.imm.dtu.dk/~aam/
> >
> > 3) A face tracker using AAM: http://code.google.com/p/aam-opencv/
> >
> > AAM can be used for a lot of things, but it is quite complicated so
> > don'T expect easy results.
> >
> > Cheers,
> > Shervin Emami
> > http://www.shervinemami.info/openCV.html
> >
> >
> > On Monday, July 11, 2011, christian.dompierre
> > <christian.dompierre@...> wrote:
> > >
> > >
> > >
> > >
> > > Hi all,
> > >
> > > First, please forgive my ignorance as I'm quite a newbie in the field. As
> > a matter of fact, I am far from being a computer vision specialist, neither
> > am I a student doing a master degree project nor anything close to that. I
> > am just an enthusiast with a little personal project who did some research
> > online and ended up installing OpenCV and trying out some stuff. BTW, this
> > library is pretty amazing!
> > >
> > > OK so now, here's my goal. All I want to do is to build a program that
> > would take 2 different pictures (of a face) as an input and wrap them in
> > order to align them precisely. The faces have pretty much the same pose, but
> > the overall pictures might be quite different with respect to quality,
> > resolution, lighting, position of the camera relative to the subject,
> > orientation of the camera relative to the subject, etc. (In one picture, we
> > might see only the head while on the other we could see the upper body too)
> > But as I said, the faces have pretty much the same pose on the 2 pictures.
> > >
> > > Now, as I said, I have no experience so I researched, read and tried some
> > stuff. I started by testing out (and modifying) the code of the "facedetect"
> > example (I use OpenCV version 2.2). I was really impressed at first and had
> > a great time playing with it, but I quickly realized that this Haar cascade
> > technique is definitely not precise enough for my needs.
> > >
> > > So I did more research and I ended up trying some simple template
> > matching. I thought I could do template matching to find the position of the
> > pupils and the corner of the mouth or something like that and then do some
> > wrapping. But then I realized that I had a major problem: this technique is
> > not scale invariant nor rotation invariant.
> > >
> > > So, obviously, I did more research and then I found this crazy SIFT
> > algorithm. Man, this is serious stuff! The idea is really great (not that I
> > can say that I understand every details, but I think I got the general
> > idea). I found a guy who implemented SIFT with openCV. I tried to compile
> > his stuff, got some trouble, but in the end, I managed to make it work on my
> > mac. I was excited but... as you probably expect, it didn't really suit my
> > needs.
> > >
> > > Now I started to be a little desperate and I was thinking about giving
> > up, but I don't know, I am too passionate for that I guess. So I did more
> > research and suddenly, I stumbled upon some video on youtube of people
> > showing off what they did with adaptive appearance model. WOW! This stuff is
> > really impressive! It seems so precise, it is scale AND rotation invariant
> > and it even gives you an estimate of the pose of the head! Seems perfect!
> > >
> > > So, I went back to google and looked furiously for some aam open source
> > code (using OpenCV if possible, but I don't mind using something else if
> > need be). Deception. I found nothing. I mean, I found a couple things, but
> > nothing I can use. And I seriously think I did a pretty intensive research.
> > >
> > > Now, here are my questions (finally!):
> > >
> > > 1) Do you guys think I am off the track with aam?
> > > 2) If so, does anyone has a better suggestion?
> > > 3) Is there any open source code somewhere I can grab and play with?
> > >
> > > I know I said it at the beginning, but I repeat just in case: I am not
> > doing any work/study related to computer vision and I am doing this in my
> > spare time only. So please be nice and don't tell me to read this PhD thesis
> > or this and that article or things like that. I am interested in the field,
> > yes, but I don't have a lot of time and I don't plan to become a specialist.
> > I just want to do a small personal project.
> > >
> > > Thanks a million to anyone who will help, I really appreciate!
> > >
> > > Christian
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> >
> > Cheers,
> > Shervin Emami.
> > http://www.shervinemami.info/openCV.html
> >
> >
> > ------------------------------------
> >
> > Change settings: http://www.yahoogroups.com/mygroups, select
> > Get Emails (get all posts)
> > Daily Digest (one summary email per day)
> > Read on the web (read posts on the web only)Or Unsubscribe by mailing
> > OpenCV-unsubscribe@yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>



#82258 From: Sam Muscroft <sam.muscroft@...>
Date: Mon Aug 1, 2011 11:31 am
Subject: Re: Re: SVM train_auto classification method question
sam.muscroft@...
Send Email Send Email
 
The train_auto function will accept the same CvSVMParams  as the train function.

From the documentation:

This function works for the case of classification (
params.svm_type=CvSVM::C_SVC or params.svm_type=CvSVM::NU_SVC ) as
well as for the regression ( params.svm_type=CvSVM::EPS_SVR or
params.svm_type=CvSVM::NU_SVR ). If params.svm_type=CvSVM::ONE_CLASS ,
no optimization is made and the usual SVM with specified in params
parameters is executed.

---

The difference is that the chosen parameters defined in CvSVMParams
are automatically optimised.

http://opencv.willowgarage.com/documentation/cpp/support_vector_machines.html


On Mon, Aug 1, 2011 at 7:53 AM, boyfollowtutor <boyfollowtutor@...> wrote:
>
>
>
> --- In OpenCV@yahoogroups.com, "hibchan8355" <chanbessie@...> wrote:
> >
> > Hi!
> >
> > I was wondering if anyone knew during the auto-train method, whether cvSVM
uses the [1 vs 1] or [1 vs all] classification method for multiple classes. Or
is it neither?
> >
> > Thanks!
> >
> have you solve the question ?
>
>

#82259 From: Sam Muscroft <sam.muscroft@...>
Date: Mon Aug 1, 2011 11:51 am
Subject: Re: Unhandled exception using cv::Mat
sam.muscroft@...
Send Email Send Email
 
Check the access permissions of the file you are trying to read and
check that the path you are passing in is correct. Test the code by
trying to open an image from within the same directory as the .exe.

#82260 From: Robert Jobbagy <robert.jobbagy@...>
Date: Mon Aug 1, 2011 12:25 pm
Subject: Re: Motion Detection at NIght
robert.jobbagy
Send Email Send Email
 
What can I do if I have just a simple ip camera ? 

Robert


From: Franco Amato <cvfrank@...>
To: OpenCV@yahoogroups.com
Sent: Saturday, July 30, 2011 8:03 PM
Subject: Re: [OpenCV] Motion Detection at NIght

 
Visible light filter and IR illumination.
Best Regards,
Franco

2011/7/30 Robert Jobbagy <robert.jobbagy@...>
 
Hi Guys,

I have already motion detection algorithm and it works at sunlight, but sometimes it detect light change like motion.
I think I fix it with histogram equalization.
But what can I do that it works fine at Night?

do you have any idea ? 

Thanks,

Robert




#82261 From: "cnn" <cnnlakshmen_2000@...>
Date: Mon Aug 1, 2011 5:41 pm
Subject: Problem when compiling a code
cnnlakshmen_...
Send Email Send Email
 
I have added all the libraries and all the neccessary stuff but still i have
this error.

Error: The program can't start because cxcore210.dll is missing from your
computer. Try reinstalling the program to fix this problem.

But i have already included the file in my SYSTEM_ROOT directory. How to solve
this error? does any one know? would appreciate any help...

#82262 From: "cnn" <cnnlakshmen_2000@...>
Date: Mon Aug 1, 2011 6:57 pm
Subject: Re: Problem when compiling a code
cnnlakshmen_...
Send Email Send Email
 
Moreover, i get this errors as well..

'Testcv.exe': Loaded 'C:\Users\User\Documents\Visual Studio
2010\Projects\Testcv\Debug\Testcv.exe', Symbols loaded.
'Testcv.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the
PDB file
'Testcv.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the
PDB file
'Testcv.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open
the PDB file
The program '[10272] Testcv.exe: Native' has exited with code -1073741515
(0xc0000135).
--- In OpenCV@yahoogroups.com, "cnn" <cnnlakshmen_2000@...> wrote:
>
> I have added all the libraries and all the neccessary stuff but still i have
this error.
>
> Error: The program can't start because cxcore210.dll is missing from your
computer. Try reinstalling the program to fix this problem.
>
> But i have already included the file in my SYSTEM_ROOT directory. How to solve
this error? does any one know? would appreciate any help...
>

#82263 From: "nghiaho12" <nghiaho12@...>
Date: Tue Aug 2, 2011 1:19 am
Subject: Re: Help installing for idiot?
nghiaho12
Send Email Send Email
 
bcc sounds like Borland compiler. You probably want to use Microsoft Visual
Studio, assuming you have it installed, else download the express version from
their website.

--- In OpenCV@yahoogroups.com, "bluedevil.knight" <bluedevil.knight@...> wrote:
>
> Is there a page for total idiots to install it on Windows?
>
> I go to the download page:
> http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.3/
>
> There I have two choices (OpenCV-2.3.0-win-superpack.exe versus
> OpenCV-2.3.0-win-src.zip). Which one? Well, I know I like executables because
it will install it for me. So I got that, and it unpacks a folder. Then what?
>
> I then install CMake, and enter C:/Program Files/OpenCV2.3/opencv in 'where is
the source code' and some random folder for the binaries. Then I get:
> ====================
> The C compiler identification is unknown
> The CXX compiler identification is unknown
> Check for working C compiler: bcc32
> CMake Error: your C compiler: "bcc32" was not found.   Please set
CMAKE_C_COMPILER to a valid compiler path or name.
> CMake Error: Internal CMake error, TryCompile configure of cmake failed
> Check for working C compiler: bcc32 -- broken
> CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
>   The C compiler "bcc32" is not able to compile a simple test program.
>   It fails with the following output:
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:56 (project)
> CMake Error: your C compiler: "bcc32" was not found.   Please set
CMAKE_C_COMPILER to a valid compiler path or name.
> CMake Error: your CXX compiler: "bcc32" was not found.   Please set
CMAKE_CXX_COMPILER to a valid compiler path or name.
> ======================
>
> Crap, I thought I had C installed on this computer. Now what?
>

Messages 82234 - 82263 of 90774   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help