ggplot2 linetypes

The different line types available in R software are : “blank”, “solid”, “dashed”, “dotted”, “dotdash”, “longdash”, “twodash”.

在这里插入图片描述plot.margin 画布控制顺序为上、右、下、左:
plot.margin=unit(c(0,2,0,0),units=‘cm’))

`cv2.drawContours`是OpenCV库中的一个函数,用于在图像上绘制轮廓。它的语法如下: ```csharp Cv2.DrawContours(Mat image, IEnumerable<IEnumerable<Point>> contours, int contourIdx, Scalar color, int thickness = 1, LineTypes lineType = LineTypes.Link8, Mat hierarchy = null, int maxLevel = int.MaxValue, Point offset = null) ``` 参数解释: - `image`:要在其上绘制轮廓的图像。 - `contours`:包含轮廓点的列表。每个轮廓都是一个点的列表。 - `contourIdx`:要绘制的轮廓的索引。如果为负数,则绘制所有轮廓。 - `color`:绘制轮廓的颜色。 - `thickness`:轮廓线的粗细。默认值为1。 - `lineType`:轮廓线的类型。默认为8连通线。 - `hierarchy`:可选参数,轮廓的层次结构。 - `maxLevel`:可选参数,绘制轮廓的最大层级。 - `offset`:可选参数,轮廓的偏移量。 以下是一个使用`cv2.drawContours`函数绘制轮廓的示例: ```csharp var markers = new Mat(markerMask.Size(), MatType.CV_32S, s: Scalar.All(0)); var componentCount = 0; var contourIndex = 0; while (contourIndex >= 0) { Cv2.DrawContours(markers, contours, contourIndex, color: Scalar.All(componentCount + 1), thickness: -1, lineType: LineTypes.Link8, hierarchy: hierarchyIndexes, maxLevel: int.MaxValue); componentCount++; contourIndex = hierarchyIndexes[contourIndex].Next; } ``` 请注意,上述示例中的变量`markerMask`、`contours`和`hierarchyIndexes`需要根据实际情况进行定义和赋值。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值