Find the columns where a certain number is repeated consecutively
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Yaisel Córdova Chávez
il 14 Apr 2021
Modificato: Yaisel Córdova Chávez
il 21 Apr 2021
I have a matrix of ones and zeros of an Image (690 x 1100)
I need to find the columns where at least 50 zeros are repeated.
Can someone help me?
2 Commenti
Risposta accettata
Jonas
il 18 Apr 2021
quick and dirty small example
a=[ 1 1 1 0 1;...
0 1 1 0 1;...
0 0 1 1 1;...
0 1 1 1 1];
nrOfMinZerosPerCol=2;
colsWithRepetitions=~all(conv2(a,ones(nrOfMinZerosPerCol,1),'valid'),1);
1 Commento
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!