OpenCV any Users on List?

2010-05-21 Thread Bruce Labitt
It has been suggested to me to look into OpenCV for some matrix math 
capabilities.  Anyone use it?

Can it handle double precision complex numbers?  From reading the 
documentation, it leads me to think it could, if one defines the matrix 
as double precision 2 channel.  OpenCV appears to require a good C++ 
background, which I don't have now.  Is it ugly to use?  Do I want to go 
there?

Any advice?  (Besides drowning myself now?)
-Bruce


___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: OpenCV any Users on List?

2010-05-21 Thread Benjamin Scott
On Fri, May 21, 2010 at 6:37 PM, Bruce Labitt
bruce.lab...@myfairpoint.net wrote:
 OpenCV appears to require a good C++ background,
 which I don't have now. ... Any advice?

  Tell your employer you need some C++ training in order to do your
job effectively.

  Or if you're afraid they'll terminate you and hire someone else,
seek learning on your own time and dime.

-- Ben
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: Shot in the dark: Anyone ever use CLAPACK routines?

2010-05-21 Thread Bruce Labitt
bruce.lab...@autoliv.com wrote:
 gnhlug-discuss-boun...@mail.gnhlug.org wrote on 05/19/2010 02:34:19 PM:
 snip a ton o' stuff
   
 Comment on my own post.  Probably nothing is wrong with MY CODE. 

 http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2t=745

 The claim is that zgesvd_ function hangs.  The fix is allegedly to 
 
 modify
   
 the make.inc file for CLAPACK. 

 The change is adding -ffloat-store to the end of NOOPT.
 NOOPT = -O0 -I$(TOPDIR)/INCLUDE -fPIC -ffloat-store

 Hope that fixes it.  I'll find out in 4+ hours!

 -Bruce

 

 Of course it didn't work :(   Sounded too good to be true, and it was!
 I did find out that Scipy.linalg.svd used LAPACK not CLAPACK. 

 In [4]: source( svd )
 In file: /usr/lib/python2.6/dist-packages/scipy/linalg/decomp.py

 def svd(a,full_matrices=1,compute_uv=1,overwrite_a=0):

 snip
 
 # A hack until full_matrices == 0 support is fixed here.
 if full_matrices == 0:
 import numpy.linalg
 return numpy.linalg.svd(a, full_matrices=0, compute_uv=compute_uv)
 a1 = asarray_chkfinite(a)
 if len(a1.shape) != 2:
 raise ValueError, 'expected matrix'
 m,n = a1.shape
 overwrite_a = overwrite_a or (_datanotshared(a1,a))
 gesdd, = get_lapack_funcs(('gesdd',),(a1,))
 if gesdd.module_name[:7] == 'flapack':
 lwork = calc_lwork.gesdd(gesdd.prefix,m,n,compute_uv)[1]
 u,s,v,info = gesdd(a1,compute_uv = compute_uv, lwork = lwork,
   overwrite_a = overwrite_a)
 else: # 'clapack'
 raise NotImplementedError,'calling gesdd from %s' % 
 (gesdd.module_name)
 if info0: raise LinAlgError, SVD did not converge
 if info0: raise ValueError,\
'illegal value in %-th argument of internal gesdd'%(-info)
 if compute_uv:
 return u,s,v
 else:
 return s

 Hmm... I wonder if CLAPACK have been rigorously tested, like (f)LAPACK 
 has...  I guess that scipy/numpy did not think so... 
 arggghh...

 Accckk, time to get more familiar with valgrind...  Nuts, I thought 
 this was all going to be straight forward...  Give me python any day!

 -Bruce

   
Not too much to report.  I even re-compiled ATLAS  LAPACK allowing gcc 
 gfortran and got my example code to build.  Same problem with the 9x9 
matrix.  The 2x2 double complex matrix svd worked! 

I do have to say the interface to LAPACK is much better than CLAPACK.  
(C or C++ calling FORTRAN)  I can go back to my old (bad) habits of 
using bits of C++ to help make the code easier to follow.

In numpy/scipy the code computed the svd with no problem.

