Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
d6678645
Commit
d6678645
authored
Oct 31, 2015
by
Oded Green
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a few more trailing white spaces
parent
54614941
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
estimated_covariance.hpp
...imgproc/include/opencv2/ximgproc/estimated_covariance.hpp
+4
-4
estimated_covariance.cpp
modules/ximgproc/src/estimated_covariance.cpp
+8
-9
No files found.
modules/ximgproc/include/opencv2/ximgproc/estimated_covariance.hpp
View file @
d6678645
...
...
@@ -65,12 +65,12 @@ window forumlation.
@param src The source image. Input image must be of a complex type.
@param windowRows The number of rows in the window.
@param windowCols The number of cols in the window.
The window size parameters control the accuracy of the estimation.
The sliding window moves over the entire image from the top-left corner
The window size parameters control the accuracy of the estimation.
The sliding window moves over the entire image from the top-left corner
to the bottom right corner. Each location of the window represents a sample.
If the window is the size of the image, then this gives the exact covariance matrix.
For all other cases, the sizes of the window will impact the number of samples
and the number of elements in the estimated covariance matrix.
For all other cases, the sizes of the window will impact the number of samples
and the number of elements in the estimated covariance matrix.
*/
CV_EXPORTS_W
void
covarianceEstimation
(
InputArray
src
,
OutputArray
dst
,
int
windowRows
,
int
windowCols
);
...
...
modules/ximgproc/src/estimated_covariance.cpp
View file @
d6678645
...
...
@@ -185,7 +185,7 @@ void EstimateCovariance::iterateCombinations(Mat inputData,Mat outputData)
#ifdef HAVE_OPENMP
#pragma omp parallel
#endif
#endif
{
int
idx
;
int
combs
;
...
...
@@ -193,7 +193,7 @@ void EstimateCovariance::iterateCombinations(Mat inputData,Mat outputData)
int
thread_id
=
omp_get_thread_num
();
#else
int
thread_id
=
0
;
#endif
#endif
int
startComb
;
if
(
remainder
>
thread_id
){
combs
=
combsPerCPU
;
...
...
@@ -216,7 +216,7 @@ void EstimateCovariance::iterateCombinations(Mat inputData,Mat outputData)
computeOneCombination
(
startComb
++
,
inputData
,
outputData
,
outputVector
,
finalMatPosR
,
finalMatPosC
);
}
delete
[]
finalMatPosR
;
delete
[]
finalMatPosR
;
delete
[]
finalMatPosC
;
}
}
...
...
@@ -258,7 +258,7 @@ void EstimateCovariance::computeOneCombination(int comb_id,Mat inputData, Mat ou
}
}
outputVector
.
at
<
std
::
complex
<
float
>
>
(
0
,
0
)
=
temp_res
;
// Checking if the first element belongs to the first set of combinatons.
// The combination that the first element is above the second.
if
(
!
type2
)
{
...
...
@@ -341,7 +341,7 @@ void EstimateCovariance::computeOneCombination(int comb_id,Mat inputData, Mat ou
std
::
complex
<
float
>
w
=
std
::
complex
<
float
>
(
0
,
0
),
x
=
std
::
complex
<
float
>
(
0
,
0
),
y
=
std
::
complex
<
float
>
(
0
,
0
),
z
=
std
::
complex
<
float
>
(
0
,
0
),
deltaRowSum
=
std
::
complex
<
float
>
(
0
,
0
);
std
::
complex
<
float
>
tempRes
=
std
::
complex
<
float
>
(
0
,
0
);
// Index arithmetic
// Index arithmetic
int
rM1
=
r
-
1
;
int
drPr
=
DR
+
r
;
int
rM1PdeltaR
=
rM1
+
deltaR
;
...
...
@@ -391,8 +391,8 @@ void covarianceEstimation(InputArray input_, OutputArray output_,int windowRows,
Mat
temp
=
input_
.
getMat
();
if
(
temp
.
channels
()
==
1
){
temp
.
convertTo
(
temp
,
CV_32FC2
);
Mat
zmat
=
Mat
::
zeros
(
temp
.
size
(),
CV_32F
);
temp
.
convertTo
(
temp
,
CV_32FC2
);
Mat
zmat
=
Mat
::
zeros
(
temp
.
size
(),
CV_32F
);
Mat
twoChannelsbefore
[]
=
{
temp
,
zmat
};
cv
::
merge
(
twoChannelsbefore
,
2
,
input
);
}
else
{
...
...
@@ -412,4 +412,4 @@ void covarianceEstimation(InputArray input_, OutputArray output_,int windowRows,
}
}
// namespace ximgproc
}
// namespace cv
\ No newline at end of file
}
// namespace cv
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment