derricw / pysentech

Python Interface for Sentech USB Cameras
MIT License
5 stars 1 forks source link

Error with SDK v3.12 python 2.7 #4

Open BuuP opened 5 years ago

BuuP commented 5 years ago

Hi, I tried to save an image using the SDK v3.12 I can read camera settings. But when I tried to save a frame as an image it gives me the following error:

 File "...\pysentech\frame.py", line 120, in to_file
    0):
 WindowsError: exception: access violation reading  0x00000000106DB000

Also I tried converting a frame to a numpy array, and got this error:

File "...\pysentech\frame.py", line 83, in as_array
    return (c_ubyte * int(self.height*self.bpi) *

AttributeError: class must define a '_length_' attribute, which must be a positive integer

Please let know if there is a way to fix this.

derricw commented 5 years ago

Could you let me know a few things: Specifically, your camera model and pixel format?

BuuP commented 5 years ago

Camera model : STC-MCCM200U3V Pixel format : 4 (got this by reading camera settings) For more info, below is the product link

http://www.sentechamerica.com/En/Cameras/USB/STC-MCCM200U3V

derricw commented 5 years ago

Thanks I'll try to take a look tonight. I have really only tested this package with SDK 3.08. I'll see if I can get 3.12 to work.