run code in matlab 2013a !!!!
1 次查看(过去 30 天)
显示 更早的评论
hi
This code runs in the matlab 2009a version. But the code does not run in the matlab 2013a version, and error messages are.
url site:
http://groups.inf.ed.ac.uk/calvin/articulated_human_pose_estimation_code/
code :
http://groups.inf.ed.ac.uk/calvin/articulated_human_pose_estimation_code/downloads/pose_estimation_code_release_v1.21.tgz
error:
Segmenting detection 0 343 27 242 217 0 0 0 2
Class: ubf
Error using .*
Integers can only be combined with integers of the same class, or scalar doubles.
Error in pm2segms (line 74)
segm(p).all = segm(p).all + segm(p).regs(:,:,rix)*rix;
Error in SegmentTrack (line 53)
T.PM(dix).segm(:,:,p) = pm2segms(UncompressPM(T.PM(dix)), class_id, pars, verbose);
Error in PoseEstimStillImage (line 42)
T.PM = SegmentTrack(fullfile(base_dir, img_dir),img_fname_format, T, segm_params, [base_dir
'/segms_' classname], verbose);
0 个评论
回答(1 个)
Walter Roberson
2013-12-7
I deduce from that message that in the expression segm(p).regs(:,:,rix)*rix that rix must be an integer data type, such as int32, and that segm(p).regs must be a different integer data type, such as uint8
At the MATLAB command line give the command
dbstop if error
and run the program. When it stops, have it display
class(rix)
class(segm(p).regs)
class(segm(p).all)
1 个评论
Charence
2014-2-14
Yes, I get the following output:
>> class(rix)
ans = uint8
>> class(segm(p).regs)
ans = logical
>> class(segm(p).all)
ans = double
The issue seems to be with *rix, so I changed it to this, which seems to solve the problem:
segm(p).all = segm(p).all + segm(p).regs(:,:,rix)*double(rix);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Identification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!