{"action":"closed","issue":{"number":22,"created_at":"2011-08-19T04:17:13Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hi,\r\n\r\nI am using Matlab R2011a and openCV 2.3.1 on a MacBook Pro (os x 10.6.8).\r\n\r\nI successfully  compiled the mex files as detailed here: https://github.com/zk00006/OpenTLD/wiki/Installation.\r\n\r\nHowever, at runtime, I received the following error:\r\n\r\n---------\r\n??? Unexpected Standard exception from MEX file.\r\nWhat() is:/Users/liam/projects/OpenCV-2.3.1/modules/core/src/matrix.cpp:1305:\r\nerror: (-27) create() called for the missing output array in function create\r\n\r\n\r\n\r\nError in ==> tldTracking at 30\r\nxFJ    = lk(2,tld.img{I}.input,tld.img{J}.input,xFI,xFI); % track all points by\r\nLucas-Kanade tracker from frame I to frame J, estimate Forward-Backward error,\r\nand NCC for each point\r\n\r\nError in ==> tldProcessFrame at 25\r\n[tBB tConf tValid tld] = tldTracking(tld,tld.bb(:,I-1),I-1,I); % frame-to-frame\r\ntracking (MedianFlow)\r\n\r\nError in ==> tldExample at 41\r\n    tld = tldProcessFrame(tld,i); % process frame i\r\n\r\nError in ==> run_TLD at 43\r\n[bb,conf] = tldExample(opt);\r\n\r\n---------\r\n\r\nI tracked the problem down to line 186 of lk.cpp, and changed the line from:\r\n\r\n\r\n\t\t\tcvCalcOpticalFlowPyrLK( IMG[J], IMG[I], PYR[J], PYR[I], points[1], points[2], nPts, cvSize(win_size,win_size), Level, 0     , 0, cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS,20,0.03), CV_LKFLOW_INITIAL_GUESSES | CV_LKFLOW_PYR_A_READY | CV_LKFLOW_PYR_B_READY );\r\n\r\nto:\r\n\r\n\r\n\t\t\tcvCalcOpticalFlowPyrLK( IMG[J], IMG[I], PYR[J], PYR[I], points[1], points[2], nPts, cvSize(win_size,win_size), Level, status     , 0, cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS,20,0.03), CV_LKFLOW_INITIAL_GUESSES | CV_LKFLOW_PYR_A_READY | CV_LKFLOW_PYR_B_READY );\r\n\r\ni.e. changed the 10th argument from '0' to 'status', and this solved the problem.\r\n\r\nHope this helps.","comments":1,"title":"Issue with lk.cpp on mac os x, and openCV 2.3.1","updated_at":"2011-10-26T12:55:37Z","url":"https://api.github.com/repos/zk00006/OpenTLD/issues/22","id":1438568,"assignee":null,"milestone":null,"closed_at":"2011-10-26T12:55:37Z","user":{"gravatar_id":"c60ee73e7521e8ce0d747e46af614805","avatar_url":"https://secure.gravatar.com/avatar/c60ee73e7521e8ce0d747e46af614805?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/le-vision","id":989758,"login":"le-vision"},"html_url":"https://github.com/zk00006/OpenTLD/issues/22","labels":[],"state":"closed"},"legacy":{"number":22,"action":"closed","issue":1438568}}