当前位置: 首页 > news >正文

重庆门户网站推广方案网络营销网站推广方法

重庆门户网站推广方案,网络营销网站推广方法,只会html wordpress,建设部网站施工合同范本Overview 对于二值图像来说#xff0c;每个像素点的值只有类似0/1的两种可能性#xff0c;一般为0(黑)/255(白)。 如果两个像素点位置相邻且取值相同#xff0c;那么这两个像素点即处于同一个相互连通的区域内。 从视觉上看#xff0c;彼此连通的点形成了一个区域#…Overview 对于二值图像来说每个像素点的值只有类似0/1的两种可能性一般为0(黑)/255(白)。  如果两个像素点位置相邻且取值相同那么这两个像素点即处于同一个相互连通的区域内。  从视觉上看彼此连通的点形成了一个区域而该区域中所有连通点构成的集合我们称之为一个连通区域。 在图像中每个像素当以自身为中心时周围一般存在8个邻接像素。  在判断两个像素是否属于同一连通区域时根据邻接关系通常存在两种判定方法4连通或8连通。  4连通只考虑4个邻接像素即上下左右如下左图所示  8连通则总共考虑8个邻接像素额外还包括了对角线位置的点如下右图所示。  值得注意的是二值连通区域还具有简单而特殊的传递性  如果像素点A与像素点B同值并邻接我们称A与B连通易得  如果A与B连通B与C连通则A亦与C连通。 一个连通区域可能包含很多个像素点而如果将同一个连通区域的所有像素点都用同一个数值/符号来进行标记这个过程就成为连通区域标记。 Label SciKit-Image是一种Python下的图像处理工具包scikit-image — Image processing in PythonOfficial Site  在skimage包中使用measure子模块下的label函数即可实现连通区域标记。  参数input表示需要处理的二值图像connectivity表示判定连通的模式1代表4连通2代表8连通输出labels为一个从0开始的标记数组。 skimage.measure.label(input, neighbors None, background None, return_num False, connectivity None)[source] Parameters:  input : Image to label [ndarray of dtype int]  neighbors : Deprecated, use connectivity instead [{4, 8}, int, optional]  background : Consider all pixels with this value as background pixels, and label them as 0. By default, 0-valued pixels are considered as background pixels. [int, optional]  return_num : Whether to return the number of assigned labels [bool, optional]  connectivity : Maximum number of orthogonal hops to consider a pixel/voxel as a neighbor. Accepted values are ranging from 1 to input.ndim. If None, a full connectivity of input.ndim is used. [int, optional]  Returns:  labels : Labeled array, where all connected regions are assigned the same integer value. [ndarray of dtype int]  num : Number of labels, which equals the maximum label index and is only returned if return_num is True. [int, optional] Examples: import numpy as npx np.eye(3).astype(int)print(x) [[1 0 0][0 1 0][0 0 1]]print(label(x, connectivity 1)) [[1 0 0][0 2 0][0 0 3]]print(label(x, connectivity 2)) [[1 0 0][0 1 0][0 0 1]]print(label(x, background -1)) [[1 2 2][2 1 2][2 2 1]]x np.array([[1, 0, 0], ...               [1, 1, 5], ...               [0, 0, 0]])print(label(x)) [[1 0 0][1 1 2][0 0 0]] Properties 此外使用measure子模块中的regionprops()函数可以很方便地对每一个连通区域进行属性获取和操作比如计算面积、外接矩形、凸包面积等等。  计算结果返回为所有连通区域的属性列表列表长度为连通区域个数第i个连通区域的attribute属性可以通过properties[i].attribute获取。 skimage.measure.regionprops(label_image, intensity_image None, cache True)[source] Parameters:  label_image : Labeled input image. Labels with value 0 are ignored. [(N, M) ndarray]  intensity_image : Intensity (i.e., input) image with same size as labeled image. Default is None. [(N, M) ndarray, optional]  cache : Determine whether to cache calculated properties. The computation is much faster for cached properties, whereas the memory consumption increases. [bool, optional]  Returns:  properties : Each item describes one labeled region, and can be accessed using the attributes listed below. [list of RegionProperties] Property Keys: The following properties can be accessed as attributes or keys: area: [int] Number of pixels of region. 该区域面积。 bbox: [tuple] Bounding box (min_row, min_col, max_row, max_col). Pixels belonging to the bounding box are in the half-open interval [min_row; max_row) and [min_col; max_col). 区域的边界框坐标。 bbox_area: [int] Number of pixels of bounding box. 区域边界框内的矩形面积。 centroid: [array] Centroid coordinate tuple (row, col).  convex_area: [int] Number of pixels of convex hull image. 凸包内像素点总数 convex_image: [(H, J) ndarray] Binary convex hull image which has the same size as bounding box.  coords: [(N, 2) ndarray] Coordinate list (row, col) of the region.  eccentricity: [float] Eccentricity of the ellipse that has the same second-moments as the region. The eccentricity is the ratio of the focal distance (distance between focal points) over the major axis length. The value is in the interval [0, 1). When it is 0, the ellipse becomes a circle. 离心率 equivalent_diameter: [float] The diameter of a circle with the same area as the region. 和区域面积相同的圆的直径 euler_number: [int] Euler characteristic of region. Computed as number of objects ( 1) subtracted by number of holes (8-connectivity). 区域欧拉数 extent: [float] Ratio of pixels in the region to pixels in the total bounding box. Computed as area / (rows * cols) 区域面积和边界外接框面积的比率 filled_area: [int] Number of pixels of filled region. 区域和外接框之间填充的像素点总数 filled_image: [(H, J) ndarray] Binary region image with filled holes which has the same size as bounding box.  image: [(H, J) ndarray] Sliced binary region image which has the same size as bounding box. 原图  得到的image如下图所示 inertia_tensor: [(2, 2) ndarray] Inertia tensor of the region for the rotation around its mass.  inertia_tensor_eigvals: [tuple] The two eigen values of the inertia tensor in decreasing order.  intensity_image: [ndarray] Image inside region bounding box.  label: [int] The label in the labeled input image.  local_centroid: [array] Centroid coordinate tuple (row, col), relative to region bounding box.  major_axis_length: [float] The length of the major axis of the ellipse that has the same normalized second central moments as the region. 椭圆的主轴长度 max_intensity: [float] Value with the greatest intensity in the region. 区域内强度最大值 mean_intensity: [float] Value with the mean intensity in the region. 区域内平均强度值 min_intensity: [float] Value with the least intensity in the region. 区域内强度最小值 minor_axis_length: [float] The length of the minor axis of the ellipse that has the same normalized second central moments as the region. 椭圆的短轴长度 moments: [(3, 3) ndarray] Spatial moments up to 3rd order:  m_ji sum{ array(x, y) * x^j * y^i }  where the sum is over the x, y coordinates of the region.  moments_central: [(3, 3) ndarray] Central moments (translation invariant) up to 3rd order:  mu_ji sum{ array(x, y) * (x - x_c)^j * (y - y_c)^i }  where the sum is over the x, y coordinates of the region, and x_c and y_c are the coordinates of the region’s centroid.  moments_hu: [tuple] Hu moments (translation, scale and rotation invariant).  moments_normalized: [(3, 3) ndarray] Normalized moments (translation and scale invariant) up to 3rd order:  nu_ji mu_ji / m_00^[(ij)/2 1]  where m_00 is the zeroth spatial moment.  orientation: [float] Angle between the X-axis and the major axis of the ellipse that has the same second-moments as the region. Ranging from -pi/2 to pi/2 in counter-clockwise direction. 椭圆的X轴和长轴之间的夹角与区域具有相同的二阶矩。从-pi/2到pi/2的逆时针方向范围 perimeter: [float] Perimeter of object which approximates the contour as a line through the centers of border pixels using a 4-connectivity. 区域周长 solidity: [float] Ratio of pixels in the region to pixels of the convex hull image. 区域像素与凸包图像像素的比值 weighted_centroid: [array] Centroid coordinate tuple (row, col) weighted with intensity image.  weighted_local_centroid: [array] Centroid coordinate tuple (row, col), relative to region bounding box, weighted with intensity image.  weighted_moments: [(3, 3) ndarray] Spatial moments of intensity image up to 3rd order:  wm_ji sum{ array(x, y) * x^j * y^i }  where the sum is over the x, y coordinates of the region.  weighted_moments_central: [(3, 3) ndarray] Central moments (translation invariant) of intensity image up to 3rd order:  wmu_ji sum{ array(x, y) * (x - x_c)^j * (y - y_c)^i }  where the sum is over the x, y coordinates of the region, and x_c and y_c are the coordinates of the region’s weighted centroid.  weighted_moments_hu: [tuple] Hu moments (translation, scale and rotation invariant) of intensity image.  weighted_moments_normalized: [(3, 3) ndarray] Normalized moments (translation and scale invariant) of intensity image up to 3rd order:  wnu_ji wmu_ji / wm_00^[(ij)/2 1]  where wm_00 is the zeroth spatial moment (intensity-weighted area). Examples: from skimage import data, utilfrom skimage.measure import labelimg util.img_as_ubyte(data.coins()) 110label_img label(img, connectivity img.ndim)props regionprops(label_img)# centroid of first labeled objectprops[0].centroid (22.729879860483141, 81.912285234465827)# centroid of first labeled objectprops[0][centroid] (22.729879860483141, 81.912285234465827) Reference [1] skimage.measure.label — skimage v0.13dev docs  [2] skimage.measure.regionprops — skimage v0.13dev docs  [3] python数字图像处理18高级形态学处理  [4] 图像分析二值图像连通域标记
http://www.w-s-a.com/news/313416/

