How to do if else condition?
Ältere Kommentare anzeigen
Hello,
Anyone have idea how to do if else condition?
I have pixel value of AA(i,j)<507x507 double> and BB(i,j)<512x512 double>. I want to do if value of AA(i,j) and BB(i,j) exceed 15 (>15) it will return to "Th" if not it will return to "Offset".
>>(i,j) is row and column for pixel value of an image.
I hope u understand what i need since i am beginner in Matlab and image processing.
4 Kommentare
Walter Roberson
am 11 Mai 2013
What is "Th" ? What is "Offset" ?
Image Analyst
am 11 Mai 2013
Bearbeitet: Image Analyst
am 11 Mai 2013
Do you care that A and B are different sizes? What do you plan on doing when i and j are 508 to 512 and you can check only on B, not A?
See my image segmentation tutorial : http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. It's helpful to beginners.
Walter Roberson
am 14 Mai 2013
507:507 means the list of numbers starting from 507, incrementing by 1, until 507 is reached, and so would be equivalent to just 507 itself.
If you are trying to preallocate A, then
A = zeros(507, 507);
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Color Segmentation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!