-
Notifications
You must be signed in to change notification settings - Fork 0
Problem with substitution #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
| #ifndef OPENCV_GAPI_OPENCV_INCLUDES_HPP | ||
| #define OPENCV_GAPI_OPENCV_INCLUDES_HPP | ||
|
|
||
| #if !defined(GAPI_STANDALONE) | ||
| #if !defined(GAPI_STANDALONE) // | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. opencv_includes.hpp - fork for include files. |
||
| # include <opencv2/core/mat.hpp> | ||
| # include <opencv2/core/cvdef.h> | ||
| # include <opencv2/core/types.hpp> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,13 +11,12 @@ | |
| #if defined(GAPI_STANDALONE) | ||
| #include <opencv2/gapi/own/types.hpp> // cv::gapi::own::Rect/Size/Point | ||
| #include <opencv2/gapi/own/scalar.hpp> // cv::gapi::own::Scalar | ||
|
|
||
| #include <opencv2/gapi/gmat.hpp> // call opencv_includes.hpp, that call cvdefs.hpp, that call gmat.hpp, ... | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is first way with include<gmat.hpp> for descr_of function. |
||
| // Simulate OpenCV definitions taken from various | ||
| // OpenCV interface headers if G-API is built in a | ||
| // standalone mode. | ||
|
|
||
| // interface.h: | ||
|
|
||
| typedef unsigned char uchar; | ||
| typedef char schar; | ||
|
|
||
|
|
@@ -139,15 +138,23 @@ enum InterpolationFlags{ | |
| INTER_LINEAR_EXACT = 5, | ||
| INTER_MAX = 7, | ||
| }; | ||
|
|
||
| // struct GMatDesc; // another way - without include gmat.hpp | ||
|
|
||
| // replacement of cv's structures: | ||
| namespace gapi { namespace own { | ||
| class Mat; | ||
| // GMatDesc descr_of(const Mat &mat); // another way: error-> conflicts with a previous declaration in gmat.hpp | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another way - we don't include gmat.hpp. We put a function prototype.
|
||
| }} // namespace gapi::own | ||
|
|
||
| using gapi::own::descr_of; // with include gmat.hpp it has not been declared | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We get error ‘fluidcv::gapi::own::descr_of’ has not been declared |
||
|
|
||
| using Rect = gapi::own::Rect; | ||
| using Size = gapi::own::Size; | ||
| using Point = gapi::own::Point; | ||
| using Scalar = gapi::own::Scalar; | ||
| using Mat = gapi::own::Mat; | ||
|
|
||
| } // namespace cv | ||
|
|
||
| static inline int cvFloor( double value ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we get error: conflicts with a previous declaration (212 str.).
We include opencv_includes.hpp (cvdefs.hpp in STANDALONE) in gmat.hpp.
cvdefs.hpp:
cv::gapi::own::descr_of(const gapi::own::Mat &)gmat.hpp:
cv::descr_of(const gapi::own::Mat &)It is logical, but i can't put declaration of function under STANDALONE flag in cvdefs.