platform/upstream/opencv.git
9 years agofixing locale settings - making it universal
StevenPuttemans [Fri, 6 Mar 2015 11:59:26 +0000 (12:59 +0100)]
fixing locale settings - making it universal

9 years agoMerge pull request #3795 from samyak-268:sqr-filter-doc
Vadim Pisarevsky [Fri, 6 Mar 2015 10:22:56 +0000 (10:22 +0000)]
Merge pull request #3795 from samyak-268:sqr-filter-doc

9 years agoMerge pull request #3796 from enpe:master
Vadim Pisarevsky [Fri, 6 Mar 2015 10:21:57 +0000 (10:21 +0000)]
Merge pull request #3796 from enpe:master

9 years agoMerge pull request #3797 from Dmitry-Me:reduceVariableScope6
Vadim Pisarevsky [Fri, 6 Mar 2015 10:20:45 +0000 (10:20 +0000)]
Merge pull request #3797 from Dmitry-Me:reduceVariableScope6

9 years agoMerge pull request #3793 from sanuj:master
Vadim Pisarevsky [Fri, 6 Mar 2015 10:20:16 +0000 (10:20 +0000)]
Merge pull request #3793 from sanuj:master

9 years agoMerge pull request #3786 from jviney:fix_background_subtractor_knn_width_step
Vadim Pisarevsky [Fri, 6 Mar 2015 10:17:43 +0000 (10:17 +0000)]
Merge pull request #3786 from jviney:fix_background_subtractor_knn_width_step

9 years agoReduce variable scope
Dmitry-Me [Fri, 6 Mar 2015 07:17:37 +0000 (10:17 +0300)]
Reduce variable scope

9 years agoFixed: wrong conversion of float-based Mat input inside the AKAZE.
Nils Plath [Thu, 5 Mar 2015 22:55:07 +0000 (23:55 +0100)]
Fixed: wrong conversion of float-based Mat input inside the AKAZE.

9 years agoAdded doxygen comments for sqrBoxFilter() method
Samyak Datta [Thu, 5 Mar 2015 21:27:14 +0000 (02:57 +0530)]
Added doxygen comments for sqrBoxFilter() method

9 years agoMerge pull request #3790 from StevenPuttemans:fix_cmakelist_annotation_master
Alexander Alekhin [Thu, 5 Mar 2015 16:01:39 +0000 (16:01 +0000)]
Merge pull request #3790 from StevenPuttemans:fix_cmakelist_annotation_master

9 years agoFix documentation in python binding tutorial
sanuj [Thu, 5 Mar 2015 14:27:55 +0000 (19:57 +0530)]
Fix documentation in python binding tutorial

9 years agoupdate cmakelists for annotation tool
StevenPuttemans [Thu, 5 Mar 2015 13:25:43 +0000 (14:25 +0100)]
update cmakelists for annotation tool

9 years agoMerge pull request #3788 from berak:fix_features2d_tut
Vadim Pisarevsky [Thu, 5 Mar 2015 12:22:50 +0000 (12:22 +0000)]
Merge pull request #3788 from berak:fix_features2d_tut

9 years agoMerge pull request #3787 from Dmitry-Me:fixNullPointerDereference2
Vadim Pisarevsky [Thu, 5 Mar 2015 12:19:02 +0000 (12:19 +0000)]
Merge pull request #3787 from Dmitry-Me:fixNullPointerDereference2

9 years agofix features2d tutorials
berak [Thu, 5 Mar 2015 09:15:35 +0000 (10:15 +0100)]
fix features2d tutorials

9 years agoFix potential null pointer dereference
Dmitry-Me [Thu, 5 Mar 2015 07:31:51 +0000 (10:31 +0300)]
Fix potential null pointer dereference

9 years agoMerge pull request #3784 from ilya-lavrenov:nvidia_android
Vadim Pisarevsky [Thu, 5 Mar 2015 06:43:02 +0000 (06:43 +0000)]
Merge pull request #3784 from ilya-lavrenov:nvidia_android

9 years agoFix KNN background subtraction not honoring width step.
Jonathan Viney [Wed, 4 Mar 2015 23:46:07 +0000 (12:46 +1300)]
Fix KNN background subtraction not honoring width step.

