run code in matlab 2013a !!!!

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);

답변 (1개)

Walter Roberson
Walter Roberson 2013년 12월 7일

0 개 추천

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

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);

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2013년 12월 7일

댓글:

2014년 2월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by