Horizontal and vertical projection of an image

2 vues (au cours des 30 derniers jours)
Karan Ratnaparkhi
Karan Ratnaparkhi le 3 Avr 2011
Hi guys I want to project a binary black n white image in horizontal n vertical direction n den concatenate them plz help me with the matlab code.
  1 commentaire
bym
bym le 3 Avr 2011
what do you mean by project in the horizontal & vertical direction and then concatenate?

Connectez-vous pour commenter.

Réponse acceptée

Jan
Jan le 3 Avr 2011
The question is not clear. Perhaps this helps:
img = rand(100, 100) < 0.1;
h_projection = any(img, 2);
v_projection = any(img, 1);
cat_projection = cat(1, h_projection, v_projection(:));
Using SUM instead of ANY might be an option also.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by