Strona 1 z 3
program ?
: 21 gru 2006, 13:00
autor: pltmaxnc
W jakim środowisku uruchomoć można taki program ?
>>>>>>>>>>>>>>>>>>>>>>>>>>>
ę#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <string.h>
extern "C"
{
#include <jpeglib.h>
#include <jerror.h>
}
#include <math.h>
/*================================================================*/
/* USER EDITABLE SECTION: Change these to suit your scanner */
/*================================================================*/
#define CAMERA_HFOV 50.0f /* Degrees */
#define CAMERA_VFOV (CAMERA_HFOV*4.0f/5.0f) /* Degrees */
#define CAMERA_DISTANCE 0.30f /* Meters */
#define LASER_OFFSET 15.0f /* Degrees */
#define HORIZ_AVG 10 /* Num horizontal points to average */
#define VERT_AVG 10 /* Num vertical points to average */
/*================================================================*/
#define FRAME_SKIP 1 /* Use every n'th frame for speed */
#define POINT_SKIP 1 /* Use every n'th scanline for speed*/
#define RADIANS_TO_DEGREES (180.0f / 3.14159f )
#define DEGREES_TO_RADIANS (3.14159f / 180.0f )
class Image
{
protected:
int width ;
int height ;
unsigned char *buffer ;
public:
Image ( int w, int h )
{
width = w ;
height = h ;
buffer = new unsigned char [ w * h * 3 ] ;
}
Image ()
{
width = height = 0 ;
buffer = NULL ;
}
virtual ~Image () ;
int getWidth () { return width ; }
int getHeight () { return height ; }
unsigned char *getPixels () { return buffer ; }
unsigned int getPixelArea ( float x1, float y1,
float x2, float y2,
unsigned int keyColour ) ;
itd...............................................................................................
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
: 21 gru 2006, 13:08
autor: gaspar
Pod linuksem gcc sobie z tym poradzi. Właśnie próbowałem i gdybyś dał cały plik to można go skompilować. To jest źródło do kompilacji w c.
: 21 gru 2006, 14:39
autor: pltmaxnc
calość
******************************
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <string.h>
extern "C"
{
#include <jpeglib.h>
#include <jerror.h>
}
#include <math.h>
/*================================================================*/
/* USER EDITABLE SECTION: Change these to suit your scanner */
/*================================================================*/
#define CAMERA_HFOV 50.0f /* Degrees */
#define CAMERA_VFOV (CAMERA_HFOV*4.0f/5.0f) /* Degrees */
#define CAMERA_DISTANCE 0.30f /* Meters */
#define LASER_OFFSET 15.0f /* Degrees */
#define HORIZ_AVG 10 /* Num horizontal points to average */
#define VERT_AVG 10 /* Num vertical points to average */
/*================================================================*/
#define FRAME_SKIP 1 /* Use every n'th frame for speed */
#define POINT_SKIP 1 /* Use every n'th scanline for speed*/
#define RADIANS_TO_DEGREES (180.0f / 3.14159f )
#define DEGREES_TO_RADIANS (3.14159f / 180.0f )
class Image
{
protected:
int width ;
int height ;
unsigned char *buffer ;
public:
Image ( int w, int h )
{
width = w ;
height = h ;
buffer = new unsigned char [ w * h * 3 ] ;
}
Image ()
{
width = height = 0 ;
buffer = NULL ;
}
virtual ~Image () ;
int getWidth () { return width ; }
int getHeight () { return height ; }
unsigned char *getPixels () { return buffer ; }
unsigned int getPixelArea ( float x1, float y1,
float x2, float y2,
unsigned int keyColour ) ;
unsigned char getPixelRed ( int x, int y )
{
return (unsigned int) buffer [ ( y * width + x ) * 3 + 0 ] ;
}
unsigned char getPixelGreen ( int x, int y )
{
return (unsigned int) buffer [ ( y * width + x ) * 3 + 1 ] ;
}
unsigned char getPixelBlue ( int x, int y )
{
return (unsigned int) buffer [ ( y * width + x ) * 3 + 2 ] ;
}
unsigned int getPixel ( float x, float y )
{
return getPixel ( (int) x, (int) y ) ;
}
unsigned int getPixel ( int x, int y )
{
int p = ( y * width + x ) * 3 ;
return ( (unsigned int) buffer [ p + 0 ] << 24 ) +
( (unsigned int) buffer [ p + 1 ] << 16 ) +
( (unsigned int) buffer [ p + 2 ] << 8 ) + 255 ;
}
void setPixel ( float x, float y, unsigned int rgba )
{
setPixel ( (int) x, (int) y, rgba ) ;
}
void setPixel ( int x, int y, unsigned int rgba )
{
int p = ( y * width + x ) * 3 ;
if ( ( rgba & 0xFF ) == 0 )
return ;
if ( ( rgba & 0xFF ) == 255 )
{
buffer [ p + 0 ] = ( rgba >> 24 ) & 0xFF ;
buffer [ p + 1 ] = ( rgba >> 16 ) & 0xFF ;
buffer [ p + 2 ] = ( rgba >> 8 ) & 0xFF ;
}
else
{
unsigned int r = ( rgba >> 24 ) & 0xFF ;
unsigned int g = ( rgba >> 16 ) & 0xFF ;
unsigned int b = ( rgba >> 8 ) & 0xFF ;
unsigned int a = ( rgba >> 0 ) & 0xFF ;
unsigned int ac = 255 - a ;
buffer [ p + 0 ] = (unsigned char)((int)(buffer [ p + 0 ]) * ac / 255 + r * a / 255 ) ;
buffer [ p + 1 ] = (unsigned char)((int)(buffer [ p + 1 ]) * ac / 255 + g * a / 255 ) ;
buffer [ p + 2 ] = (unsigned char)((int)(buffer [ p + 2 ]) * ac / 255 + b * a / 255 ) ;
}
}
virtual int load ( char *fname ) = NULL ;
} ;
class JPEG : public Image
{
public:
JPEG () : Image () {}
JPEG ( int w, int h ) : Image ( w, h ) {}
virtual int load ( char *fname ) ;
} ;
static const int _endianTest = 1;
#define isLittleEndian (*((char *) &_endianTest ) != 0)
#define isBigEndian (*((char *) &_endianTest ) == 0)
Image::~Image ()
{
delete buffer ;
}
int JPEG::load ( char * filename )
{
jpeg_decompress_struct cinfo ;
jpeg_error_mgr jerr ;
FILE *fd ;
JSAMPARRAY linebuffer ;
int row_stride ;
if ( ( fd = fopen ( filename, "rb" ) ) == NULL )
{
perror ( "readJPEG" ) ;
fprintf ( stderr, "readJPEG: Can't open %s for reading\n", filename ) ;
return 0 ;
}
cinfo.err = jpeg_std_error ( &jerr ) ;
jpeg_create_decompress ( &cinfo ) ;
jpeg_stdio_src ( &cinfo, fd ) ;
jpeg_read_header ( &cinfo, TRUE ) ;
jpeg_start_decompress ( &cinfo ) ;
row_stride = cinfo.output_width * cinfo.output_components ;
if ( cinfo.output_components != 3 )
{
fprintf ( stderr, "readJPEG: %s has %d components?!?\n", filename,
cinfo.output_components ) ;
return 0 ;
}
linebuffer = (*cinfo.mem->alloc_sarray)
( (j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1 ) ;
delete buffer ;
height = cinfo.output_height ;
width = cinfo.output_width ;
buffer = new unsigned char [ width * height * 3 ] ;
while (cinfo.output_scanline < cinfo.output_height)
{
int y = cinfo.output_scanline ;
/*
jpeg_read_scanlines expects an array of pointers to scanlines.
Here the array is only one element long, but you could ask for
more than one scanline at a time if that's more convenient.
*/
jpeg_read_scanlines ( &cinfo, linebuffer, 1 ) ;
memcpy ( & buffer [ y * row_stride ], linebuffer[0], row_stride ) ;
}
jpeg_finish_decompress ( &cinfo ) ;
jpeg_destroy_decompress ( &cinfo ) ;
fclose ( fd ) ;
return 1 ;
}
unsigned int Image::getPixelArea ( float x1, float y1,
float x2, float y2,
unsigned int keyColour )
{
if ( x2-x1 <= 0.0f || y2-y1 <= 0.0f )
return 0x00000000 ;
unsigned int r = ( keyColour >> 24 ) & 0xFF ;
unsigned int g = ( keyColour >> 16 ) & 0xFF ;
unsigned int b = ( keyColour >> 8 ) & 0xFF ;
float area_tot = (x2-x1) * (y2-y1) ;
float r_tot = 0.0f ;
float g_tot = 0.0f ;
float b_tot = 0.0f ;
float rgb_area = 0.0f ;
for ( int i = (int)floor(x1) ; i <= (int)ceil(x2) ; i++ )
for ( int j = (int)floor(y1) ; j <= (int)ceil(y2) ; j++ )
{
if ( i < 0 || i >= width ||
j < 0 || j >= height ||
getPixel( i, j ) == keyColour )
continue ;
float xa = ( x1 > (float) i ) ? x1 : (float) i ;
float xb = ( x2 < (float)(i+1)) ? x2 : (float) (i+1) ;
float ya = ( y1 > (float) j ) ? y1 : (float) j ;
float yb = ( y2 < (float)(j+1)) ? y2 : (float) (j+1) ;
if ( xb-xa <= 0.0f || yb-ya <= 0.0f )
continue ;
float area = (xb-xa) * (yb-ya) ;
rgb_area += area ;
r_tot += getPixelRed ( i, j ) * area ;
g_tot += getPixelGreen ( i, j ) * area ;
b_tot += getPixelBlue ( i, j ) * area ;
}
if ( rgb_area <= 0.0f )
return 0x00000000 ;
r_tot /= rgb_area ;
g_tot /= rgb_area ;
b_tot /= rgb_area ;
float a_tot = rgb_area * 255.0f / area_tot ;
if ( r_tot > 255.0f ) r_tot = 255.0f ;
if ( g_tot > 255.0f ) g_tot = 255.0f ;
if ( b_tot > 255.0f ) b_tot = 255.0f ;
if ( a_tot > 255.0f ) a_tot = 255.0f ;
if ( r_tot <= 0.0f ) r_tot = 0.0f ;
if ( g_tot <= 0.0f ) g_tot = 0.0f ;
if ( b_tot <= 0.0f ) b_tot = 0.0f ;
if ( a_tot <= 0.0f ) a_tot = 0.0f ;
return ( (unsigned int) r_tot << 24 ) +
( (unsigned int) g_tot << 16 ) +
( (unsigned int) b_tot << 8 ) +
( (unsigned int) a_tot << 0 ) ;
}
void ASAtoSAS ( float angA, float lenB, float angC,
float *lenA, float *angB, float *lenC )
{
/* Find the missing angle */
float bb = 180.0f - (angA + angC) ;
if ( angB ) *angB = bb ;
/* Convert everything to radians */
angA *= DEGREES_TO_RADIANS ;
angC *= DEGREES_TO_RADIANS ;
bb *= DEGREES_TO_RADIANS ;
/* Use Sine Rule */
float sinB = sin ( bb ) ;
if ( sinB == 0.0f )
{
if ( lenA ) *lenA = lenB / 2.0f ; /* One valid interpretation */
if ( lenC ) *lenC = lenB / 2.0f ;
}
else
{
if ( lenA ) *lenA = lenB * sin(angA) / sinB ;
if ( lenC ) *lenC = lenB * sin(angC) / sinB ;
}
}
float *processRawFrame ( char *fname, int f, int num_frames, int *num_points )
{
JPEG *jpg = new JPEG ;
jpg -> load ( fname ) ;
int np = jpg->getHeight() / POINT_SKIP ;
*num_points = np ;
float *res = new float [ 3 * np ] ;
float frame_angle = ((float) f) * (360.0f / (float) num_frames) ;
for ( int j = 0 ; j < np ; j++ )
{
/* Find the brightest pixel */
float max = 0.0f ;
int maxpos = -1 ;
for ( int i = 0 ; i < jpg -> getWidth () ; i++ )
{
unsigned int px = jpg -> getPixel ( i, j*POINT_SKIP ) ;
float brightness = ((float)(( px >> 24 ) & 0xFF)) / 255.0f +
((float)(( px >> 16 ) & 0xFF)) / 255.0f +
((float)(( px >> 8 ) & 0xFF)) / 255.0f ;
if ( brightness > max )
{
max = brightness ;
maxpos = i ;
}
}
float radius ;
float camera_angle = CAMERA_HFOV *
(0.5f - (float)maxpos / (float)jpg -> getWidth ()) ;
ASAtoSAS ( camera_angle, CAMERA_DISTANCE, LASER_OFFSET,
& radius, NULL, NULL ) ;
float x = radius * sin ( frame_angle * DEGREES_TO_RADIANS ) ;
float y = radius * cos ( frame_angle * DEGREES_TO_RADIANS ) ;
float z = atan ( (CAMERA_VFOV * DEGREES_TO_RADIANS / 2.0f) ) *
2.0f * CAMERA_DISTANCE * (float) j / (float) np ;
// if ( max < 1.50 )
// x = y = 0.0f ;
res [ 3 * j + 0 ] = x ;
res [ 3 * j + 1 ] = y ;
res [ 3 * j + 2 ] = z ;
}
delete jpg ;
return res ;
}
void outputFrames ( int num_points, int num_frames, float **vertices )
{
int num_outframes = num_frames / HORIZ_AVG ;
int num_outpoints = num_points / VERT_AVG ;
printf ( "AC3Db\n" ) ;
printf ( "MATERIAL \"ac3dmat1\" rgb 1 1 1 amb 0.2 0.2 0.2 "
"emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0\n" ) ;
printf ( "OBJECT world\n" ) ;
printf ( "kids 1\n" ) ;
printf ( "OBJECT poly\n" ) ;
printf ( "name \"scan3d\"\n" ) ;
printf ( "loc 0.0 0.0 0.0\n" ) ;
printf ( "numvert %d\n", num_outpoints*num_outframes ) ;
for ( int f = 0 ; f < num_outframes ; f++ )
for ( int i = 0 ; i < num_outpoints ; i++ )
{
float avg [ 3 ] = { 0.0f, 0.0f, 0.0f } ;
for ( int ff = 0 ; ff < HORIZ_AVG ; ff++ )
for ( int ii = 0 ; ii < VERT_AVG ; ii++ )
{
avg [ 0 ] += vertices[f*HORIZ_AVG+ff][(i*VERT_AVG+ii)*3+0] ;
avg [ 1 ] += vertices[f*HORIZ_AVG+ff][(i*VERT_AVG+ii)*3+1] ;
avg [ 2 ] += vertices[f*HORIZ_AVG+ff][(i*VERT_AVG+ii)*3+2] ;
}
avg [ 0 ] /= (float)( HORIZ_AVG*VERT_AVG ) ;
avg [ 1 ] /= (float)( HORIZ_AVG*VERT_AVG ) ;
avg [ 2 ] /= (float)( HORIZ_AVG*VERT_AVG ) ;
printf ( "%f %f %f\n", avg [ 0 ], avg [ 1 ], avg [ 2 ] ) ;
}
printf ( "numsurf %d\n", num_outframes * (num_outpoints-1) * 2 ) ;
for ( int f = 0 ; f < num_outframes ; f++ )
{
int ff = (f==num_outframes-1) ? 0 : f+1 ;
for ( int i = 0 ; i < num_outpoints-1 ; i++ )
{
int ii = i+1 ;
printf ( "SURF 0x10\n" ) ;
printf ( "mat 0\n" ) ;
printf ( "refs 3\n" ) ;
printf ( "%d %f %f\n", ff * num_outpoints + ii,
(float) ff / (float) num_outframes,
(float) ii / (float) num_outpoints ) ;
printf ( "%d %f %f\n", ff * num_outpoints + i,
(float) ff / (float) num_outframes,
(float) i / (float) num_outpoints ) ;
printf ( "%d %f %f\n", f * num_outpoints + i,
(float) f / (float) num_outframes,
(float) i / (float) num_outpoints ) ;
printf ( "SURF 0x10\n" ) ;
printf ( "mat 0\n" ) ;
printf ( "refs 3\n" ) ;
printf ( "%d %f %f\n", f * num_outpoints + ii,
(float) f / (float) num_outframes,
(float) i / (float) num_outpoints ) ;
printf ( "%d %f %f\n", ff * num_outpoints + ii,
(float) ff / (float) num_outframes,
(float) ii / (float) num_outpoints ) ;
printf ( "%d %f %f\n", f * num_outpoints + i,
(float) f / (float) num_outframes,
(float) i / (float) num_outpoints ) ;
}
}
printf ( "kids 0\n" ) ;
}
int main ( int argc, char **argv )
{
float **vertices ;
int num_frames = 0 ;
for ( int i = 0 ; true ; i++ )
{
FILE *tmp ;
char fname [ 100 ] ;
sprintf ( fname, "%08d.jpg", i*FRAME_SKIP ) ;
fprintf ( stderr, "Checking %s\r", fname ) ;
if ( (tmp = fopen ( fname, "r" )) == NULL )
break ;
fclose ( tmp ) ;
num_frames = i+1 ;
}
fprintf ( stderr, "\nProcessing %d frames...\n", num_frames ) ;
vertices = new float * [ num_frames ] ;
int npoints = -1 ;
for ( int i = 0 ; i < num_frames ; i++ )
{
int np ;
char fname [ 100 ] ;
sprintf ( fname, "%08d.jpg", i*FRAME_SKIP ) ;
fprintf ( stderr, "Processing frame %d/%d '%s'\r",
i, num_frames, fname ) ;
vertices [ i ] = processRawFrame ( fname, i, num_frames, &np ) ;
assert ( npoints == -1 || np == npoints ) ;
npoints = np ;
}
fprintf ( stderr, "\nOutputting...\n", num_frames ) ;
outputFrames ( npoints, num_frames, vertices ) ;
}
: 21 gru 2006, 16:05
autor: gaspar
Poproś Marcomp o kompilacje, ja nie mam odpowiednich bibliotek i jednak nie bardzo mi to się chce skompilować (na serwerze nie wszystko było potrzebne)
Błędy:
/tmp/ccrD8cO8.o(.text+0x19): In function `Image::~Image [not-in-charge]()':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.text+0x33): In function `Image::~Image [not-in-charge]()':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.text+0x55): In function `Image::~Image [in-charge]()':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.text+0x6f): In function `Image::~Image [in-charge]()':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.text+0x91): In function `Image::~Image [in-charge deleting]()':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.text+0xab): more undefined references to `operator delete(void*)' follow
/tmp/ccrD8cO8.o(.text+0x123): In function `JPEG::load(char*)':
: undefined reference to `jpeg_std_error'
/tmp/ccrD8cO8.o(.text+0x142): In function `JPEG::load(char*)':
: undefined reference to `jpeg_CreateDecompress'
/tmp/ccrD8cO8.o(.text+0x15a): In function `JPEG::load(char*)':
: undefined reference to `jpeg_stdio_src'
/tmp/ccrD8cO8.o(.text+0x16e): In function `JPEG::load(char*)':
: undefined reference to `jpeg_read_header'
/tmp/ccrD8cO8.o(.text+0x180): In function `JPEG::load(char*)':
: undefined reference to `jpeg_start_decompress'
/tmp/ccrD8cO8.o(.text+0x1fd): In function `JPEG::load(char*)':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.text+0x250): In function `JPEG::load(char*)':
: undefined reference to `operator new[](unsigned)'
/tmp/ccrD8cO8.o(.text+0x289): In function `JPEG::load(char*)':
: undefined reference to `jpeg_read_scanlines'
/tmp/ccrD8cO8.o(.text+0x2ca): In function `JPEG::load(char*)':
: undefined reference to `jpeg_finish_decompress'
/tmp/ccrD8cO8.o(.text+0x2dc): In function `JPEG::load(char*)':
: undefined reference to `jpeg_destroy_decompress'
/tmp/ccrD8cO8.o(.text+0x3a9): In function `Image::getPixelArea(float, float, float, float, unsigned)':
: undefined reference to `floor'
/tmp/ccrD8cO8.o(.text+0x3d4): In function `Image::getPixelArea(float, float, float, float, unsigned)':
: undefined reference to `ceil'
/tmp/ccrD8cO8.o(.text+0x40c): In function `Image::getPixelArea(float, float, float, float, unsigned)':
: undefined reference to `floor'
/tmp/ccrD8cO8.o(.text+0x437): In function `Image::getPixelArea(float, float, float, float, unsigned)':
: undefined reference to `ceil'
/tmp/ccrD8cO8.o(.text+0x828): In function `ASAtoSAS(float, float, float, float*, float*, float*)':
: undefined reference to `sin'
/tmp/ccrD8cO8.o(.text+0x892): In function `ASAtoSAS(float, float, float, float*, float*, float*)':
: undefined reference to `sin'
/tmp/ccrD8cO8.o(.text+0x8c2): In function `ASAtoSAS(float, float, float, float*, float*, float*)':
: undefined reference to `sin'
/tmp/ccrD8cO8.o(.text+0x8e6): In function `processRawFrame(char*, int, int, int*)':
: undefined reference to `operator new(unsigned)'
/tmp/ccrD8cO8.o(.text+0x920): In function `processRawFrame(char*, int, int, int*)':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.text+0x97a): In function `processRawFrame(char*, int, int, int*)':
: undefined reference to `operator new[](unsigned)'
/tmp/ccrD8cO8.o(.text+0xaf5): In function `processRawFrame(char*, int, int, int*)':
: undefined reference to `sin'
/tmp/ccrD8cO8.o(.text+0xb1e): In function `processRawFrame(char*, int, int, int*)':
: undefined reference to `cos'
/tmp/ccrD8cO8.o(.text+0xb3b): In function `processRawFrame(char*, int, int, int*)':
: undefined reference to `atan'
/tmp/ccrD8cO8.o(.text+0x113a): In function `main':
: undefined reference to `operator new[](unsigned)'
/tmp/ccrD8cO8.o(.gnu.linkonce.r._ZTV5Image+0x10): undefined reference to `__cxa_pure_virtual'
/tmp/ccrD8cO8.o(.gnu.linkonce.t._ZN4JPEGD0Ev+0x30): In function `JPEG::~JPEG [in-charge deleting]()':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.gnu.linkonce.t._ZN4JPEGD1Ev+0x30): In function `JPEG::~JPEG [in-charge]()':
: undefined reference to `operator delete(void*)'
/tmp/ccrD8cO8.o(.gnu.linkonce.r._ZTI5Image+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
/tmp/ccrD8cO8.o(.gnu.linkonce.r._ZTI4JPEG+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/ccrD8cO8.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
: 21 gru 2006, 21:19
autor: x
To jest program C++, potrzebuje tylko biblioteki libjpeg. Polecenie kompilacji:
(zfcnc to oczywiście nazwa pod jaką zapisałem skopiowany stąd kod)
U mnie kompiluje się bez żadnych problemów. Tylko wytłumaczcie mi: co ten program robi? Podawałem mu nawet dwa pliki które nazwałem 00000000.jpg i 00000001.jpg, cuś tam wyświetla (w większości napisy "na sztywno" wpisane do printf()), i to wszystko, żadnego fizycznego efektu w postaci pliku wynikowego.
: 21 gru 2006, 21:44
autor: gaspar
no po zainstalowaniu libjpeg, skompilowałem.
Checking 00000001.jpg
Processing 1 frames...
Processing frame 0/1 '00000000.jpg'
Outputting...
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
OBJECT world
kids 1
OBJECT poly
name "scan3d"
loc 0.0 0.0 0.0
numvert 0
numsurf 0
kids 0
faktycznie nie wiele to wyjaśnia
: 21 gru 2006, 22:01
autor: numerek

co on robi ......
tego sam autor postu nie wie ...

zapytał pod czym to to będzie chodzić a linuksiarze juz za kompilacje się biorą ......
okazuje się że ten program robi............
nic nie robi po prostu jest
a co !
: 21 gru 2006, 22:23
autor: x
Potem się okaże, że to rootkit.
A tak na serio, to wygląda na wersję 0.0.1-pre-alpha, prawie wszystko wpisane "na sztywno", 500 linii kodu, jakaś użyteczna funkcjonalność pojawi się pewnie kilkanaście wersji później. Ale w wolnej chwili przejrzę ten kod.
a linuksiarze juz za kompilacje się biorą ...
Rzeczywiście, to już taki odruch żeby sprawdzić czy się skompiluje.
: 21 gru 2006, 22:24
autor: yoyer
Zakladam, ze jest to program wykorzystywany do zczytywania geometrii obiektu z pliku graficznego (tzn jest to jakis modul wiekszego projektu) przy skanowaniu za pomoca kamery (aparatu) i lasera - swiatlo lasera w postaci "prazka" rzutowane jest na obiekt... co bede pduzo pisal... wiecie o co chodzi...
dla przykladu:
npoints - to moze byc zmienna do liczenia "nodow"; etc
[ Dodano: 2006-12-21, 22:24 ]
PS. Ktos pewnie na "wyzszej uczelni" dostal prace przejsciowa i sie teraz produkuje

: 21 gru 2006, 22:33
autor: markcomp77
to jest "The Scan_Extract Tool" ze strony:
http://www.sjbaker.org/projects/scanner/
The program I used to extract 3D images is included here and the 'Makefile' for it is here.