9 years agoMerge pull request #3777 from ilya-lavrenov:nvidia_cvtcolor_eps
Vadim Pisarevsky [Wed, 4 Mar 2015 13:53:41 +0000 (13:53 +0000)]
Merge pull request #3777 from ilya-lavrenov:nvidia_cvtcolor_eps

9 years agodisabled some kernels for Android && NVidia
Ilya Lavrenov [Wed, 4 Mar 2015 11:45:21 +0000 (14:45 +0300)]
disabled some kernels for Android && NVidia

9 years agoMerge pull request #3583 from oresths:tbb_canny
Vadim Pisarevsky [Wed, 4 Mar 2015 10:49:27 +0000 (10:49 +0000)]
Merge pull request #3583 from oresths:tbb_canny

9 years agoMerge pull request #3781 from Dmitry-Me:dangerousStringManipulation
Vadim Pisarevsky [Wed, 4 Mar 2015 10:45:25 +0000 (10:45 +0000)]
Merge pull request #3781 from Dmitry-Me:dangerousStringManipulation

9 years agoRemove dangerous string manipulation, merge declaration with assignment
Dmitry-Me [Wed, 4 Mar 2015 07:35:06 +0000 (10:35 +0300)]
Remove dangerous string manipulation, merge declaration with assignment

9 years agoMerge pull request #3779 from Dmitry-Me:uniformComputationOfVariableSize
Vadim Pisarevsky [Tue, 3 Mar 2015 18:51:56 +0000 (18:51 +0000)]
Merge pull request #3779 from Dmitry-Me:uniformComputationOfVariableSize

9 years agoMerge pull request #3722 from berak:py_houghlines_sample
Vadim Pisarevsky [Tue, 3 Mar 2015 18:16:25 +0000 (18:16 +0000)]
Merge pull request #3722 from berak:py_houghlines_sample

9 years agoMerge pull request #3607 from soyersoyer:yuyv_pixfmt
Vadim Pisarevsky [Tue, 3 Mar 2015 18:15:50 +0000 (18:15 +0000)]
Merge pull request #3607 from soyersoyer:yuyv_pixfmt

9 years agoMerge pull request #3717 from Dmitry-Me:removeUnneededIndirections
Vadim Pisarevsky [Tue, 3 Mar 2015 16:15:24 +0000 (16:15 +0000)]
Merge pull request #3717 from Dmitry-Me:removeUnneededIndirections

9 years agoUniform computation of variable size
Dmitry-Me [Tue, 3 Mar 2015 13:11:07 +0000 (16:11 +0300)]
Uniform computation of variable size

9 years agoMerge pull request #3654 from StevenPuttemans:add_annotation_master
Vadim Pisarevsky [Tue, 3 Mar 2015 12:53:06 +0000 (12:53 +0000)]
Merge pull request #3654 from StevenPuttemans:add_annotation_master

9 years agoMerge pull request #3700 from MSOpenTech:winrt-cmake-contrib
Vadim Pisarevsky [Tue, 3 Mar 2015 12:52:02 +0000 (12:52 +0000)]
Merge pull request #3700 from MSOpenTech:winrt-cmake-contrib

9 years agoMerge pull request #3773 from ilya-lavrenov:warning
Vadim Pisarevsky [Tue, 3 Mar 2015 12:33:17 +0000 (12:33 +0000)]
Merge pull request #3773 from ilya-lavrenov:warning

9 years agoMerge pull request #3775 from Dmitry-Me:reduceVariableScope5
Vadim Pisarevsky [Tue, 3 Mar 2015 12:29:18 +0000 (12:29 +0000)]
Merge pull request #3775 from Dmitry-Me:reduceVariableScope5

9 years agoincreased EPS for cvtColor for NVIDIA
Ilya Lavrenov [Tue, 3 Mar 2015 10:15:23 +0000 (13:15 +0300)]
increased EPS for cvtColor for NVIDIA

9 years agoReduce variable scope, only compute values that are used later
Dmitry-Me [Tue, 3 Mar 2015 08:04:22 +0000 (11:04 +0300)]
Reduce variable scope, only compute values that are used later

