Skip to content

Commit

Permalink
War on Whitespace, master edition: trailing spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Donchenko committed Aug 27, 2013
1 parent 2c4bbb3 commit 9b92545
Show file tree
Hide file tree
Showing 40 changed files with 263 additions and 263 deletions.
2 changes: 1 addition & 1 deletion cmake/OpenCVFindLibsPerf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ endif(WITH_CUDA)
# --- Eigen ---
if(WITH_EIGEN)
find_path(EIGEN_INCLUDE_PATH "Eigen/Core"
PATHS /usr/local /opt /usr $ENV{EIGEN_ROOT}/include ENV ProgramFiles ENV ProgramW6432
PATHS /usr/local /opt /usr $ENV{EIGEN_ROOT}/include ENV ProgramFiles ENV ProgramW6432
PATH_SUFFIXES include/eigen3 include/eigen2 Eigen/include/eigen3 Eigen/include/eigen2
DOC "The path to Eigen3/Eigen2 headers"
CMAKE_FIND_ROOT_PATH_BOTH)
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/bioinspired/retina_model/retina_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ To compile it, assuming OpenCV is correctly installed, use the following command
Here is a code explanation :

Retina definition is present in the bioinspired package and a simple include allows to use it. You can rather use the specific header : *opencv2/bioinspired.hpp* if you prefer but then include the other required openv modules : *opencv2/core.hpp* and *opencv2/highgui.hpp*
Retina definition is present in the bioinspired package and a simple include allows to use it. You can rather use the specific header : *opencv2/bioinspired.hpp* if you prefer but then include the other required openv modules : *opencv2/core.hpp* and *opencv2/highgui.hpp*

.. code-block:: cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ designed mostly for development purposes. This approach is deprecated for the pr
release package is recommended to communicate with OpenCV Manager via the async initialization
described above.

#. Add the OpenCV library project to your workspace the same way as for the async initialization
#. Add the OpenCV library project to your workspace the same way as for the async initialization
above. Use menu :guilabel:`File -> Import -> Existing project in your workspace`,
press :guilabel:`Browse` button and select OpenCV SDK path
press :guilabel:`Browse` button and select OpenCV SDK path
(:file:`OpenCV-2.4.6-android-sdk/sdk`).

.. image:: images/eclipse_opencv_dependency0.png
Expand Down
2 changes: 1 addition & 1 deletion modules/calib3d/src/calib3d_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ using namespace cv;
//////////////////////////////////////////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////



Expand Down
12 changes: 6 additions & 6 deletions modules/calib3d/src/five-point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,24 +529,24 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
mask4 = (Q.row(2) > 0) & mask4;
mask4 = (Q.row(2) < dist) & mask4;

mask1 = mask1.t();
mask2 = mask2.t();
mask3 = mask3.t();
mask4 = mask4.t();
mask1 = mask1.t();
mask2 = mask2.t();
mask3 = mask3.t();
mask4 = mask4.t();

// If _mask is given, then use it to filter outliers.
if (!_mask.empty())
{
Mat mask = _mask.getMat();
CV_Assert(mask.size() == mask1.size());
CV_Assert(mask.size() == mask1.size());
bitwise_and(mask, mask1, mask1);
bitwise_and(mask, mask2, mask2);
bitwise_and(mask, mask3, mask3);
bitwise_and(mask, mask4, mask4);
}
if (_mask.empty() && _mask.needed())
{
_mask.create(mask1.size(), CV_8U);
_mask.create(mask1.size(), CV_8U);
}

CV_Assert(_R.needed() && _t.needed());
Expand Down
36 changes: 18 additions & 18 deletions modules/calib3d/src/levmarq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,30 @@
This is translation to C++ of the Matlab's LMSolve package by Miroslav Balda.
Here is the original copyright:
============================================================================
Copyright (c) 2007, Miroslav Balda
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/

Expand Down Expand Up @@ -112,7 +112,7 @@ class LMSolverImpl : public LMSolver
gemm(J, r, 1, noArray(), 0, v, GEMM_1_T);

Mat D = A.diag().clone();

const double Rlo = 0.25, Rhi = 0.75;
double lambda = 1, lc = 0.75;
int i, iter = 0;
Expand Down Expand Up @@ -222,5 +222,5 @@ Ptr<LMSolver> createLMSolver(const Ptr<LMSolver::Callback>& cb, int maxIters)
CV_Assert( !LMSolverImpl_info_auto.name().empty() );
return new LMSolverImpl(cb, maxIters);
}

}
22 changes: 11 additions & 11 deletions modules/calib3d/test/test_affine3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,30 @@ TEST(Calib3d_Affine3f, accuracy)

