函数 | 变量
ConvertPixelType 命名空间参考

函数

def press_any_key_exit ()
 

变量

 SDKVersion = MvCamera.MV_CC_GetSDKVersion()
 
 deviceList = MV_CC_DEVICE_INFO_LIST()
 
 tlayerType = MV_GIGE_DEVICE | MV_USB_DEVICE
 
 ret = MvCamera.MV_CC_EnumDevices(tlayerType, deviceList)
 
 mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents
 
string strModeName = ""
 
tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)
 
tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)
 
tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)
 
tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)
 
string strSerialNumber = ""
 
 nConnectionNum = input("please input the number of the device to connect:")
 
 cam = MvCamera()
 
 stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents
 
 nPacketSize = cam.MV_CC_GetOptimalPacketSize()
 
 stParam = MVCC_INTVALUE()
 
 nPayloadSize = stParam.nCurValue
 
tuple data_buf = (c_ubyte * nPayloadSize)()
 
int nRGBSize = stDeviceList.nWidth * stDeviceList.nHeight*3
 
 stConvertParam = MV_CC_PIXEL_CONVERT_PARAM()
 
 nWidth
 
 nHeight
 
 pSrcData
 
 nSrcDataLen
 
 enSrcPixelType
 
 enDstPixelType
 
 pDstBuffer
 
 nDstBufferSize
 
string file_path = "AfterConvert_RGB.raw"
 
 file_open = open(file_path.encode('ascii'), 'wb+')
 
tuple img_buff = (c_ubyte * stConvertParam.nDstLen)()
 

函数说明

◆ press_any_key_exit()

def ConvertPixelType.press_any_key_exit ( )

变量说明

◆ SDKVersion

◆ deviceList

deviceList = MV_CC_DEVICE_INFO_LIST()

◆ tlayerType

tlayerType = MV_GIGE_DEVICE | MV_USB_DEVICE

◆ ret

◆ mvcc_dev_info

mvcc_dev_info = cast(deviceList.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents

◆ strModeName

string strModeName = ""

◆ nip1

tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)

◆ nip2

tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)

◆ nip3

tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)

◆ nip4

tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)

◆ strSerialNumber

string strSerialNumber = ""

◆ nConnectionNum

nConnectionNum = input("please input the number of the device to connect:")

◆ cam

cam = MvCamera()

◆ stDeviceList

stDeviceList = cast(deviceList.pDeviceInfo[int(nConnectionNum)], POINTER(MV_CC_DEVICE_INFO)).contents

◆ nPacketSize

◆ stParam

stParam = MVCC_INTVALUE()

◆ nPayloadSize

nPayloadSize = stParam.nCurValue

◆ data_buf

tuple data_buf = (c_ubyte * nPayloadSize)()

◆ nRGBSize

int nRGBSize = stDeviceList.nWidth * stDeviceList.nHeight*3

◆ stConvertParam

stConvertParam = MV_CC_PIXEL_CONVERT_PARAM()

◆ nWidth

nWidth

◆ nHeight

nHeight

◆ pSrcData

pSrcData

◆ nSrcDataLen

nSrcDataLen

◆ enSrcPixelType

enSrcPixelType

◆ enDstPixelType

enDstPixelType

◆ pDstBuffer

pDstBuffer

◆ nDstBufferSize

nDstBufferSize

◆ file_path

string file_path = "AfterConvert_RGB.raw"

◆ file_open

file_open = open(file_path.encode('ascii'), 'wb+')

◆ img_buff

tuple img_buff = (c_ubyte * stConvertParam.nDstLen)()