首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏从流域到海域

    Stride Convolution

    Stride ? Stride,步长的意思,指的是filter移动的长度。 如上图,stride=2,filter的左边框从2移动到7,2个格子的长度,垂直移动的时候也要2个格子。

    54410发布于 2019-05-28
  • 来自专栏Visual Codex

    Image Stride

    而image stride这个概念正是描述真正每一行的像素的个数。具体的定义是:从一行的某一个像素,知道下一行相同的横坐标位置的像素,两者之间相差的像素个数值。 通常image stride 是比image width 数值要更大的。 ? 从图中我们可以看出,左边是image的width,右边阴影部分就是填充部分(padding)。

    1.3K40发布于 2021-02-24
  • 来自专栏米扑专栏

    Bitmap 之 getPixels() 的 stride

    看完后仍然对Stride解释中的"行间距"不太明白,去查了下Stride在英语中的原义,Stride在柯林斯中的英英释义如下: 1 If you stride somewhere, you walk stride意为"大踏步快速前进" 2 A stride is a long step which you take when you are walking or running.    stride在此做名词,意为"大步" 3 Someone's stride is their way of walking with long steps.   指代某人具体迈大步的方式. (注:stride绝对值要大于等于位图的宽度) 2 Stride is number of bytes used for storing one image row. (stride负数有何作用不知,存疑).另,pixels.length >= stride * height,否则会抛出ArrayIndexOutOfBoundsException异常 2 stride

    2.1K40发布于 2019-02-19
  • 来自专栏python3

    STRIDE】【3】安全威胁分析设计

    本文谈一下STRIDE数据流图的四个元素:外部实体、处理过程、存储、数据流 ----     为了描述方便,以下图为例进行说明,该数据流图是“斗医”系统解析业务配置规则的一个功能,即客户端启动系统时会通过

    1.2K30发布于 2020-01-08
  • 来自专栏网络安全攻防

    【SDL实践指南】STRIDE威胁建模

    基本介绍 STRIDE威胁建模是由微软提出的一种威胁建模方法,将威胁类型分为Spoofing(仿冒)、Tampering(篡改)、Repudiation(抵赖)、Information Disclosure (信息泄漏)、Denial of Service(拒绝服务)和Elevation of Privilege(权限提升)六种威胁构成,STRIDE威胁模型几乎可以涵盖目前绝大部分安全问题 常见术语 资产( 从而使攻击者能够在未授权的情况下访问或破坏系统 攻击(Attack):由某人或某些事物采取的针对资产的损害行为,这可能是有人根据威胁实施损害或利用漏洞采取的一些行为 对策(Countermeasure):解决威胁并降低风险的保障措施 建模流程 STRIDE 在数据流图中用箭头表示 安全人员与系统架构师及设计人员沟通了解设计详情并画出数据流图后还需要标注信任边界(Trust Boundary),针对简单的Web应用的数据流图如下: 识别潜在威胁 STRIDE 威胁建模方法已经明确了每个数据流图元素具有不同的威胁,其中外部实体只有仿冒(S)、抵赖(R)威胁,数据流只有篡改(T)、信息泄露(I)、拒绝服务(D)威胁,处理过程有所有六种(STRIDE)威胁,存储过程有篡改

    9.7K10编辑于 2023-03-29
  • 来自专栏韩曙亮的移动开发专栏

    【音视频原理】图像相关概念 ⑦ ( YUV 跨距 Stride 对齐 | YUV 跨距 概念 | YUV 跨距对齐 概念 | YUV 跨距 Stride 对齐示例 )

    1、YUV 跨距 概念 Stride 跨距 , 指的是 在 内存中 每行像素 占用的空间 , 由于 系统 对 图像有 跨距对齐 的要求 , 这个 Stride 跨距 可能 大于等于 实际的 图像像素 所占用的 16 = 10 字节 , 因此 还需要 额外补充 16 - 10 = 6 字节的填充字节 , 最终达到 638 * 3 + 6 = 1920 字节 ; 2、YUV 跨距对齐 概念 YUV 跨距 ( Stride ) 对齐 是 图像处理 过程中 内存对齐 概念 ; 在 处理 YUV 格式的 图像 时 , 系统 或 硬件设备 要求 , YUV 图像的 每一行 像素 , 在 内存空间 中 需要 进行对齐操作 ; Stride , 以达到 跨距对齐 要求 ; 被填充的字节 , 没有实际意义 , 不包含图像数据 ; 这个 " 内存对齐长度 " 可能是 16 字节 / 32 字节 / 64 字节 等 ; 二、 YUV 跨距 ( Stride

    1.5K10编辑于 2024-01-23
  • 来自专栏影像技术栈

    YUV图像里面的stride和plane的解释

    Image Stride(内存图像行跨度)stride可以翻译为:跨距stride指在内存中每行像素所占的空间。 写这段记录的目的就是想说这个stride的问题,所以在进行yuv420p,yuv420sp,等视频帧转换时一定要注意跨距stride这个参数。 Stride is also called pitch. illustration.Stride 就是这些扩展内容的名称,Stride 也被称作 Pitch,如果图像的每一行像素末尾拥有扩展内容,Stride 的值一定大于图像的宽度值,就像下图所示:Two , // Y stride of I420, in pixel int uv_stride, // U and V stride of I420, in pixel uint8

    5.7K60编辑于 2022-07-15
  • 来自专栏hank

    【分享】MPSoC VCU Ctrl-SW 2020.2 编码不同Stride的YUV文件

    opt.addInt("--input-stride", &gi_encoder_input_stride, "Stride in input YUV file."); 最后修改函数ReadOneFrameYuv 如果gi_encoder_input_stride不为0,则将gi_encoder_input_stride赋值给图像步长iYuvStride。 注意,YUV文件里图像步长(stride/pitch),要不小于内存里的图像步长(stride/pitch)。因此,测试时,同时使用了选项“--stride”和选项“--input-stride”。 /ctrlsw_encoder -cfg test-1920x1080-3840x1080.cfg --stride 3840 --input-stride 3840 有意思的是,结合选项“--stride ”、选项“--stride-height”、和选项“--input-stride”,相等于在编码前对图像实现了裁剪(crop)功能。

    1.2K30发布于 2021-05-20
  • 来自专栏又见苍岚

    错误 At least one stride in the given numpy array is negative, and tensors with negative strides are n

    在训练 Pytorch 网络时遇到错误 At least one stride in the given numpy array is negative, and tensors with negative # or image = np.flipud(image) 此类操作之后经过 Pytorch 的 Dataloader,读取tensor 时会报错 ValueError: At least one stride

    4.3K20编辑于 2022-08-09
  • 来自专栏C++

    C++23 中的 views::stride:让范围操作更灵活

    具体来说,给定一个范围和一个步长 n,views::stride 会生成一个新范围,其中包含原范围中每隔 n 个元素的一个元素。 实现细节views::stride 的实现基于 C++23 的范围库。它通过定义一个 stride_view 类模板来实现。 适用场景views::stride 在处理大规模数据时非常有用。例如,在图像处理中,我们可能需要以特定的步长遍历像素数据。views::stride 可以轻松实现这一点,而无需手动编写复杂的循环逻辑。 总结views::stride 是 C++23 中一个非常有用的范围适配器。它让范围操作更加灵活,可以轻松实现以固定步长提取元素。 如果你正在使用支持 C++23 的编译器,不妨尝试使用 views::stride 来简化你的代码。

    20500编辑于 2025-05-12
  • 来自专栏数据分析与挖掘

    【python实现卷积神经网络】卷积层Conv2D实现(带stride、padding)

    return (0, 0), (0, 0) # Pad so that the output shape is the same as input shape (given that stride filter_shape # Derived from: # output_height = (height + pad_h - filter_height) / stride + 1 # In this case output_height = height and stride = 1. , output_shape='same')函数 def image_to_column(images, filter_shape, stride, output_shape='same'): stride: int The stride length of the filters during the convolution over the input. """

    2.6K20发布于 2020-08-26
  • 来自专栏贾志刚-OpenCV学堂

    OpenCV中如何获取Mat类型中的步长stride及分析 C++实现

    作者博客: https://blog.csdn.net/yl_best 问题需求:获取Mat stride 如题,需要使用到Mat类型的步长stride。 先从本地读取一张图片,单步进去看到srcImage的属性如下图,有stride,也有width,height,channels等 ? 这两种方式 srcImage.stride or srcImage.stride() 都是不对的,编译器会报错 "Error:class "cv::Mat" has no member "stride" 看起来stride就是step,那如何获取step? 如何获取stride 代码很简单,就这样一句话srcImage.step ? 这个结构体重载了size_t的隐式类型转换,所以我们用srcImage.step就可以直接获取stride了。

    3.9K40发布于 2019-07-05
  • 来自专栏JNing的专栏

    python: 切片符号(slice notation)

    ] [seq[0], seq[stride], …, seq[-1] ] L[low::stride] [seq[low], seq[low+stride], …, seq[-1] ] L[:high:stride] [seq[0], seq[stride], …, seq[high-1]] L[low:high:stride] [seq[low], seq[low+stride [high::-stride] [seq[high], seq[high-stride], …, seq[0] ] L[:low:-stride] [seq[-1], seq[-1-stride stride], ..., seq[high-1]] # 逆序 assert L[::-stride] == [50, 30, 10] # [seq[-1], seq[-1-stride], L[high:low:-stride] == [40, 20] # [seq[high], seq[high-stride], ..., seq[low+1]]

    1.9K20发布于 2018-09-27
  • 来自专栏音视频技术学习笔记

    图像处理基础-拉普拉斯锐化

    tempData[pos - 4] - tempData[pos + 4] - tempData[pos + stride] - tempData[pos - 4 - stride] - tempData [pos + 4 - stride] - tempData[pos - 4 + stride] - tempData[pos + 4 + stride]), 0, 255); ] - tempData[pos - 4] - tempData[pos + 4] - tempData[pos + stride] - tempData[pos - 4 - stride] - tempData [pos + 4 - stride] - tempData[pos - 4 + stride] - tempData[pos + 4 + stride]), 0, 255); [pos + 4 - stride] - tempData[pos - 4 + stride] - tempData[pos + 4 + stride]), 0, 255); }

    2.2K20发布于 2020-10-29
  • 来自专栏全栈程序员必看

    小型电裁剪刀_手动裁剪

    >= 13.0) { stride_length = 64; } else { stride_length = 16; } if ((screenshots_width % stride_length = 0) { scale_plane1_stride = (screenshots_width / stride_length + 1) * stride_length; } int scale_plane2 */ scale_plane1_stride, /*uint8 *dst_u*/ scale_buffer_u, /*int dst_stride_u*/ scale_plane1_stride >> _stride, /*const uint8 *src_u*/ scale_buffer_u, /*int src_stride_u*/ scale_plane1_stride >> 1, /*const dst_y, /*int dst_stride_y*/ nv12_plane1_stride, /*uint8 *dst_uv*/ nv12_dst_uv, /*int dst_stride_uv*/

    2.1K20编辑于 2022-11-08
  • 来自专栏月梦·剑心的技术专栏

    Pytorch中现有网络模型的使用及修改

    =(1, 1), padding=(1, 1)) (1): ReLU(inplace=True) (2): Conv2d(64, 64, kernel_size=(3, 3), stride =0, dilation=1, ceil_mode=False) (5): Conv2d(64, 128, kernel_size=(3, 3), stride=(1, 1), padding= =(1, 1)) (8): ReLU(inplace=True) (9): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation= (11): ReLU(inplace=True) (12): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1) ) (13): ReLU(inplace=True) (14): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=

    1.5K40编辑于 2022-09-14
  • 来自专栏RTSP/RTMP直播相关

    同一路RTSP|RTMP流如何同时回调YUV和RGB数据实现渲染和算法分析

    _ = video_frame.width_ * 4;rgb_frame.stride1_ = 0;rgb_frame.stride2_ = 0;rgb_frame.stride3_ = 0;Int32 ,IntPtr src_u_plane, Int32 src_u_stride,IntPtr src_v_plane, Int32 src_v_stride,IntPtr dst_argb_plane, = scale_width;int scale_u_stride = (scale_width + 1) / 2;int scale_v_stride = scale_u_stride;int scale_y_size _ * 4;rgb_frame.stride1_ = 0;rgb_frame.stride2_ = 0;rgb_frame.stride3_ = 0;Int32 argb_size = rgb_frame.stride0 , scale_frame.plane1_, scale_u_stride, scale_frame.plane2_, scale_v_stride,rgb_frame.plane0_, rgb_frame.stride0

    33710编辑于 2024-08-11
  • 来自专栏RTSP/RTMP直播相关

    Android平台RTMP推送模块如何对接NV21、YV12、RGB、YUV等编码前数据

    , int v_stride, int u_stride, int rotation_degree); 3. * * @param uStride: u stride * * @param vStride: v stride * * @return {0} : y stride * * @param u_stride: u stride * * @param v_stride: v stride * * @return {0} if , int u_stride, int v_stride); 4. , int src_uv_stride, byte[] dst, int dst_y_stride, int dst_u_stride, int dst_v_stride,

    85120发布于 2021-11-12
  • 来自专栏计算机视觉理论及其实现

    基于slim的残差网络

    output_stride /= 4 net = resnet_utils.conv2d_same(net, 64, 7, stride=2, scope='conv1') output_stride:  如果没有,那么输出将在标称网络步长处计算。如果output_stride不为None,则指定请求的输入与输出空间分辨率之比。 * 4, 'depth_bottleneck': base_depth, 'stride': stride }])用于创建resnet_v1 bottleneck的Helper函数 stride:  块体的跨步,作为最后一个单元的跨步执行。所有其他单位都有stride=1。返回值:一个resnet_v1的bottleneck块。 , num_outputs, 3, stride=stride,padding='SAME')当输入的高度或宽度为偶数时,则不同,这就是我们添加当前函数的原因。

    1.8K30编辑于 2022-09-04
  • 来自专栏人工智能LeadAI

    ResNet原理及其在TF-Slim中的实现

    is not None and current_stride > output_stride: raise ValueError('The target output_stride cannot if output_stride is not None and current_stride == output_stride: net = block.unit_fn( net , depth_bottleneck=unit_depth_bottleneck, stride=unit_stride, rate=1) current_stride is not None and current_stride ! = output_stride: aise ValueError('The target output_stride cannot be reached.')

    1.5K70发布于 2018-03-12
领券