当前位置:网站首页>关于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
边栏推荐
猜你喜欢

PR training notes

Upload labs for file upload - white box audit

JS prototype chain

Precautions for lvgl v8.2 string display on keil MDK (take little bear pie as an example)

吃一个女富豪的瓜。。。

Computer USB, HDMI, DP various interfaces and speeds

持续进阶,软通动力稳步推动云智能战略

Spark's action operator

睡了二哥。。。

Network counting 01 physical layer
随机推荐
The stock position building rate of global funds and asset management reached a new low in 15 years
2022.02.15_ Daily question leetcode six hundred and ninety
SQL learning notes (03) -- data constraint relationship
利用闭包实现私有变量
Computer USB, HDMI, DP various interfaces and speeds
The "China Mobile Chain" state secret engine was officially launched on BSN
直播管理项目
MT7628K eCos开发入门
The latest masterpiece of Alibaba, which took 182 days to produce 1015 pages of distributed full stack manual, is so delicious
Who has the vision to cross the cycle?
Voice service notes
Tree structure -- binary tree 2 non recursive traversal
High precision factorial
Nacos service configuration and persistence configuration
计网01-物理层
JS use toString to distinguish between object and array
ES6 const essence and completely immutable implementation (object.free)
Tearful eyes, it's not easy to change jobs. Three rounds of interviews, four hours of soul torture
scratch大鱼吃小鱼 电子学会图形化编程scratch等级考试二级真题和答案解析2022年6月
Latex插入的eps图片模糊解决方法