run code in matlab 2013a !!!!

5 visualizaciones (últimos 30 días)
jafar
jafar el 7 de Dic. de 2013
Comentada: Charence el 14 de Feb. de 2014
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);

Respuestas (1)

Walter Roberson
Walter Roberson el 7 de Dic. de 2013
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 comentario
Charence
Charence el 14 de Feb. de 2014
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);

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by