Wand mode() function – Python
The mode() function is an inbuilt function in the Python Wand ImageMagick library which is used to replace each pixel with the mathematical mode of the neighboring colors.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Coursemode(width, height)
Parameters: This function accepts two parameters as mentioned above and defined below:
- width: This parameter is used to store the number of neighboring pixels to include in mode.
- height: This is an optional parameter is used to store height of neighboring pixels. By default it is same as width.
Return Value: This function returns the Wand ImageMagick object.