Closed ywwyewenwei closed 5 years ago
Hey, Actually I've made a decision to remove the debug build configuration from the main project because it was simply too slow. I didn't find it useful and as such I didn't want to maintain it. Even in release mode basic breakpoints can provide some basic insight (though not all data is available there). I think that it shouldn't be too much work to recreate the debug configuration based on the release configuration.
Hi Tomasz, You are doing a great job! I built the DEBUG configuration just for learnning. I am using VS2017 and OpenCV 4.01.
1. If I add a preprocessor 'OPENCV_TRAITS_ENABLE_DEPRECATED', the DEBUG configuration can be compiled normally. otherwise, Some errors will be generated in the follow function:
template<typename _Tp> inline
_Tp& Mat::at(int i0, int i1)
{
CV_DbgAssert(dims <= 2);
CV_DbgAssert(data);
CV_DbgAssert((unsigned)i0 < (unsigned)size.p[0]);
CV_DbgAssert((unsigned)(i1 * DataType<_Tp>::channels) < (unsigned)(size.p[1] * channels()));
CV_DbgAssert(CV_ELEM_SIZE1(traits::Depth<_Tp>::value) == elemSize1());
return ((_Tp*)(data + step.p[0] * i0))[i1];
}
The error is: Error C2039 'channels': is not a member of 'cv::DataType<_Tp>' .
2. After I added the preprocessor 'OPENCV_TRAITS_ENABLE_DEPRECATED', I built the project and run it with '-type features' param successfully, and so as the two Python scripts.
But, When run it with '-type example' param, the under line will throw a exception:
**CV_DbgAssert(CV_ELEM_SIZE1(traits::Depth<_Tp>::value) == elemSize1());**
Should I bypass this exception?
Thanks a lot.
The calling stack is :
cv::Mat::at<FaceLandmarking::Math::Vector
I'm also using VS 2017, but an older version of OpenCV 3.3.1
(as I've started working on this project quite some time ago).
But I'm not sure if it's actually a version related problem.
It seems that by default OpneCV supports processing of its built in types only. And I'm storing in the matrix object of my own class Math::Vector<float>
, which doesn't have required traits.
Here is an openCV thread regarding this problem: https://stackoverflow.com/questions/7195649/opencv-matrix-of-user-defined-type
Does this project work for you in the release mode with the -example
flag? That would help us determine if it's just an assertion the can be bypassed or is it a real compatibility problem.
Hi,Tomasz
Yes! The project can work.
And I added a little function to OpenCV:
template
Please tell me how to improve precision?Especially on side face. You can see some landmarks below:
Pressing space bar (when using the -example option) should perform one step of mask adjustment.
Niedz., 24.03.2019, 00:44 użytkownik ywwyewenwei notifications@github.com napisał:
Please tell me how to improve precision?Especially on side face. You can see some landmarks below: [image: image] https://user-images.githubusercontent.com/46886131/54873013-8df72500-4e08-11e9-87d5-d20501849596.png [image: image] https://user-images.githubusercontent.com/46886131/54873015-94859c80-4e08-11e9-9b29-9a365079b9f3.png [image: image] https://user-images.githubusercontent.com/46886131/54873016-9a7b7d80-4e08-11e9-9c54-b53421102b7c.png [image: image] https://user-images.githubusercontent.com/46886131/54873017-a0715e80-4e08-11e9-9dab-a47fe126cada.png [image: image] https://user-images.githubusercontent.com/46886131/54873020-a6673f80-4e08-11e9-9299-08499764289b.png [image: image] https://user-images.githubusercontent.com/46886131/54873021-ac5d2080-4e08-11e9-8e1b-9275acbbc1d4.png
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TomaszRewak/Face-Landmarking/issues/1#issuecomment-475914464, or mute the thread https://github.com/notifications/unsubscribe-auth/AFh2pBvl1IhfJorprB4WT6inW4HmRLp0ks5vZrxqgaJpZM4b9Z-F .
Thanks a lot.
Thanks for taking your time to play with my project. If you have any more question, feel free to ask.
Hi,I can not build this project with DEBUG option, I am using VS2017.