9 years agoMerge pull request #3772 from Dmitry-Me:reduceVariableScope4
Vadim Pisarevsky [Mon, 2 Mar 2015 19:52:18 +0000 (19:52 +0000)]
Merge pull request #3772 from Dmitry-Me:reduceVariableScope4

9 years agoMerge pull request #3759 from mshabunin:wrap-all
Vadim Pisarevsky [Mon, 2 Mar 2015 19:51:42 +0000 (19:51 +0000)]
Merge pull request #3759 from mshabunin:wrap-all

9 years agoEnabled property sheets for WinRT related samples
Maxim Kostin [Mon, 2 Mar 2015 19:26:13 +0000 (22:26 +0300)]
Enabled property sheets for WinRT related samples

9 years agoFixing 'doc' buildbot job: removing trailing whitespaces and tab indents
Maxim Kostin [Fri, 20 Feb 2015 16:49:10 +0000 (19:49 +0300)]
Fixing 'doc' buildbot job: removing trailing whitespaces and tab indents

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
9 years agoFixing buildbot job:
Maxim Kostin [Fri, 13 Feb 2015 16:11:46 +0000 (19:11 +0300)]
Fixing buildbot job:
 - explicitly turning OCL off since WinRT does not support it
 - fixing macro definitions in core/ocl.cpp

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
9 years agoAdding Widows Phone 8 sample apps
Maxim Kostin [Fri, 13 Feb 2015 14:29:30 +0000 (17:29 +0300)]
Adding Widows Phone 8 sample apps

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
9 years agoAdded WinRT Universal Apps samples
Maxim Kostin [Wed, 18 Feb 2015 15:23:41 +0000 (18:23 +0300)]
Added WinRT Universal Apps samples

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
9 years agoAdded and updated WinRT samples
Maxim Kostin [Fri, 13 Feb 2015 14:12:37 +0000 (17:12 +0300)]
Added and updated WinRT samples

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
9 years agoAdded build script to automate generating, building and installing OCV for WinRT...
Maxim Kostin [Fri, 13 Feb 2015 12:18:20 +0000 (15:18 +0300)]
Added build script to automate generating, building and installing OCV for WinRT, WindowsPhone 8, WindowsPhone 8.1. Added readme and .bat script wrapper. Added standalone script to build and install pre-generated projects.

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
9 years agoAdding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1
Maxim Kostin [Fri, 20 Feb 2015 16:47:45 +0000 (19:47 +0300)]
Adding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1

- Substituted HAVE_WINRT with WINRT
- Fixed compilation issues in ocl.cpp and parallel.cpp
- Fixed compiler issue for WP8: "C2678: binary '+' : no operator found which takes a left-hand - Fixed gitignore
- Added #ifdef HAVE_OPENCL to remove compiler warnings in ocl.cpp
- Used NO_GETENV similar to '3rdparty\libjpeg\jmemmgr.c;
- Added ole32.lib for core module (for WindowsStore 8.0 builds)
- Made OpenCV_ARCH aware of ARM

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
9 years agoPython support
Maksim Shabunin [Tue, 24 Feb 2015 15:38:12 +0000 (18:38 +0300)]
Python support

9 years agoModified java wrapping mechanism
Maksim Shabunin [Thu, 19 Feb 2015 13:17:19 +0000 (16:17 +0300)]
Modified java wrapping mechanism

9 years agofixed [-Wsign-compare] warning
Ilya Lavrenov [Mon, 2 Mar 2015 13:41:06 +0000 (16:41 +0300)]
fixed [-Wsign-compare] warning

9 years agoReduce veriables scope, move declaration to first use
Dmitry-Me [Mon, 2 Mar 2015 13:27:48 +0000 (16:27 +0300)]
Reduce veriables scope, move declaration to first use

9 years agoMerge pull request #3744 from es0m:remotes/upstream/2.4.10.x-prep
Vadim Pisarevsky [Mon, 2 Mar 2015 11:38:25 +0000 (11:38 +0000)]
Merge pull request #3744 from es0m:remotes/upstream/2.4.10.x-prep

9 years agoMerge pull request #3690 from theodr:moprh_lines_detection_tut
Vadim Pisarevsky [Mon, 2 Mar 2015 11:36:15 +0000 (11:36 +0000)]
Merge pull request #3690 from theodr:moprh_lines_detection_tut

