Commit Graph

5782 Commits

Author SHA1 Message Date
Alex Leontiev
6c9ae1100b Fixed the warnings
Fixed the code so to eliminate warnings related to shadowing and unused
parameters. In some settings, these warnings may be treated as an errors
and lead to failed build.

Suggested by Nikita Manovich.
2013-07-11 12:29:55 +03:00
Alex Leontiev
fe6a7e935d Fix qualifiers on aux functions for solveLP()
Change qualifiers on auxiliary functions (for solveLP() procedure) from
const (that does not have much sense) to static (that makes them
invisible for outside world and hopefully exacerbates optimization).
2013-07-11 09:52:13 +03:00
Alex Leontiev
ba537a95db Preparation for pull request
Additional cleaning for simplex method, removing the parts that are
currently unused. Removing developer's notes. Trying to reach production
level.
2013-07-11 09:31:10 +03:00
Alex Leontiev
a95650111f Cleaning the code of simplex method
In particular, the following things are done:
*) Consistent tabulation of 4 spaces is ensured
*) New function dprintf() is introduced, so now printing of the debug
information can be turned on/off via the ALEX_DEBUG macro
*) Removed solveLP_aux namespace
*) All auxiliary functions are declared as static
*) The return codes of solveLP() are encapsulated in enum.
2013-07-10 20:11:52 +03:00
Alex Leontiev
a4a5e98cc0 Non-optimized simplex algorithm.
This version is supposed to work on all problems (please, let me know if
this is not so), but is not optimized yet in terms of numerical
stability and performance. Bland's rule is implemented as well, so
algorithm is supposed to allow no cycling. Additional check for multiple
solutions is added (in case of multiple solutions algorithm returns an
appropriate return code of 1 and returns arbitrary optimal solution).
Finally, now we have 5 tests.

