Flag CV_PCA_DATA_AS_COL missing in core.hpp (Bug #3874)
Description
For PCA the flags CV_PCA_DATA_AS_ROW and CV_PCA_DATA_AS_COL are located in core_c.h. Imho they should also be available from core.hpp without including core_c.h since PCA is a cpp method. Maybe this affects some more macros as well.
Sorry that I don't make a pull request on my own, I don't know where the best place is to add those macros.
Associated revisions
Merge pull request #3874 from paroj:calib_sample
History
Updated by Guanta Alecho over 10 years ago
I also noted that many macros in the current documentation are still named with the prefix CV_ although they don't exist anymore (which is not the case for the macros of PCA).
Updated by Steven Puttemans over 10 years ago
Actually afaik the current doc for 2.4.9 should still mention macros with the CV_ constant before while the macro's will also be available without the CV_. However in the 3.0 dev branch all CV_ prefixes are removed. This is one of the changes I noticed during making pull requests.
Can you show some examples of macro's that are wrong to your interpretation in the docs?
Updated by Guanta Alecho over 10 years ago
I've meant the trunk-documentation at http://docs.opencv.org/trunk, and maybe my statement was too bold, not 'many' but 'several' are still wrong or wrong documented. For example search for CV_ in the calib3d module and you'll find some, e.g. the flags for findFundamentalMat() don't have the prefix CV_ anymore in the code, but are still listed as this in the documentation. Probably one will find some more examples here.
However, my bug-report above actually points to a different issue (sorry, I should have opened another bug-report for the wrong documentation): here the old CV_ notion still exists but is in a different header, so actually one only needs to define the new macros without CV_ and replace all of these occurences.
Updated by Steven Puttemans over 10 years ago
Okidoki! The second problem I am somewhat missing, however the first should indeed be adressed.
Updated by Steven Puttemans over 10 years ago
And are you sure that it is really not there, I still find some of the parameters defined in code, for example these:
https://github.com/Itseez/opencv/blob/master/modules/calib3d/include/opencv2/calib3d/calib3d_c.h#L79
Updated by Guanta Alecho over 10 years ago
Yes they are there, but these are the macros for the "old" C-Api, which apparantly should be retained as is. So yes, if you include calib3d_c.h then you are fine, but actually one shouldn't need to do that but use the new-style-macros without the CV_ -prefix.
Updated by Steven Puttemans over 10 years ago
Aw okay I see your point. Basically it should be possible to manually add those headers to get the c support but you dont want the standard description use the C style macros.
Updated by Guanta Alecho over 10 years ago
Yes, the non-'CV_'-prefixed versions are just missing, maybe this part of the code just hasn't been revised yet. Currently, I bypass this by including the *c.h headers to get the old 'CV' macros.
Updated by Guanta Alecho over 10 years ago
Update: the findFundamentalMat has been updated during a recent pr, so I am outdated here...
Updated by Guanta Alecho over 10 years ago
Update: After digging more in the code, I found out that the new macros already exist, but are in a different namespace, one has to use cv::PCA::DATA_AS_COL and cv::PCA::DATA_AS_ROW, which is not very intuitive in comparison to the other macros which are always cv::MODULENAME_MACRONAME, so either this should be changed, or at least made be clear in the documentation.
- Status changed from New to Incomplete
Updated by Steven Puttemans over 10 years ago
I am guessing this is the biggest downside to the changes made. 3.0 still needs a big update on the documentation to be reasonable to work with in my opinion.
Feel free to make suggestions using pull requests! ;)
Updated by Vladislav Vinogradov over 10 years ago
- Category set to documentation
Updated by Maksim Shabunin almost 10 years ago
I think it can be called `fixed` after moving to doxygen: http://docs.opencv.org/master/d3/d8d/classcv_1_1PCA.html
- Status changed from Incomplete to Done
- Assignee set to Maksim Shabunin
- Target version set to 3.0