9 years agoMerge pull request #3742 from StevenPuttemans:fix_4151
Vadim Pisarevsky [Mon, 2 Mar 2015 11:30:16 +0000 (11:30 +0000)]
Merge pull request #3742 from StevenPuttemans:fix_4151

9 years agoMerge pull request #3746 from theodr:pca_tutorial
Vadim Pisarevsky [Mon, 2 Mar 2015 11:29:33 +0000 (11:29 +0000)]
Merge pull request #3746 from theodr:pca_tutorial

9 years agoMerge pull request #3750 from Dmitry-Me:reduceVariableScope3
Vadim Pisarevsky [Mon, 2 Mar 2015 10:55:37 +0000 (10:55 +0000)]
Merge pull request #3750 from Dmitry-Me:reduceVariableScope3

9 years agoMerge pull request #3749 from alalek:fix_android_camera_master
Vadim Pisarevsky [Mon, 2 Mar 2015 10:55:16 +0000 (10:55 +0000)]
Merge pull request #3749 from alalek:fix_android_camera_master

9 years agoMerge pull request #3758 from ilya-lavrenov:aarch64
Vadim Pisarevsky [Mon, 2 Mar 2015 10:50:31 +0000 (10:50 +0000)]
Merge pull request #3758 from ilya-lavrenov:aarch64

9 years agoMerge pull request #3757 from ilya-lavrenov:popcnp
Vadim Pisarevsky [Mon, 2 Mar 2015 10:50:07 +0000 (10:50 +0000)]
Merge pull request #3757 from ilya-lavrenov:popcnp

9 years agoMerge pull request #3763 from laomaiweng:patch-1
Vadim Pisarevsky [Mon, 2 Mar 2015 10:35:38 +0000 (10:35 +0000)]
Merge pull request #3763 from laomaiweng:patch-1

9 years agoMerge pull request #3764 from jet47:runtime-disable-optimizations
Vadim Pisarevsky [Mon, 2 Mar 2015 10:35:17 +0000 (10:35 +0000)]
Merge pull request #3764 from jet47:runtime-disable-optimizations

9 years agoMerge pull request #3767 from StevenPuttemans:fix_GPU_cascadeclassifiers
Vadim Pisarevsky [Mon, 2 Mar 2015 10:34:11 +0000 (10:34 +0000)]
Merge pull request #3767 from StevenPuttemans:fix_GPU_cascadeclassifiers

9 years agoMerge pull request #3752 from mshabunin:fix-legacy-cmake-issue
Alexander Alekhin [Fri, 27 Feb 2015 14:49:25 +0000 (14:49 +0000)]
Merge pull request #3752 from mshabunin:fix-legacy-cmake-issue

9 years agofixing CUDA cascade classifiers function and needed models
StevenPuttemans [Fri, 27 Feb 2015 13:20:27 +0000 (14:20 +0100)]
fixing CUDA cascade classifiers function and needed models

9 years agomerge new setUseOptimizations function with existed setUseOptimized
Vladislav Vinogradov [Fri, 27 Feb 2015 11:24:51 +0000 (14:24 +0300)]
merge new setUseOptimizations function with existed setUseOptimized

9 years agodo not dump OpenCL info if it is disabled
Vladislav Vinogradov [Fri, 27 Feb 2015 09:52:44 +0000 (12:52 +0300)]
do not dump OpenCL info if it is disabled

9 years agorename setOptimizations -> setUseOptimizations
Vladislav Vinogradov [Fri, 27 Feb 2015 09:52:28 +0000 (12:52 +0300)]
rename setOptimizations -> setUseOptimizations

9 years agomove tegra namespace out of cv to prevent conflicts
Vladislav Vinogradov [Fri, 27 Feb 2015 09:52:11 +0000 (12:52 +0300)]
move tegra namespace out of cv to prevent conflicts

9 years agoUpdate OpenCVDetectCUDA.cmake
Quentin Minster [Thu, 26 Feb 2015 23:41:31 +0000 (00:41 +0100)]
Update OpenCVDetectCUDA.cmake

