Realtime_multi-person_pose_estimation: Undefined function or variable 'maskApiMex'.

Created on 30 Aug 2018  路  3Comments  路  Source: ZheC/Realtime_Multi-Person_Pose_Estimation

Thanks for you share.

Ubuntu16.04, matlab2015
Whild run genCOCOMask.m

>> genCOCOMask
1/ 21634
2/ 21634
3/ 21634
4/ 21634
5/ 21634
6/ 21634
6/ 21634
Undefined function or variable 'maskApiMex'.

Error in MaskApi.decode (line 84)
      masks = maskApiMex( 'decode', Rs );

Error in genCOCOMask (line 48)
                    mask_crowd = logical(MaskApi.decode( coco_kpt(i).annorect(p).segmentation ));

Both gcc 5.4 and gcc 3.7 don't work.

@qinannan Here is the solution for windows: https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation/issues/199
But I use ubuntu, how to fix it?

Most helpful comment

I fixed it by
mex('CFLAGS=\$CFLAGS -Wall -std=c99','-largeArrayDims','private/maskApiMex.c','../common/maskApi.c','-I../common/','-outdir','private');

All 3 comments

I fixed it by
mex('CFLAGS=\$CFLAGS -Wall -std=c99','-largeArrayDims','private/maskApiMex.c','../common/maskApi.c','-I../common/','-outdir','private');

Hi, I got another error I can't understand what kind of syntax error there. I tried with / , , \ delimiter but it doesn't work. The expression 'mex' has red underline.

mex('CFLAGS=$CFLAGS -Wall -std=c99','-largeArrayDims','datasetCOCOcocoMatlabAPIprivatemaskApiMex.c','datasetCOCOcococommonmaskApi.c','-IdatasetCOCOcococommon','-outdir','datasetCOCOcocoMatlabAPIprivate');

The error shows>>
""
Error using MaskApi
Error: File: MaskApi.m Line: 69 Column: 5
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error.
To construct matrices, use brackets instead of parentheses.
""

I have solved the problem. I am able to generate mask. You should declare your mex expression under the specific function. Edit the MaskApi.m and placed the "mex(...........);" just after declared the function Rs and function masks...

methods( Static )
function Rs = encode( masks )
mex('CFLAGS=$CFLAGS -Wall...........................private');
Rs = maskApiMex( 'encode', masks );
end
function masks = decode( Rs )
mex('CFLAGS=$CFLAGS -Wall -std=c99'.....................private');
masks = maskApiMex( 'decode', Rs );

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yq1011 picture yq1011  路  21Comments

wuchichung picture wuchichung  路  3Comments

Robert0812 picture Robert0812  路  5Comments

RuWang15 picture RuWang15  路  12Comments

Zumbalamambo picture Zumbalamambo  路  3Comments