当前位置:网站首页>关于OpenCV中图像的widthStep
关于OpenCV中图像的widthStep
2022-07-01 09:40:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
在OpenCV的IplImage指针结构中,有一个成员widthStep,这个值如何来确定呢,最近让我头疼了好久,终于想明白了,现在
拿出来跟大家交流一下,不知道我的想法对吗,起码在我验证时没有出错。
widthStep应该等于width*3,但是由于4字节对齐问题,有时候需要在一行的末尾需要填充1-3个字节,这时候widthStep>width*3。
因此, widthStep的值的计算有两种情况:
1.当(width*3)%4=0,这时width*3=widthStep;
2.当(width*3)%4 !=0,此时widthStep=(width/4+1)*3。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/131768.html原文链接:https://javaforall.cn
边栏推荐
猜你喜欢

奇怪,为什么ArrayList初始化容量大小为10?

How to realize the usage of connecting multiple databases in idel

Packetdrill script analysis guide

JS原型链

微信表情符号写入判决书,你发的OK、炸弹都可能成为“呈堂证供”

Implementation and application of queue

JS scope chain and closure

Tree structure -- binary tree 2 non recursive traversal

嵌入式开发用到的一些工具

Nacos service configuration and persistence configuration
随机推荐
delete和delete[]引发的问题
node. How to implement the SQL statement after JS connects to the database?
项目采购管理
Cortex M4 systick details
我喜欢两个男人。。。
直播管理项目
架构实战营 毕业总结
button按钮清除边框
123. how to stop a thread?
Sd-wan notes
SQL学习笔记(01)——数据库基本知识
IPv6 learning notes
Postgraduate entrance examination vocabulary 2023 sharing (1)
Click the screen with your finger to simulate F11 and enter the full screen
Introduction to expressions and operators in C language
Differences between JS valueof and toString
phpexcel 里 获取某一列的列表 获取某一列的字母
Precautions for lvgl v8.2 string display on keil MDK (take little bear pie as an example)
JS variable lifting
How to realize the usage of connecting multiple databases in idel