Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

search within matrix for assign certain values

3 vues (au cours des 30 derniers jours)
Rana Sobhy
Rana Sobhy le 5 Nov 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
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??

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by