Before Thursday we have 4 directions that can be tackled in parallel:
*) Prepare the pull request!
*) Make the code more clear and readable (refactoring)
*) Wrap the core solveLP() procedure in OOP-style interface
*) Test solveLP on non-trivial tests (possibly test against
http://www.coin-or.org/Clp/)
2013-07-03 13:54:23 +03:00
Alex Leontiev
ddc0010e7d The first draft of simplex algorithm, simple tests.
What we have now corresponds to "formal simplex algorithm", described in
Cormen's "Intro to Algorithms". It will work *only* if the initial
problem has (0,0,0,...,0) as feasible solution (consequently, it will
work unpredictably if problem was unfeasible or did not have zero-vector as
feasible solution). Moreover, it might cycle.

TODO (first priority)
1. Implement initialize_simplex() procedure, that shall check for
feasibility and generate initial feasible solution. (in particular, code
should pass all 4 tests implemented at the moment)
2. Implement Bland's rule to avoid cycling.
3. Make the code more clear.
4. Implement several non-trivial tests (??) and check algorithm against
them. Debug if necessary.

TODO (second priority)
1. Concentrate on stability and speed (make difficult tests)
2013-06-28 15:28:57 +03:00
Alex Leontiev
b216c0940c Created skeleton for simplex method.
Added LPSolver class together with two nested classes: LPFunction and
LPConstraints. These represent function to be maximized and constraints
imposed respectively. They are implementations of interfaces Function
and Constraints respectively (latter ones are nested classes of Solver
interface, which is generic interface for all optimization algorithms to
be implemented within this project).

The next step is to implement the simplex algorithm! First, we shall
implement it for the case of constraints of the form Ax<=b and x>=0.
Then, we shall extend the sets of problems that can be handled by the
conversion to the one we've handled already. Finally, we shale
concentrate on numerical stability and efficiency.
2013-06-24 20:27:11 +03:00
Alex Leontiev
f41b8b90ff Blank module and first draft of solver API.
At this point we have a skeleton of a new module (optim) which can
barely compile properly (unlike previous commit). Besides, there is a
first draft of solver and lpsolver (linear optimization solver) in this
commit.
2013-06-20 14:54:09 +03:00
Alex Leontiev
f2afe64521 Starting implement simplex algorithm. 2013-06-17 18:16:30 +03:00
Alex Leontiev
47ce461d97 The initial commit for generic optimization
Generic optimization package for openCV project, will be developed
between the June and September of 2013. This work is funded by Google
Summer of Code 2013 project. This project is about
implementing several algorithms, that will find global maxima/minima of a
given function on a given domain subject to a given constraints.

All comments/suggestions are warmly appreciated and to be sent to
alozz1991@gmail.com (please, mention the word "openCV" in topic of
message, for I'm using the spam-filters)
2013-05-31 07:39:15 +03:00
Roman Donchenko
5ac3b8d5d8 Merge remote-tracking branch 'origin/2.4' into merge-2.4
Pull requests:
	#904 from ograycode:2.4
	#905 from bitwangyaoyao:2.4_TVL1
	#902 from apavlenko:fix_run_py
	#882 from pengx17:2.4_rewrite_query_info

Conflicts:
	modules/nonfree/src/surf.ocl.cpp
	modules/ocl/include/opencv2/ocl/private/util.hpp
	modules/ocl/src/hog.cpp
	modules/ocl/src/pyrlk.cpp
	modules/ocl/src/tvl1flow.cpp
2013-05-27 16:58:04 +04:00
Roman Donchenko
dad58d8940 Fix a build error which manifests when building with CUDA < 5. 2013-05-23 14:00:13 +04:00
Roman Donchenko
324cafdda6 Merge pull request #904 from ograycode:2.4 2013-05-22 18:46:40 +04:00
Roman Donchenko
5e0e1fac87 Merge commit 'b51a1a7d' (PR #895 from 2.4)
Conflicts:
	modules/ocl/CMakeLists.txt
	modules/ocl/perf/perf_color.cpp
	modules/ocl/perf/perf_match_template.cpp
	modules/ocl/perf/precomp.cpp
	modules/ocl/perf/precomp.hpp
2013-05-22 18:28:28 +04:00
Roman Donchenko
7efb24917f Merge pull request #887 from LeszekSwirski:fix-glinkedptrmutex 2013-05-22 12:57:04 +04:00
Roman Donchenko
519ee72f6f Merge pull request #905 from bitwangyaoyao:2.4_TVL1 2013-05-22 12:08:16 +04:00
Roman Donchenko
029fce10c9 Merge remote-tracking branch 'origin/2.4'
Conflicts:
	3rdparty/libjasper/CMakeLists.txt
	cmake/OpenCVDetectOpenCL.cmake
	modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst
	modules/imgproc/src/floodfill.cpp
	modules/ocl/include/opencv2/ocl/ocl.hpp
	modules/ocl/src/arithm.cpp
	modules/ocl/src/haar.cpp
	modules/ocl/src/imgproc.cpp
	modules/ocl/src/initialization.cpp
	modules/ocl/src/matrix_operations.cpp
	modules/ocl/src/mcwutil.cpp
	modules/ocl/src/opencl/arithm_bitwise_and_mask.cl
	modules/ocl/src/opencl/arithm_bitwise_and_scalar_mask.cl
	modules/ocl/src/opencl/arithm_bitwise_binary_mask.cl
	modules/ocl/src/opencl/arithm_bitwise_binary_scalar.cl
	modules/ocl/src/opencl/arithm_bitwise_binary_scalar_mask.cl
	modules/ocl/src/opencl/arithm_bitwise_or.cl
	modules/ocl/src/opencl/arithm_bitwise_or_scalar.cl
	modules/ocl/src/opencl/arithm_bitwise_or_scalar_mask.cl
	modules/ocl/src/opencl/arithm_bitwise_xor.cl
	modules/ocl/src/opencl/arithm_bitwise_xor_mask.cl
	modules/ocl/src/opencl/arithm_bitwise_xor_scalar.cl
	modules/ocl/src/stereobm.cpp
	modules/ocl/test/precomp.hpp
	modules/python/src2/api
	modules/ts/src/ts_func.cpp
	samples/gpu/bgfg_segm.cpp
2013-05-21 17:19:23 +04:00
Andrey Pavlenko
d4255b7f75 Merge pull request #902 from apavlenko:fix_run_py 2013-05-21 14:07:32 +04:00
Vadim Pisarevsky
cbbc82a789 Merge pull request #882 from pengx17:2.4_rewrite_query_info 2013-05-20 14:01:03 +04:00
Vadim Pisarevsky
b51a1a7d15 Merge pull request #895 from bitwangyaoyao:2.4_perf 2013-05-20 14:00:47 +04:00
Roman Donchenko
389be67605 Merge pull request #853 from icylord:2.4 2013-05-20 12:11:47 +04:00
yao
d8b192c84d Fix the mismatch on NV GPUs 2013-05-20 14:46:17 +08:00
ograycode
97e9368e75 Simple set of the camera index to allow the user to change it after the object has been initialized. 2013-05-19 22:04:56 -04:00
Andrey Pavlenko
4af104aaae 'aapt' tool moved in SDK r22, adding support to run.py 2013-05-19 14:57:21 +04:00
Vadim Pisarevsky
aee6a617a6 Merge pull request #897 from bitwangyaoyao:2.4_TVL1 2013-05-19 00:23:24 +04:00
yao
04399a27d0 fix a warning 2013-05-17 15:44:22 +08:00
yao
4162ebfad3 add OpticalFlowDual_TVL1_OCL function 2013-05-17 15:34:22 +08:00
Vladislav Vinogradov
49a4f27d42 removed VIBE implementation 2013-05-17 11:27:00 +04:00
yao
03c55db4fb fix the waring in gemm test 2013-05-17 13:19:09 +08:00
yao
5f20fce6fd add accuracy tests while running perf 2013-05-17 13:18:46 +08:00
Vladislav Vinogradov
ec52096e30 removed VIBE implementation 2013-05-16 13:47:24 +04:00
Leszek Swirski
0e8c2b0395 Fix visibility of g_linked_ptr_mutex on Windows
Reverts some changes in b8ed00bd64
2013-05-15 14:42:28 +01:00
Vadim Pisarevsky
7d9041460a Merge pull request #885 from pengx17:2.4_bfmatcher_ocl 2013-05-15 14:21:50 +04:00
peng xiao
d053f2165d Add BFMatcher_OCL class alias for BruteForceMatcher_OCL.
This adds a similar interface with pure-cpp and gpu versions.
2013-05-15 10:47:17 +08:00
peng xiao
3f93c3cc4e Clean up spaces in ocl.hpp 2013-05-15 10:43:47 +08:00
peng xiao
1ecc765903 Merge branch '2.4' of https://github.com/Itseez/opencv into 2.4_pyrup_fix 2013-05-15 08:55:43 +08:00
peng xiao
df3997b108 Fix ocl::pyrUp
Use predefined OpenCL function to convert integers to floating points.
This is more accurate than before as it enables:
1. saturate cast
2. customized rounding
2013-05-15 08:51:21 +08:00
Vadim Pisarevsky
2a646f7626 Merge pull request #862 from piponazo:v4lFPS 2013-05-14 16:00:28 +04:00
Vadim Pisarevsky
25e6902a43 Merge pull request #818 from bitwangyaoyao:2.4_optBlur 2013-05-14 15:56:56 +04:00
Vadim Pisarevsky
54afb85d0c Merge pull request #823 from pickle27:starter_image_sequence 2013-05-14 15:56:35 +04:00
Vadim Pisarevsky
bd1d7cd208 Merge pull request #839 from pengx17:2.4_ocl_csbp 2013-05-14 15:56:07 +04:00
Vadim Pisarevsky
87765c0f16 Merge pull request #883 from bitwangyaoyao:2.4_fixMoments 2013-05-14 15:55:38 +04:00
yao
1d1d28baf2 fix black screen when input Mat is large 2013-05-14 18:02:53 +08:00
peng xiao
ac21cabda2 Copy ocl::queryDeviceInfo interface from master to 2.4.
Affected functions surf.ocl, pyrlk.ocl and hog.ocl are updated with the change.
2013-05-14 17:50:38 +08:00
Vadim Pisarevsky
35d8fa444b Merge pull request #849 from dominikrose:dom_2.4 2013-05-13 23:38:26 +04:00
Vadim Pisarevsky
d79c05fec9 Merge pull request #872 from pengx17:2.4_create2dimage_fix 2013-05-13 23:12:25 +04:00
Vadim Pisarevsky
6eb5a95a59 Merge pull request #871 from bitwangyaoyao:2.4_acry 2013-05-13 23:04:11 +04:00
Vadim Pisarevsky
14c50d2fce Merge pull request #874 from pengx17:master_queryDeviceInfo_rewrite 2013-05-13 23:03:24 +04:00
Vadim Pisarevsky
fd83f2f5ca Merge pull request #819 from bitwangyaoyao:2.4_haarBuf 2013-05-13 22:36:10 +04:00
Vadim Pisarevsky
c549ec8371 Merge pull request #850 from SpecLad:convhull-orientation 2013-05-13 22:18:54 +04:00