## [Vxl-users] Fast Programming

 [Vxl-users] Fast Programming From: - 2004-03-09 11:30:46 ```Hi all I have a speed question. Isn't it faster to do the declerations out of the loop for example instead of template inline void vil_math_image_abs_difference(const vil_image_view& imA, const vil_image_view& imB, vil_image_view& im_sum) { ....... for (unsigned p=0;p inline void vil_math_image_abs_difference(const vil_image_view& imA, const vil_image_view& imB, vil_image_view& im_sum) { ....... unsigned p, j, i; const aT* rowA, pixelA; const bT* ... for ( p=0;p

 [Vxl-users] Fast Programming From: - 2004-03-09 11:30:46 ```Hi all I have a speed question. Isn't it faster to do the declerations out of the loop for example instead of template inline void vil_math_image_abs_difference(const vil_image_view& imA, const vil_image_view& imB, vil_image_view& im_sum) { ....... for (unsigned p=0;p inline void vil_math_image_abs_difference(const vil_image_view& imA, const vil_image_view& imB, vil_image_view& im_sum) { ....... unsigned p, j, i; const aT* rowA, pixelA; const bT* ... for ( p=0;p
 Re: [Vxl-users] Fast Programming From: Peter Vanroose - 2004-03-09 11:39:28 ```> Isn't it faster to do the declarations out of the loop, for example > instead of > for (unsigned p=0;p { > const aT* rowA = planeA; ... > using following technique: > unsigned p; > const aT* rowA; > for ( p=0;p { > ... Modern C++ compilers should implement both ways identically, certainly when optimisation is on (but probably also without optimisation). I have never tested this, though. -- Peter. ```
 Re: [Vxl-users] Fast Programming From: Amitha Perera - 2004-03-10 15:40:38 ```Moreover, declaring the variable in the innermost possible scope leaves *more* room for optimization, because there are fewer possible aliasing issues. Also, in my opinion, it's easier to understand the code. Of course, these types of optimizations must be made after profiling, not before. (This was certainly the case with vil. The Manchester folks wrote the simple and obvious loop, profiled or timed, and found the current implementation is much faster.) Amitha. ```
 [Vxl-users] New User From: Miguel A Figueroa-Villanneva - 2004-03-11 03:49:57 ```Hello, I'm a PhD student at Michigan State University doing research in the area of computer vision. I have been browsing the code and documentation of VXL and I think it is quite an impressive project. I am pretty much set on using this library and possibly contributing to the effort. My immediate interest is to implement the view morphing technique for two face images. For this I need to estimate the fundamental matrix. By browsing over the doxygen documentation I was able to find the contrib/oxl/mvl, which solves the F matrix estimation problem. I also spotted the contrib/mul/ipts (interest point detector) which might help me to automatically get the correspondences. My questions can be grouped into three parts: 1. I would like to know if these functions are well developed or are they still at an early experimental stage? Also, are there any other packages that I might have overlooked that will help me solve the problem? 2. Is there any interest on your (vxl developers) part for the view morphing functionality to be contributed to vxl? If so, is there any documentation or guidelines on how to do this (i.e. who do I submit code to, and what programming guidelines besides those in the VXL Book should I follow)? 3. Since my application needs to run in real-time, I would like to ask if anybody has any feedback on preformance comparisons of vxl and intel opencv. I think vxl is a more complete package, however, I'm working on a performance critical application. Any objective feedback will be appreciated. Well, I will sincerely appreciate any and all help you can provide me with. Thanks, Miguel --- Miguel A. Figueroa-Villanueva ECE - Michigan State University ************************************************** The one who teaches is the giver of eyes. -- Tamil (Asian Indian) Proverb ************************************************** ```