ArduCAM / ArduCAM_USB_Camera_Shield

This is the repository for ArduCAM USB Camera Shield
126 stars 69 forks source link

Arducam demo on Window with Python3 #49

Open dgalland opened 5 years ago

dgalland commented 5 years ago

Hello, I try the python3 arducam streaming demo on windows X64 First: to be able to import ArducamSDK you have to rename ArducamSDK.cp36-win_amd64.pyd to ArducamSDK.pyd Second: It seems (verified with dumpbin) that ArducamSDK.cp36-win_amd64.pyd try to load python36.dll and doesnt not work wit python 3.7 It would be convenient to have also the 3.7 version Best regards Dominique Galland

dgalland commented 5 years ago

After downgrading to python 3.6 i was able to run the python 3 demo but I have error FF25 USB_CAMERA_FRAME_INDEX_ERROR and FF24 USB_CAMERA_DATA_LEN_ERROR. I use the MT9F001 camera wiht the MT9F001_14MP.json configuration file. The CPP demos USBtest and opencv (with the same configuration file) are working. Dominique Galland

dgalland commented 5 years ago

I compared line by line the ArduCamCfg structure between the cpp version and the python version. It works with python if I change two members

Bad: cfg = {"u32CameraType":0x4D091031, "u32Width":Width,"u32Height":Height, "usbType":0, "u8PixelBytes":1, "u16Vid":0, "u32Size":0, "u8PixelBits":BitWidth, "u32I2cAddr":I2cAddr, "emI2cMode":I2CMode, "emImageFmtMode":FmtMode, "u32TransLvl":32 }

Good: cfg = {"u32CameraType":0, "u32Width":Width,"u32Height":Height, "usbType":0, "u8PixelBytes":1, "u16Vid":0, "u32Size":0, "u8PixelBits":BitWidth, "u32I2cAddr":I2cAddr, "emI2cMode":I2CMode, "emImageFmtMode":FmtMode, "u32TransLvl":0 }

I dont know the meaning of those undocumented parameters. Dominique Galland