cv::Mat expected;
cv::Rodrigues(rvec, expected);


ASSERT_EQ(0, norm(cv::Mat(affine.matrix, false).colRange(0, 3).rowRange(0, 3) != expected));
ASSERT_EQ(0, norm(cv::Mat(affine.linear()) != expected));


cv::Matx33d R = cv::Matx33d::eye();

double angle = 50;
R.val[0] = R.val[4] = std::cos(CV_PI*angle/180.0);
R.val[3] = std::sin(CV_PI*angle/180.0);
R.val[1] = -R.val[3];


cv::Affine3d affine1(cv::Mat(cv::Vec3d(0.2, 0.5, 0.3)).reshape(1, 1), cv::Vec3d(4, 5, 6));
cv::Affine3d affine2(R, cv::Vec3d(1, 1, 0.4));

cv::Affine3d result = affine1.inv() * affine2;

expected = cv::Mat(affine1.matrix.inv(cv::DECOMP_SVD)) * cv::Mat(affine2.matrix, false);


cv::Mat diff;
cv::absdiff(expected, result.matrix, diff);

ASSERT_LT(cv::norm(diff, cv::NORM_INF), 1e-15);
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ Draws keypoints.

:param flags: Flags setting drawing features. Possible ``flags`` bit values are defined by ``DrawMatchesFlags``. See details above in :ocv:func:`drawMatches` .

.. note:: For Python API, flags are modified as `cv2.DRAW_MATCHES_FLAGS_DEFAULT`, `cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS`, `cv2.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG`, `cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS`
.. note:: For Python API, flags are modified as `cv2.DRAW_MATCHES_FLAGS_DEFAULT`, `cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS`, `cv2.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG`, `cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS`
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Finds keypoints in an image and computes their descriptors
:param descriptors: The output descriptors. Pass ``cv::noArray()`` if you do not need it.

:param useProvidedKeypoints: If it is true, then the method will use the provided vector of keypoints instead of detecting them.


