Image.draw_point#
- Image.draw_point(pos: tuple[int, int] | ndarray, marker: str = '+', text: str | None = None, **kwargs: Any) None[source][source]#
Draw a marker in image
- Parameters:
pos (array_like(2), ndarray(2,n), list of 2-tuples) – position of marker
marker (str, optional) – marker character, defaults to “+”
text (str, optional) – text label, defaults to None
kwargs – parameters passed to
draw_point
Example:
>>> from machinevisiontoolbox import Image >>> img = Image.Read("monalisa.png") >>> img.draw_point((270,194), "+", "eye", fontsize=1, color="yellow") !! [RUNBLOCK-ERROR] machinevisiontoolbox/ImageCore.py:17 > - Expected Ptr<cv::UMat> for argument 'img' >>> img.draw_point((293,246), "*", "nose", fontsize=1, color="blue") !! [RUNBLOCK-ERROR] machinevisiontoolbox/ImageCore.py:17 > - Expected Ptr<cv::UMat> for argument 'img' >>> img.disp() <matplotlib.image.AxesImage object at 0x7f076e8b9490>
Note
If
imagehas multiple planes thencolorshould have the same number of elements as the image has planes. If it is a scalar that value is used for each color plane. For a color imagecolorcan be a string color name.- Seealso: