Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
ce2f4c6a
Commit
ce2f4c6a
authored
Aug 02, 2011
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propagated fix for EXR from 2.3 branch to trunk
parent
f0b3cb18
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
stat.cpp
modules/core/src/stat.cpp
+4
-3
grfmt_base.hpp
modules/highgui/src/grfmt_base.hpp
+1
-1
grfmt_exr.cpp
modules/highgui/src/grfmt_exr.cpp
+9
-0
grfmt_exr.hpp
modules/highgui/src/grfmt_exr.hpp
+1
-0
No files found.
modules/core/src/stat.cpp
View file @
ce2f4c6a
...
...
@@ -736,9 +736,10 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
InputArray
_mask
)
{
Mat
src
=
_src
.
getMat
(),
mask
=
_mask
.
getMat
();
int
depth
=
src
.
depth
();
int
depth
=
src
.
depth
()
,
cn
=
src
.
channels
()
;
CV_Assert
(
src
.
channels
()
==
1
&&
(
mask
.
empty
()
||
mask
.
type
()
==
CV_8U
)
);
CV_Assert
(
(
cn
==
1
&&
(
mask
.
empty
()
||
mask
.
type
()
==
CV_8U
))
||
(
cn
>=
1
&&
mask
.
empty
()
&&
!
minIdx
&&
!
maxIdx
)
);
MinMaxIdxFunc
func
=
minmaxTab
[
depth
];
CV_Assert
(
func
!=
0
);
...
...
@@ -752,7 +753,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
double
dminval
=
DBL_MAX
,
dmaxval
=
-
DBL_MAX
;
size_t
startidx
=
1
;
int
*
minval
=
&
iminval
,
*
maxval
=
&
imaxval
;
int
planeSize
=
(
int
)
it
.
size
;
int
planeSize
=
(
int
)
it
.
size
*
cn
;
if
(
depth
==
CV_32F
)
minval
=
(
int
*
)
&
fminval
,
maxval
=
(
int
*
)
&
fmaxval
;
...
...
modules/highgui/src/grfmt_base.hpp
View file @
ce2f4c6a
...
...
@@ -63,7 +63,7 @@ public:
int
width
()
const
{
return
m_width
;
};
int
height
()
const
{
return
m_height
;
};
int
type
()
const
{
return
m_type
;
};
virtual
int
type
()
const
{
return
m_type
;
};
virtual
bool
setSource
(
const
string
&
filename
);
virtual
bool
setSource
(
const
Mat
&
buf
);
...
...
modules/highgui/src/grfmt_exr.cpp
View file @
ce2f4c6a
...
...
@@ -96,6 +96,13 @@ void ExrDecoder::close()
}
}
int
ExrDecoder
::
type
()
const
{
return
CV_MAKETYPE
((
m_isfloat
?
CV_32F
:
CV_32S
),
m_iscolor
?
3
:
1
);
}
bool
ExrDecoder
::
readHeader
()
{
bool
result
=
false
;
...
...
@@ -174,7 +181,9 @@ bool ExrDecoder::readHeader()
bool
ExrDecoder
::
readData
(
Mat
&
img
)
{
m_native_depth
=
CV_MAT_DEPTH
(
type
())
==
img
.
depth
();
bool
color
=
img
.
channels
()
>
1
;
uchar
*
data
=
img
.
data
;
int
step
=
img
.
step
;
bool
justcopy
=
m_native_depth
;
...
...
modules/highgui/src/grfmt_exr.hpp
View file @
ce2f4c6a
...
...
@@ -66,6 +66,7 @@ public:
ExrDecoder
();
~
ExrDecoder
();
int
type
()
const
;
bool
readData
(
Mat
&
img
);
bool
readHeader
();
void
close
();
...
...
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