{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/99","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/99/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/99/events","html_url":"https://github.com/mshabunin/test2/issues/99","id":95403593,"number":99,"title":"Samples find_obj_ferns.cpp Assertion Failed","user":{"login":"mshabunin","id":3304494,"avatar_url":"https://avatars.githubusercontent.com/u/3304494?v=3","gravatar_id":"","url":"https://api.github.com/users/mshabunin","html_url":"https://github.com/mshabunin","followers_url":"https://api.github.com/users/mshabunin/followers","following_url":"https://api.github.com/users/mshabunin/following{/other_user}","gists_url":"https://api.github.com/users/mshabunin/gists{/gist_id}","starred_url":"https://api.github.com/users/mshabunin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshabunin/subscriptions","organizations_url":"https://api.github.com/users/mshabunin/orgs","repos_url":"https://api.github.com/users/mshabunin/repos","events_url":"https://api.github.com/users/mshabunin/events{/privacy}","received_events_url":"https://api.github.com/users/mshabunin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mshabunin/test2/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20samples","name":"category: samples","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/priority:%20normal","name":"priority: normal","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-16T10:25:22Z","updated_at":"2015-07-16T10:25:22Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/1744\r\n```\n|| D T on 2012-04-03 08:52\n|| Priority: Normal\n|| Affected: None\n|| Category: samples\n|| Tracker: Bug\n|| Difficulty: None\n|| PR: None\n|| Platform: None / None\n```\n\nSamples find_obj_ferns.cpp Assertion Failed\n-----------\n```\nI'm using OpenCV trunk r7809, Windows Xp, VS2008, find_obj_ferns.cpp with no edits\r\n\r\nIt crashes after training the ferns model, but before it could write the ferns model to the xml file. \r\n\r\nThe assertion message is:\r\nOpenCV Error: Assertion failed (!fixedType() || (CV_MAT_CN(type) == m.channels()\r\n && ((1 << CV_MAT_TYPE(flags)) & fixedDepthMask) != 0)) in unknown function, fil\r\ne ..\\..\\..\\modules\\core\\src\\matrix.cpp, line 1324\r\n\r\nThe call stack is as follows:\r\nfind_obj_ferns.exe!cv::error(const cv::Exception & exc={...})  Line 475\tC++\r\nfind_obj_ferns.exe!cv::_OutputArray::create(int dims=2, const int * size=0x0150ed78, int type=6, int i=-1, bool allowTransposed=false, int fixedDepthMask=0)  Line 1324 + 0xfe bytes\tC++\r\nfind_obj_ferns.exe!cv::log(const cv::_InputArray & _src={...}, const cv::_OutputArray & _dst={...})  Line 1802 + 0x26 bytes\tC++\r\nfind_obj_ferns.exe!cv::FernClassifier::finalize(cv::RNG & __formal={...})  Line 1113 + 0x31 bytes\tC++\r\nfind_obj_ferns.exe!cv::FernClassifier::trainFromSingleView(const cv::Mat & image={...}, const std::vector<cv::KeyPoint,std::allocator<cv::KeyPoint> > & keypoints=[100]({pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=32.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=32.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size= an,...), int _patchSize=32, int _signatureSize=100, int _nstructs=100, int _structSize=11, int _nviews=10000, int _compressionMethod=0, const cv::PatchGenerator & patchGenerator={...})  Line 1010 + 0x16 bytes\tC++\r\nfind_obj_ferns.exe!cv::PlanarObjectDetector::train(const std::vector<cv::Mat,std::allocator<cv::Mat> > & pyr=[2]({flags=1124024320 dims=2 rows=223 ...},{flags=1124024320 dims=2 rows=112 ...}), const std::vector<cv::KeyPoint,std::allocator<cv::KeyPoint> > & keypoints=[100]({pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=32.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size=32.000000 angle=-1.0000000 ...},{pt={...} size=64.000000 angle=-1.0000000 ...},{pt={...} size= an,...), int patchSize=32, int nstructs=100, int structSize=11, int nviews=10000, const cv::LDetector & detector={...}, const cv::PatchGenerator & patchGenerator={...})  Line 1506 + 0x47 bytes\tC++\r\nfind_obj_ferns.exe!main(int argc=1, char * * argv=0x01a77270)  Line 86\tC++\n```\n\nHistory\n-------"}}