Add check for CUDA version >= 7.0 (currently in RC1), which drops support for arches 1.x.

9 years agomove cuda tests from core to cudaarithm
Vladislav Vinogradov [Thu, 26 Feb 2015 16:49:12 +0000 (19:49 +0300)]
move cuda tests from core to cudaarithm

9 years agoaarch64 support
Ilya Lavrenov [Thu, 26 Feb 2015 09:53:37 +0000 (12:53 +0300)]
aarch64 support

9 years agodisable all optimizations for CUDA tests
Vladislav Vinogradov [Thu, 26 Feb 2015 16:36:13 +0000 (19:36 +0300)]
disable all optimizations for CUDA tests

9 years agoadd generic method to disable/enable all optimizations (IPP, OpenCL, Tegra)
Vladislav Vinogradov [Thu, 26 Feb 2015 16:36:04 +0000 (19:36 +0300)]
add generic method to disable/enable all optimizations (IPP, OpenCL, Tegra)

9 years agouse new functions before all tegra:: calls
Vladislav Vinogradov [Thu, 26 Feb 2015 16:34:58 +0000 (19:34 +0300)]
use new functions before all tegra:: calls

9 years agoadd fucntion to control tegra optimizations in run-time
Vladislav Vinogradov [Thu, 26 Feb 2015 16:34:20 +0000 (19:34 +0300)]
add fucntion to control tegra optimizations in run-time

9 years agoMerge pull request #3753 from biicode:biicode_docs
Maksim Shabunin [Thu, 26 Feb 2015 14:55:43 +0000 (14:55 +0000)]
Merge pull request #3753 from biicode:biicode_docs

9 years agoIntroduction to PCA tutorial
theodore [Thu, 19 Feb 2015 13:57:05 +0000 (14:57 +0100)]
Introduction to PCA tutorial

9 years agofixed bug #4215
Ilya Lavrenov [Wed, 25 Feb 2015 18:57:17 +0000 (21:57 +0300)]
fixed bug #4215

9 years agoAdded biicode docs to introduction tutorials
mariadeanton [Tue, 24 Feb 2015 15:44:35 +0000 (16:44 +0100)]
Added biicode docs to introduction tutorials

biicode docs added with fixes
fixed biicode docs

added biicode docs
added biicode docs

fixed #include typos

fixed whitespaces and tabs in indent

fixed whitespaces

small fixes

fixed trailing whitespace

trial fix #includes

fixed #includes

fixed link and branch name

9 years agoDisable object libraries building for cmake 2.8.7 and earlier
Maksim Shabunin [Wed, 25 Feb 2015 12:00:44 +0000 (15:00 +0300)]
Disable object libraries building for cmake 2.8.7 and earlier

9 years agoadd annotation tool master branch
StevenPuttemans [Thu, 29 Jan 2015 12:41:54 +0000 (13:41 +0100)]
add annotation tool master branch

9 years agoReduce variables scope
Dmitry-Me [Wed, 25 Feb 2015 07:38:44 +0000 (10:38 +0300)]
Reduce variables scope

9 years agoAndroid: fix JavaCameraView implementation
Alexander Alekhin [Mon, 16 Feb 2015 22:28:43 +0000 (01:28 +0300)]
Android: fix JavaCameraView implementation

1) Fixed deadlock if camera is started and stopped immediately
2) Invalid pattern usage of Object.wait(). Refer to "spurious wakeup": http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait
3) Fixed buffer usage:
  a) fix eliminates processing of zero NV12 (green in RGB) first frame
  b) latest ready frame is delivered for processing (not previous)

9 years agoMerge pull request #3712 from jet47:fix-cuda-build-on-windows
Vadim Pisarevsky [Tue, 24 Feb 2015 15:39:01 +0000 (15:39 +0000)]
Merge pull request #3712 from jet47:fix-cuda-build-on-windows

9 years agoMerge pull request #3733 from StevenPuttemans:fix_4004_master
Vadim Pisarevsky [Tue, 24 Feb 2015 15:38:40 +0000 (15:38 +0000)]
Merge pull request #3733 from StevenPuttemans:fix_4004_master