Not too much activity at the lapack-forum.  :(  Since the academic term 
ended recently at UT Knoxville, maybe everyone is on vacation...

-Bruce
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: OpenCV any Users on List?

2010-05-21 Thread Michael ODonnell


bruce.lab...@myfairpoint.net wrote:
 OpenCV appears to require a good C++ background,
 which I don't have now. ... Any advice?

 Tell your employer you need some C++ training in order to do your
 job effectively.

 Or if you're afraid they'll terminate you and hire someone else,
 seek learning on your own time and dime.

Let me stress that the only familiarity I have with OpenCV is what
I gained just now when I spent approx three minutes glancing at this:

   http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/index.html

...but based on that exhaustive analysis and on your postings on this
channel I'd have to say that you should charge boldly forward because
OpenCV does not seem like a very challenging or esoteric example of C++.
It looks to me like the hardest part of OpenCV would be the matrix math
concepts (independent of programming language) and if you're comfortable
with that then OpenCV would mostly feel like plain old C to you.
 
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: OpenCV any Users on List?

2010-05-21 Thread Bruce Labitt
Benjamin Scott wrote:
 On Fri, May 21, 2010 at 6:37 PM, Bruce Labitt
 bruce.lab...@myfairpoint.net wrote:
   
 OpenCV appears to require a good C++ background,
 which I don't have now. ... Any advice?
 

   Tell your employer you need some C++ training in order to do your
 job effectively.

   Or if you're afraid they'll terminate you and hire someone else,
 seek learning on your own time and dime.

 -- Ben

   
It isn't like I can do NO C++, I did write an FFT server running on a 
QS22 with OpenMP (multi-core threads) FFTW and communicated via 
sockets.  I wrote that in C++ creating a sockets/com class, and a 
command processor/sequencer, class, etc. 

However, I don't think in C++.  Training wouldn't hurt!  (I don't know 
where the time would come from, but it seems everyone has that 
problem.)  Oh, and a lot of practice.  I don't know about you, but the 
only way things actually get into my cortex matter, is practice, 
practice, practice, in that order.

As for hiring someone else, I've begged my management to get me some 
help here.  Surprising to some, I actually know a few things :)  
However, being a hotshot C++ programmer is not one of those things yet.  
I'm working on it, groaning a lot though  Sorry to subject you to it...

Umm, so, do you know anything about OpenCV?  Good? Bad?  Easy to use?  
Stinks for insert x ?

-Bruce


___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: OpenCV any Users on List?

2010-05-21 Thread Bruce Labitt
Michael ODonnell wrote:
   
 bruce.lab...@myfairpoint.net wrote:
 
 OpenCV appears to require a good C++ background,
 which I don't have now. ... Any advice?
   
 Tell your employer you need some C++ training in order to do your
 job effectively.

 Or if you're afraid they'll terminate you and hire someone else,
 seek learning on your own time and dime.
 

 Let me stress that the only familiarity I have with OpenCV is what
 I gained just now when I spent approx three minutes glancing at this:

http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/index.html

 ...but based on that exhaustive analysis and on your postings on this
 channel I'd have to say that you should charge boldly forward because
 OpenCV does not seem like a very challenging or esoteric example of C++.
 It looks to me like the hardest part of OpenCV would be the matrix math
 concepts (independent of programming language) and if you're comfortable
 with that then OpenCV would mostly feel like plain old C to you.
  
 ___
 gnhlug-discuss mailing list
 gnhlug-discuss@mail.gnhlug.org
 http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


   
Yes, that is the extent of my analysis to date also :)  Same website.  
I'd like to know the under pinnings of the OpenCV matrix math routines.  
I strongly suspect it is just ATLAS/BLAS and LAPACK, the same blasted 
packages that I have not been able to figure out on my own!  It 
irritates the heck out of me!!!  Especially when others have apparently 
figured it out.

The matrix math is not hard for me now (you should have asked me 2 
months ago, I hadn't looked at that stuff in over 20, umm, no, 30 
years!).  It appears that OpenCV could work.  But, it looked like 
CLAPACK was the answer to my dreams too.

I'm wary of undertaking the OpenCV learning curve, and finding a dead 
end.  (But if one does the same thing one always does, then nothing will 
change...)  So I guess I'm off on another adventure.  I'm so close to 
getting this stuff off the ground, I can almost taste it. 

I can only hope the taste of 'victory' will be sweet enough to erase the 
memory of the stench of the trenches.

-Bruce
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/