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
9344d0d0
Commit
9344d0d0
authored
Nov 21, 2018
by
berak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
highgui: restore convertscale semantics in window_w32.cpp
parent
a4ab6092
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
window_w32.cpp
modules/highgui/src/window_w32.cpp
+9
-19
No files found.
modules/highgui/src/window_w32.cpp
View file @
9344d0d0
...
@@ -1154,7 +1154,6 @@ cvShowImage( const char* name, const CvArr* arr )
...
@@ -1154,7 +1154,6 @@ cvShowImage( const char* name, const CvArr* arr )
int
channels
=
0
;
int
channels
=
0
;
void
*
dst_ptr
=
0
;
void
*
dst_ptr
=
0
;
const
int
channels0
=
3
;
const
int
channels0
=
3
;
int
origin
=
0
;
CvMat
stub
,
*
image
;
CvMat
stub
,
*
image
;
bool
changed_size
=
false
;
// philipg
bool
changed_size
=
false
;
// philipg
...
@@ -1171,9 +1170,6 @@ cvShowImage( const char* name, const CvArr* arr )
...
@@ -1171,9 +1170,6 @@ cvShowImage( const char* name, const CvArr* arr )
if
(
!
window
||
!
arr
)
if
(
!
window
||
!
arr
)
EXIT
;
// keep silence here.
EXIT
;
// keep silence here.
if
(
CV_IS_IMAGE_HDR
(
arr
))
origin
=
((
IplImage
*
)
arr
)
->
origin
;
CV_CALL
(
image
=
cvGetMat
(
arr
,
&
stub
));
CV_CALL
(
image
=
cvGetMat
(
arr
,
&
stub
));
#ifdef HAVE_OPENGL
#ifdef HAVE_OPENGL
...
@@ -1212,21 +1208,15 @@ cvShowImage( const char* name, const CvArr* arr )
...
@@ -1212,21 +1208,15 @@ cvShowImage( const char* name, const CvArr* arr )
{
{
cv
::
Mat
src
=
cv
::
cvarrToMat
(
image
);
cv
::
Mat
src
=
cv
::
cvarrToMat
(
image
);
cv
::
Mat
dst
(
size
.
cy
,
size
.
cx
,
CV_8UC3
,
dst_ptr
,
(
size
.
cx
*
channels
+
3
)
&
-
4
);
cv
::
Mat
dst
(
size
.
cy
,
size
.
cx
,
CV_8UC3
,
dst_ptr
,
(
size
.
cx
*
channels
+
3
)
&
-
4
);
if
(
src
.
channels
()
==
1
)
{
cv
::
Mat
tmp
;
cv
::
cvtColor
(
src
,
dst
,
cv
::
COLOR_GRAY2BGR
);
int
src_depth
=
src
.
depth
();
cv
::
flip
(
dst
,
dst
,
0
);
double
scale
=
src_depth
<=
CV_8S
?
1
:
src_depth
<=
CV_32S
?
1.
/
256
:
255
;
}
double
shift
=
src_depth
==
CV_8S
||
src_depth
==
CV_16S
?
128
:
0
;
else
if
(
src
.
channels
()
==
4
)
cv
::
convertScaleAbs
(
src
,
tmp
,
scale
,
shift
);
{
cv
::
cvtColor
(
tmp
,
dst
,
cv
::
COLOR_BGRA2BGR
,
dst
.
channels
());
cv
::
cvtColor
(
src
,
dst
,
cv
::
COLOR_BGRA2BGR
);
cv
::
flip
(
dst
,
dst
,
0
);
cv
::
flip
(
dst
,
dst
,
0
);
}
else
{
CV_Assert
(
src
.
channels
()
==
3
);
cv
::
flip
(
src
,
dst
,
0
);
}
CV_Assert
(
dst
.
data
==
(
uchar
*
)
dst_ptr
);
CV_Assert
(
dst
.
data
==
(
uchar
*
)
dst_ptr
);
}
}
...
...
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