9 years agoMerge pull request #3734 from Dmitry-Me:reduceVariableScope2
Vadim Pisarevsky [Tue, 24 Feb 2015 15:38:19 +0000 (15:38 +0000)]
Merge pull request #3734 from Dmitry-Me:reduceVariableScope2

9 years agoMerge pull request #3736 from nisargthakkar:Bug3634_master
Vadim Pisarevsky [Tue, 24 Feb 2015 15:38:02 +0000 (15:38 +0000)]
Merge pull request #3736 from nisargthakkar:Bug3634_master

9 years agoMerge pull request #3743 from StevenPuttemans:fix_3887_master
Vadim Pisarevsky [Tue, 24 Feb 2015 15:37:13 +0000 (15:37 +0000)]
Merge pull request #3743 from StevenPuttemans:fix_3887_master

9 years agoMorphology Lines Extraction Tutorial
theodore [Tue, 24 Feb 2015 13:33:15 +0000 (14:33 +0100)]
Morphology Lines Extraction Tutorial

9 years agoMerge pull request #3709 from StevenPuttemans:fix_traincascade_load_message_master
Vadim Pisarevsky [Tue, 24 Feb 2015 12:50:38 +0000 (12:50 +0000)]
Merge pull request #3709 from StevenPuttemans:fix_traincascade_load_message_master

9 years agoMerge pull request #3738 from ilya-lavrenov:cc_master
Alexander Smorkalov [Tue, 24 Feb 2015 10:47:20 +0000 (10:47 +0000)]
Merge pull request #3738 from ilya-lavrenov:cc_master

9 years agoMerge pull request #3728 from StevenPuttemans:fix_3714_master
Maksim Shabunin [Tue, 24 Feb 2015 10:09:21 +0000 (10:09 +0000)]
Merge pull request #3728 from StevenPuttemans:fix_3714_master

9 years agoMerge pull request #3741 from StevenPuttemans:fix_3028_master
Maksim Shabunin [Tue, 24 Feb 2015 10:05:16 +0000 (10:05 +0000)]
Merge pull request #3741 from StevenPuttemans:fix_3028_master

9 years agofixed whitespace issues
Eric Sommerlade [Mon, 23 Feb 2015 15:15:34 +0000 (08:15 -0700)]
fixed whitespace issues

9 years agofix formula getGaussianKernel in docs
StevenPuttemans [Mon, 23 Feb 2015 14:23:02 +0000 (15:23 +0100)]
fix formula getGaussianKernel in docs

9 years agoadd extra output argument to tutorial
StevenPuttemans [Mon, 23 Feb 2015 14:13:33 +0000 (15:13 +0100)]
add extra output argument to tutorial

9 years agofix ellipse fitting notice
StevenPuttemans [Mon, 23 Feb 2015 14:05:55 +0000 (15:05 +0100)]
fix ellipse fitting notice

9 years agoadded support for uncompressed parameters to tiff image format as described here...
Eric Sommerlade [Mon, 23 Feb 2015 13:12:42 +0000 (06:12 -0700)]
added support for uncompressed parameters to tiff image format as described here: expertland.net/question/b6o3n6p9a72341db823b48nl98m91dx8n1/detail.html

9 years agofixed cross-compilation
Ilya Lavrenov [Sun, 22 Feb 2015 09:40:27 +0000 (12:40 +0300)]
fixed cross-compilation

9 years agoMerge pull request #3730 from ilya-lavrenov:fix_bug
Alexander Alekhin [Sat, 21 Feb 2015 08:10:25 +0000 (08:10 +0000)]
Merge pull request #3730 from ilya-lavrenov:fix_bug

9 years agoSame as Bug #3309. Pushing to master
Nisarg Thakkar [Sat, 21 Feb 2015 03:50:00 +0000 (09:20 +0530)]
Same as Bug #3309. Pushing to master

9 years agoMerge pull request #1 from Itseez/master
Eric Sommerlade [Fri, 20 Feb 2015 17:21:38 +0000 (17:21 +0000)]
Merge pull request #1 from Itseez/master

Update from original

9 years agoReduce variable scope, fix indenting
Dmitry-Me [Fri, 20 Feb 2015 14:46:48 +0000 (17:46 +0300)]
Reduce variable scope, fix indenting