imageptr是什么?
答案:3 悬赏:20
解决时间 2021-12-30 00:46
- 提问者网友:敏感魔鬼
- 2021-12-29 21:09
imageptr是个什么类?
最佳答案
- 二级知识专家网友:情战辞言
- 2021-12-29 21:46
使用image.ptr可以得到图像任意行的首地址;
例如uchar*data=image.ptr<uchar>(j),则它返回给uchar*data的值就是image的第j行的首地址
例如uchar*data=image.ptr<uchar>(j),则它返回给uchar*data的值就是image的第j行的首地址
全部回答
- 1楼网友:闲懒诗人
- 2021-12-29 23:30
你好!
使用image.ptr可以得到图像任意行的首地址;
例如uchar*data=image.ptr(j),则它返回给uchar*data的值就是image的第j行的首地址
我的回答你还满意吗~~
- 2楼网友:无字情书
- 2021-12-29 22:27
公共职能AutoColorPoise ( mBitmap作为今晨, AutoInfo作为标签)作为布尔
点心我作为长,强,只要
点心JumpLines只要,只要JumpBits , StepLines只要,只要StepBits
点心MeanColor ( 0到2 )作为单一, SumColor ( 0到2 )只要,双边投资条约,只要,只要GreyColor
点心RedTable ( 0到255 ) ,只要, GreenTable ( 0到255 ) ,只要, BlueTable ( 0到255 ) ,只要
点心RedValue只要, GreenValue只要,只要BlueValue
点心dWidth只要,只要dHeight ,扫描,只要,只要SizeImage
点心dPtr只要
dWidth = mBitmap.mWidth - 1 : dHeight = mBitmap.mHeight - 1
SizeImage = mBitmap.SizeImage
扫描= mBitmap.Scanline
dPtr = mBitmap.ImagePtr
JumpLines =国际( dHeight / 1500 ) *扫描
StepLines =国际( dHeight / 1500 ) + 1
JumpBits =国际( dWidth / 1500 ) * 4 + 4
StepBits =国际( dWidth / 1500 ) + 1
p4Byte0Ptr ( 0 ) = dPtr
我= 0 dHeight步StepLines
强= 0 dWidth步StepBits
SumColor ( 0 ) = SumColor ( 0 ) + p4Byte0 ( 0 )
SumColor ( 1 ) = SumColor ( 1 ) + p4Byte0 ( 1 )
SumColor ( 2 ) = SumColor ( 2 ) + p4Byte0 ( 2 )
钻头钻头+ 1 =
p4Byte0Ptr ( 0 ) = p4Byte0Ptr ( 0 ) + JumpBits
下一步j
p4Byte0Ptr ( 0 ) = p4Byte0Ptr ( 0 ) + JumpLines
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