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
24dcfa1a
Commit
24dcfa1a
authored
May 29, 2011
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed confusing CvCapture::queryFrame(); rewritten cvQueryFrame() (ticket #235)
parent
534ac83b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
21 deletions
+5
-21
cap.cpp
modules/highgui/src/cap.cpp
+5
-1
cap_qtkit.mm
modules/highgui/src/cap_qtkit.mm
+0
-19
precomp.hpp
modules/highgui/src/precomp.hpp
+0
-1
No files found.
modules/highgui/src/cap.cpp
View file @
24dcfa1a
...
...
@@ -73,7 +73,11 @@ CV_IMPL void cvReleaseCapture( CvCapture** pcapture )
CV_IMPL
IplImage
*
cvQueryFrame
(
CvCapture
*
capture
)
{
return
capture
?
capture
->
queryFrame
()
:
0
;
if
(
!
capture
)
return
0
;
if
(
!
capture
->
grabFrame
())
return
0
;
return
capture
->
retrieveFrame
(
0
);
}
...
...
modules/highgui/src/cap_qtkit.mm
View file @
24dcfa1a
...
...
@@ -99,7 +99,6 @@ public:
~CvCaptureCAM();
virtual bool grabFrame();
virtual IplImage* retrieveFrame(int);
virtual IplImage* queryFrame();
virtual double getProperty(int property_id);
virtual bool setProperty(int property_id, double value);
virtual int didStart();
...
...
@@ -142,7 +141,6 @@ public:
~CvCaptureFile();
virtual bool grabFrame();
virtual IplImage* retrieveFrame(int);
virtual IplImage* queryFrame();
virtual double getProperty(int property_id);
virtual bool setProperty(int property_id, double value);
virtual int didStart();
...
...
@@ -294,18 +292,6 @@ IplImage* CvCaptureCAM::retrieveFrame(int) {
return [capture getOutput];
}
IplImage* CvCaptureCAM::queryFrame() {
while (!grabFrame()) {
cout << "WARNING: Couldn't grab new frame from camera!!!" << endl;
/*
cout << "Attempting to restart camera; set capture property DISABLE_AUTO_RESTART to disable." << endl;
stopCaptureDevice();
startCaptureDevice(camNum);
*/
}
return retrieveFrame(0);
}
void CvCaptureCAM::stopCaptureDevice() {
NSAutoreleasePool* localpool = [[NSAutoreleasePool alloc] init];
...
...
@@ -781,11 +767,6 @@ IplImage* CvCaptureFile::retrieveFrame(int) {
return retrieveFramePixelBuffer();
}
IplImage* CvCaptureFile::queryFrame() {
grabFrame();
return retrieveFrame(0);
}
double CvCaptureFile::getFPS() {
if (mCaptureSession == nil) return 0;
NSAutoreleasePool* localpool = [[NSAutoreleasePool alloc] init];
...
...
modules/highgui/src/precomp.hpp
View file @
24dcfa1a
...
...
@@ -98,7 +98,6 @@ struct CvCapture
virtual
bool
setProperty
(
int
,
double
)
{
return
0
;
}
virtual
bool
grabFrame
()
{
return
true
;
}
virtual
IplImage
*
retrieveFrame
(
int
)
{
return
0
;
}
virtual
IplImage
*
queryFrame
()
{
return
grabFrame
()
?
retrieveFrame
(
0
)
:
0
;
}
virtual
int
getCaptureDomain
()
{
return
CV_CAP_ANY
;
}
// Return the type of the capture object: CV_CAP_VFW, etc...
};
...
...
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