0

Hello everyone after trying SimpleCV with a AVT Pike Firewire camera (see here) I have been having trouble getting AVTCamera to work. Using the example on SimpleCV's page about using the AVT package I get a return error Class AVTCamera not found. I have reinstalled SimpleCV, and everything else seems to work. I am using the legacy drivers like was suggested by the wiki, but for some reason I cannot get this to work, has anyone else had luck with AVT in SimpleCV?

Edit: here is the error I am receiving:

from SimpleCV import *

cam = AVTCamera()
img = cam.getImage()
img.show()

Error:

NameError: name 'AVTCamera' is not defined
user2221667
  • 144
  • 3
  • 11

2 Answers2

0

Not sure why someone had voted this down. You are always welcome to post questions like this on the SimpleCV forum as well (http://help.simplecv.org).

We currently have not updated to VIMBA support as it has recently been released. However we do use the PvAPI driver on a daily basis so I do know that it works fine, although I have only tested via GiGE (manta and GT series), and have not tested via firewire.

Did you refer to our installed guide on our wiki: https://github.com/sightmachine/SimpleCV/wiki/Allied-Vision-(AVT)-GigE-Camera-Installation-Guide-for-Ubuntu-Linux

xamox
  • 2,599
  • 4
  • 27
  • 30
  • Thanks xamox, I will perhaps repost on your forum, I wonder if it is because it is a firewire card, which requires a different driver. – user2221667 Oct 18 '13 at 00:08
  • It very well could be. I think that previously they had separate drivers per each one and VIMBA is suppose to be their unified driver. They have only recently released the linux version of VIMBA which almost explicitly use. I've only installed and test VIMBA under linux but we have not begun the driver port, although I would like to do so in the near future. – xamox Oct 18 '13 at 13:02
0

I wrote a Python solution to using the AVT cameras based on the Vimba SDK that you may find useful. It's a driver wrapper called pymba, and the code can be found here. I have successfully tested it with the monochrome version of the Pike FireWire camera.

An equivalent example would look something like:

from pymba import *
import numpy as np
import cv2

vimba = Vimba()
vimba.startup()

cameraIds = vimba.getCameraIds()
camera0 = vimba.getCamera(cameraIds[0])
camera0.openCamera()

frame0 = camera0.getFrame()    # creates a frame
frame0.announceFrame()

camera0.startCapture()
frame0.queueFrameCapture()
camera0.runFeatureCommand('AcquisitionStart')
camera0.runFeatureCommand('AcquisitionStop')
frame0.waitFrameCapture()

imageData = np.ndarray(buffer = frame0.getBufferByteData(),
                       dtype = np.uint8,
                       shape = (frame0.height, frame0.width, 1))

cv2.imshow('My image', imageData)

camera0.endCapture()
camera0.revokeAllFrames()

camera0.closeCamera()

vimba.shutdown()
101
  • 8,514
  • 6
  • 43
  • 69