Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

for loop

Status
Not open for further replies.

susiechai

Computer
Joined
Nov 4, 2001
Messages
1
Location
MY
Hello,
I wrote the code for image processing purpose. First, i already labelled my image edges with number, let's say from 1 to 10. Next using the imfeature in Matlab, i want to find the centroid for each mass. The problem is, when i stated, edgeim==1, it found 2 centroid, and when i stated edgeim==2, it found 1 centroid. So, i replace this manual steps with a for loop, for i=1:2. The weird thing is, i get 12 centroid points instead of 3. Why ?? anyone can help ?

regards,
susie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top