BRISK
-----
Expand Down
2 changes: 1 addition & 1 deletion modules/highgui/src/cap_ffmpeg_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
#if LIBAVUTIL_BUILD > CALC_FFMPEG_VERSION(51,11,0)
/* Some settings for libx264 encoding, restore dummy values for gop_size
and qmin since they will be set to reasonable defaults by the libx264
preset system. Also, use a crf encode with the default quality rating,
preset system. Also, use a crf encode with the default quality rating,
this seems easier than finding an appropriate default bitrate. */
if (c->codec_id == CODEC_ID_H264) {
c->gop_size = -1;
Expand Down
16 changes: 8 additions & 8 deletions modules/imgproc/doc/filtering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ The function supports the in-place mode. Dilation can be applied several ( ``ite

* An example using the morphological dilate operation can be found at opencv_source_code/samples/cpp/morphology2.cpp




erode
Expand Down Expand Up @@ -1000,17 +1000,17 @@ Returns Gabor filter coefficients.
.. ocv:pyfunction:: cv2.getGaborKernel(ksize, sigma, theta, lambd, gamma[, psi[, ktype]]) -> retval
:param ksize: Size of the filter returned.

:param sigma: Standard deviation of the gaussian envelope.

:param theta: Orientation of the normal to the parallel stripes of a Gabor function.

:param lambd: Wavelength of the sinusoidal factor.

:param gamma: Spatial aspect ratio.

:param psi: Phase offset.

:param ktype: Type of filter coefficients. It can be ``CV_32F`` or ``CV_64F`` .

For more details about gabor filter equations and parameters, see: `Gabor Filter <http://en.wikipedia.org/wiki/Gabor_filter>`_.
Expand Down Expand Up @@ -1132,7 +1132,7 @@ Performs advanced morphological transformations.
:param dst: Destination image of the same size and type as ``src`` .

:param kernel: Structuring element. It can be created using :ocv:func:`getStructuringElement`.

:param anchor: Anchor position with the kernel. Negative values mean that the anchor is at the kernel center.

:param op: Type of a morphological operation that can be one of the following:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,9 @@ Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
.. ocv:cfunction:: void cvBoxPoints( CvBox2D box, CvPoint2D32f pt[4] )
:param box: The input rotated rectangle. It may be the output of .. ocv:function:: minAreaRect.

:param points: The output array of four vertices of rectangles.

The function finds the four vertices of a rotated rectangle. This function is useful to draw the rectangle. In C++, instead of using this function, you can directly use box.points() method. Please visit the `tutorial on bounding rectangle <http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.html#bounding-rects-circles>`_ for more information.


Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/src/connectedcomponents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ int cv::connectedComponentsWithStats(InputArray _img, OutputArray _labels, Outpu
const cv::Mat img = _img.getMat();
_labels.create(img.size(), CV_MAT_DEPTH(ltype));
cv::Mat labels = _labels.getMat();
connectedcomponents::CCStatsOp sop(statsv, centroids);
connectedcomponents::CCStatsOp sop(statsv, centroids);
if(ltype == CV_16U){
return connectedComponents_sub1(img, labels, connectivity, sop);
}else if(ltype == CV_32S){
Expand Down
16 changes: 8 additions & 8 deletions modules/imgproc/src/linefit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,14 +571,14 @@ static void fitLine3D( Point3f * points, int count, int dist,
for( j = 0; j < count; j++ )
w[j] = 1.f;
}

/* save the line parameters */
memcpy( _lineprev, _line, 6 * sizeof( float ));

/* Run again... */
fitLine3D_wods( points, count, w, _line );
}

if( err < min_err )
{
min_err = err;
Expand All @@ -595,27 +595,27 @@ void cv::fitLine( InputArray _points, OutputArray _line, int distType,
double param, double reps, double aeps )
{
Mat points = _points.getMat();

float linebuf[6]={0.f};
int npoints2 = points.checkVector(2, -1, false);
int npoints3 = points.checkVector(3, -1, false);

CV_Assert( npoints2 >= 0 || npoints3 >= 0 );

if( points.depth() != CV_32F || !points.isContinuous() )
{
Mat temp;
points.convertTo(temp, CV_32F);
points = temp;
}

if( npoints2 >= 0 )
fitLine2D( points.ptr<Point2f>(), npoints2, distType,
(float)param, (float)reps, (float)aeps, linebuf);
else
fitLine3D( points.ptr<Point3f>(), npoints3, distType,
(float)param, (float)reps, (float)aeps, linebuf);

Mat(npoints2 >= 0 ? 4 : 6, 1, CV_32F, linebuf).copyTo(_line);
}

Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/src/matchcontours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ double cv::matchShapes(InputArray contour1, InputArray contour2, int method, dou
default:
CV_Error( CV_StsBadArg, "Unknown comparison method" );
}

return result;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/imgproc/src/moments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static Moments contourMoments( const Mat& contour )
if( fabs(a00) > FLT_EPSILON )
{
double db1_2, db1_6, db1_12, db1_24, db1_20, db1_60;

if( a00 > 0 )
{
db1_2 = 0.5;
Expand Down Expand Up @@ -464,7 +464,7 @@ cv::Moments cv::moments( InputArray _src, bool binary )
m.m03 += mom[9] + y * (3. * mom[5] + y * (3. * mom[2] + ym));
}
}

completeMomentState( &m );
return m;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/src/pyramids.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ pyrDown_( const Mat& _src, Mat& _dst, int borderType )
CastOp castOp;
VecOp vecOp;

CV_Assert( ssize.width > 0 && ssize.height > 0 &&
CV_Assert( ssize.width > 0 && ssize.height > 0 &&
std::abs(dsize.width*2 - ssize.width) <= 2 &&
std::abs(dsize.height*2 - ssize.height) <= 2 );
int k, x, sy0 = -PD_SZ/2, sy = sy0, width0 = std::min((ssize.width-PD_SZ/2-1)/2 + 1, dsize.width);
Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/src/segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void cv::pyrMeanShiftFiltering( InputArray _src, OutputArray _dst,
double sr2 = sr * sr;
int isr2 = cvRound(sr2), isr22 = MAX(isr2,16);
int tab[768];


if( src0.type() != CV_8UC3 )
CV_Error( CV_StsUnsupportedFormat, "Only 8-bit, 3-channel images are supported" );
Expand Down
2 changes: 1 addition & 1 deletion modules/imgproc/test/test_color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ TEST(Imgproc_ColorBayer, regression)
Mat given = imread(string(ts->get_data_path()) + "/cvtcolor/bayer_input.png", IMREAD_GRAYSCALE);
Mat gold = imread(string(ts->get_data_path()) + "/cvtcolor/bayer_gold.png", IMREAD_UNCHANGED);
Mat result;

CV_Assert(given.data != NULL && gold.data != NULL);

cvtColor(given, result, CV_BayerBG2GRAY);
Expand Down
Loading

0 comments on commit 9b92545

Please sign in to comment.