Solving K-means issue
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
Hi,
I'm trying to use K-means to segment and image and then working on the resulting mask to clean it up, but K-means doesn't seem to give a fixed output everytime the script is executed so I'm not able to work on the resulting images correctly. How do I ensure that the output remains the same everytime ?
댓글 수: 0
답변 (2개)
  Image Analyst
      
      
 2012년 11월 24일
        It should, unless you've varied something, like the image you're processing, or the initial set of means. Does your script ask the user for any input (like filename, etc.), or use any random numbers?
댓글 수: 2
  Image Analyst
      
      
 2012년 11월 24일
				Are you using some code or function from the Statistics Toolbox? I don't have that but if you edit your question to include it then maybe someone can reproduce it. Use a standard demo image that everybody has (because it ships with MATLAB) if you can.
  Walter Roberson
      
      
 2012년 11월 24일
        The k-means algorithm involves random cluster initialization unless you provide initial cluster centers.
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!