Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
search within matrix for assign certain values
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have 2 matrices,Dim_label and Dimensionss Dimentionss is Bounding box result of image, saved at dim.mat file while Dim_label is box dimensions saved as (x,y , width, Height) i.e. saved at gt.mat file as i want to find the Dimensionss boxes that locate inside the Dim_label boxes. if located the Dimensionss will get label so i try the following code
load gt.mat
load dim.mat
b=find(Dim_label(:,5)==2);
location=Dim_label(b,:)
%for x=1:size(Dimentionss,1)
moree=find(Dimentionss(:,1)>=Dim_label(b,1)&... % x values
Dimentionss(:,2)>=Dim_label(b,2)&...
Dimentionss(:,3)<=Dim_label(b,3)&...
Dimentionss(:,4)<=Dim_label(b,4))
Dimentionss(moree,5)=2
Dimentionss
i try on Dim_label(:,5)==2 but the process will be repeated for the whole non zero rows in gt.mat file the error in Dimentionss matrix that the fifth column assigned with 2. How could i fix??
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!