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
9ee954a0
Commit
9ee954a0
authored
Nov 01, 2010
by
Ethan Rublee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made calibration a bit faster in the absense of a checkboard and trying to fix
a crash with the libv4l capture code
parent
40c05d84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
19 deletions
+26
-19
cap_libv4l.cpp
modules/highgui/src/cap_libv4l.cpp
+5
-3
calibration.cpp
samples/cpp/calibration.cpp
+21
-16
No files found.
modules/highgui/src/cap_libv4l.cpp
View file @
9ee954a0
...
...
@@ -1261,9 +1261,11 @@ static IplImage* icvRetrieveFrameCAM_V4L( CvCaptureCAM_V4L* capture, int) {
if
(
capture
->
is_v4l2_device
==
1
)
{
memcpy
((
char
*
)
capture
->
frame
.
imageData
,
(
char
*
)
capture
->
buffers
[
capture
->
bufferIndex
].
start
,
capture
->
frame
.
imageSize
);
if
(
capture
->
buffers
[
capture
->
bufferIndex
].
start
){
memcpy
((
char
*
)
capture
->
frame
.
imageData
,
(
char
*
)
capture
->
buffers
[
capture
->
bufferIndex
].
start
,
capture
->
frame
.
imageSize
);
}
}
else
#endif
/* HAVE_CAMV4L2 */
...
...
samples/cpp/calibration.cpp
View file @
9ee954a0
...
...
@@ -404,22 +404,27 @@ int main( int argc, char** argv )
flip
(
view
,
view
,
0
);
vector
<
Point2f
>
pointbuf
;
bool
found
=
findChessboardCorners
(
view
,
boardSize
,
pointbuf
,
CV_CALIB_CB_ADAPTIVE_THRESH
);
// improve the found corners' coordinate accuracy
cvtColor
(
view
,
viewGray
,
CV_BGR2GRAY
);
if
(
found
)
cornerSubPix
(
viewGray
,
pointbuf
,
Size
(
11
,
11
),
Size
(
-
1
,
-
1
),
TermCriteria
(
CV_TERMCRIT_EPS
+
CV_TERMCRIT_ITER
,
30
,
0.1
));
if
(
mode
==
CAPTURING
&&
found
&&
(
!
capture
.
isOpened
()
||
clock
()
-
prevTimestamp
>
delay
*
1e-3
*
CLOCKS_PER_SEC
)
)
{
imagePoints
.
push_back
(
pointbuf
);
prevTimestamp
=
clock
();
blink
=
capture
.
isOpened
();
}
if
(
found
)
drawChessboardCorners
(
view
,
boardSize
,
Mat
(
pointbuf
),
found
);
cvtColor
(
view
,
viewGray
,
CV_BGR2GRAY
);
bool
found
=
findChessboardCorners
(
view
,
boardSize
,
pointbuf
,
CV_CALIB_CB_ADAPTIVE_THRESH
&
CV_CALIB_CB_FAST_CHECK
&
CV_CALIB_CB_NORMALIZE_IMAGE
);
// improve the found corners' coordinate accuracy
if
(
found
)
cornerSubPix
(
viewGray
,
pointbuf
,
Size
(
11
,
11
),
Size
(
-
1
,
-
1
),
TermCriteria
(
CV_TERMCRIT_EPS
+
CV_TERMCRIT_ITER
,
30
,
0.1
));
if
(
mode
==
CAPTURING
&&
found
&&
(
!
capture
.
isOpened
()
||
clock
()
-
prevTimestamp
>
delay
*
1e-3
*
CLOCKS_PER_SEC
)
)
{
imagePoints
.
push_back
(
pointbuf
);
prevTimestamp
=
clock
();
blink
=
capture
.
isOpened
();
}
if
(
found
)
drawChessboardCorners
(
view
,
boardSize
,
Mat
(
pointbuf
),
found
);
string
msg
=
mode
==
CAPTURING
?
"100/100"
:
mode
==
CALIBRATED
?
"Calibrated"
:
"Press 'g' to start"
;
...
...
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