# imsegkmeans

## Description

uses name-value arguments to control aspects of the k-means clustering algorithm.`L`

= imsegkmeans(`I`

,`k`

,`Name,Value`

)

## Examples

## Input Arguments

## Output Arguments

## Tips

The function yields reproducible results. The output does not vary across multiple runs given the same input arguments.

The

`imsegkmeans`

function accepts input images in all supported color spaces. Using a different color space generates different results. If you do not receive satisfactory results for an input image, consider trying an alternative color space. For more information about color spaces in MATLAB^{®}, see Understanding Color Spaces and Color Space Conversion.To perform k-means clustering on images of data type

`double`

, convert the image to data type`single`

by using the`im2single`

function. For applications requiring input data of type`double`

, see the`kmeans`

(Statistics and Machine Learning Toolbox) function.

## References

[1]

## Version History

**Introduced in R2018b**

## See Also

### Apps

### Functions

`imsegkmeans3`

|`gabor`

|`imgaborfilt`

|`labeloverlay`

|`label2rgb`

|`superpixels`

|`lazysnapping`

|`watershed`

|`labelmatrix`