[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/progs calibrate.cxx
From: |
Gerhard Reitmayr |
Subject: |
[libcvd-members] libcvd/progs calibrate.cxx |
Date: |
Fri, 15 Aug 2008 12:54:06 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Gerhard Reitmayr <gerhard> 08/08/15 12:54:06
Modified files:
progs : calibrate.cxx
Log message:
added missing conversion again for OSX video support
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/progs/calibrate.cxx?cvsroot=libcvd&r1=1.5&r2=1.6
Patches:
Index: calibrate.cxx
===================================================================
RCS file: /cvsroot/libcvd/libcvd/progs/calibrate.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- calibrate.cxx 30 Jun 2008 18:46:10 -0000 1.5
+++ calibrate.cxx 15 Aug 2008 12:54:06 -0000 1.6
@@ -731,7 +731,11 @@
videoBuffer->put_frame(vframe);
vframe = videoBuffer->get_frame();
}
- Image<float> gray = convert_image<float>(*vframe);
+ // leave this in, we cannot assume that vframe has a datatype that can
be
+ // directly used in the glTexImage call later on (e.g. its yuv422 on
OSX)
+ Image<byte> temp = convert_image(*vframe);
+ Image<float> gray = convert_image(temp);
+ videoBuffer->put_frame(vframe);
glDisable(GL_BLEND);
glEnable(GL_TEXTURE_RECTANGLE_NV);
@@ -739,22 +743,20 @@
glTexParameterf( GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER,
GL_NEAREST );
glTexParameterf( GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER,
GL_NEAREST );
glPixelStorei(GL_UNPACK_ALIGNMENT,1);
- glTexImage2D(*vframe, 0, GL_TEXTURE_RECTANGLE_NV);
+ glTexImage2D(temp, 0, GL_TEXTURE_RECTANGLE_NV);
glBegin(GL_QUADS);
glTexCoord2i(0, 0);
glVertex2i(0,0);
- glTexCoord2i(vframe->size().x, 0);
+ glTexCoord2i(temp.size().x, 0);
glVertex2i(640,0);
- glTexCoord2i(vframe->size().x,vframe->size().y);
+ glTexCoord2i(temp.size().x,temp.size().y);
glVertex2i(640,480);
- glTexCoord2i(0, vframe->size().y);
+ glTexCoord2i(0, temp.size().y);
glVertex2i(0, 480);
glEnd ();
glDisable(GL_TEXTURE_RECTANGLE_NV);
glEnable(GL_BLEND);
- videoBuffer->put_frame(vframe);
-
//this is the bit that does the calibrating
vector<pair<size_t, Vector<2> > > measurements;
vector<Vector<2> > failedPoints;
- [libcvd-members] libcvd/progs calibrate.cxx,
Gerhard Reitmayr <=