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
70bb857c
Commit
70bb857c
authored
Aug 13, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ff90c3eb
d525362c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
grfmt_jpeg.cpp
modules/highgui/src/grfmt_jpeg.cpp
+3
-4
camshift.cpp
modules/video/src/camshift.cpp
+8
-4
No files found.
modules/highgui/src/grfmt_jpeg.cpp
View file @
70bb857c
...
...
@@ -382,12 +382,11 @@ bool JpegDecoder::readData( Mat& img )
bool
result
=
false
;
int
step
=
(
int
)
img
.
step
;
bool
color
=
img
.
channels
()
>
1
;
JpegState
*
state
=
(
JpegState
*
)
m_state
;
if
(
state
&&
m_width
&&
m_height
)
if
(
m_
state
&&
m_width
&&
m_height
)
{
jpeg_decompress_struct
*
cinfo
=
&
state
->
cinfo
;
JpegErrorMgr
*
jerr
=
&
state
->
jerr
;
jpeg_decompress_struct
*
cinfo
=
&
((
JpegState
*
)
m_state
)
->
cinfo
;
JpegErrorMgr
*
jerr
=
&
((
JpegState
*
)
m_state
)
->
jerr
;
JSAMPARRAY
buffer
=
0
;
if
(
setjmp
(
jerr
->
setjmp_buffer
)
==
0
)
...
...
modules/video/src/camshift.cpp
View file @
70bb857c
...
...
@@ -96,8 +96,8 @@ cvMeanShift( const void* imgProb, CvRect windowIn,
}
cur_rect
.
width
=
MAX
(
cur_rect
.
width
,
1
);
cur_rect
.
height
=
MAX
(
cur_rect
.
height
,
1
);
cvGetSubRect
(
mat
,
&
cur_win
,
cur_rect
);
cvGetSubRect
(
mat
,
&
cur_win
,
cur_rect
);
cvMoments
(
&
cur_win
,
&
moments
);
/* Calculating center of mass */
...
...
@@ -240,7 +240,7 @@ cvCamShift( const void* imgProb, CvRect windowIn,
if
(
length
<
width
)
{
double
t
;
CV_SWAP
(
length
,
width
,
t
);
CV_SWAP
(
cs
,
sn
,
t
);
theta
=
CV_PI
*
0.5
-
theta
;
...
...
@@ -275,7 +275,7 @@ cvCamShift( const void* imgProb, CvRect windowIn,
if
(
_comp
)
*
_comp
=
comp
;
if
(
box
)
{
box
->
size
.
height
=
(
float
)
length
;
...
...
@@ -300,6 +300,10 @@ cv::RotatedRect cv::CamShift( InputArray _probImage, Rect& window,
{
CvConnectedComp
comp
;
CvBox2D
box
;
box
.
center
.
x
=
box
.
center
.
y
=
0
;
box
.
angle
=
0
;
box
.
size
.
width
=
box
.
size
.
height
=
0
;
comp
.
rect
.
x
=
comp
.
rect
.
y
=
comp
.
rect
.
width
=
comp
.
rect
.
height
=
0
;
Mat
probImage
=
_probImage
.
getMat
();
CvMat
c_probImage
=
probImage
;
cvCamShift
(
&
c_probImage
,
window
,
(
CvTermCriteria
)
criteria
,
&
comp
,
&
box
);
...
...
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