Hi,
I am creating a program with panda and artoolkit for windows, i have this code:
class AR:
def __init__( self ):
option = WebcamVideo.getOption(5)
self.cursor = option.open()
self.videoTexture = Texture('movie')
self.cursor.setupTexture( self.videoTexture )
videoTextureScale = Vec2(option.getSizeX()/float(self.videoTexture.getXSize()), option.getSizeY()/float(self.videoTexture.getYSize()))
cm = CardMaker("background-card")
cm.setFrame(1, -1, 1, -1)
cm.setUvRange(Point2(1,0), Point2(0,videoTextureScale[1]))
card = render2d.attachNewNode(cm.generate())
card.setTexture(self.videoTexture)
base.cam.node().getDisplayRegion(0).setSort(20)
self.ar = ARToolKit.make( base.cam, "./camera_para.dat", 1 )
This works fine, but i have some problems, if i use:
setUvRange(Point2(1,0), Point2(0,videoTextureScale[1]))
i have a image with a black stripe on right:
but if i use:
setUvRange.(Point2(videoTextureScale[0],0), Point2(0,videoTextureScale[1]))
the graphics are with wrong cordinate:
so, how can i have the right image sizes ans right cordinates?
Thanks
André