相关文章:

  • 华宁网站建设设计公司 网站
  • 简历网站免费怎么查在哪个网站做的备案
  • 响应式网站 价格网站用哪些系统做的比较好用
  • 高端网站案例360做的网站
  • 瑞安地区建设网站公众号开发者工具是干嘛的
  • 请解释网站开发的主要流程.wordpress主体上传
  • 网站方案组成要素饰品公司网站建设方案
  • 网站改版被降权赣州景文网络科技有限公司
  • 吉林省网站建设推广图片模版
  • 如何做网站热力图佛山 网站关键词优化
  • 个人网站建设论文中期报告申报网站建设理由 模板
  • 岫岩做网站软件开发和app开发的区别
  • 邯郸质量一站式服务平台上线如何做国外销售网站
  • 内蒙古工程建设协会网站sem优化策略
  • Linux网站建设总结建设电子商务平台
  • 公司网站背景图片课程网站如何建设
  • 用js做简单的网站页面互联网技术对人力资源管理的影响有哪些
  • 银川做网站贵德县wap网站建设公司
  • 深圳网站建设zvge山西省煤炭基本建设局网站
  • 佛山网页网站设计线上怎么做推广和宣传
  • 多个域名绑定同一个网站案例
  • 建设网站都需要准备什么代理加盟微信网站建设
  • 网站备案没有了wordpress 添加按钮
  • 湖南建设银行宣传部网站福田蒙派克空调滤芯安装位置图
  • wap网站搜索wordpress工作室模板
  • 青岛金融网站建设如何提交网站地图
  • 制作简单门户网站步骤网站建设论文的摘要
  • 可以直接进入网站的正能量照片学做静态网站
  • 织梦做社交网站合适吗网站的市场如何制作
  • 阳曲网站建设价格多少四川佳和建设工程网站