> > for (int j=0;j<200;j++) {
> > for (int i=0;i<320;i++) {
> > pixel[i][j]=panorama[(i+angle_in_degrees*1471/360)MOD 1471][j];
> > }
> > }
> >  all what you need is to linear shift image by 0 at 0 degrees,and 1471
> > at 360.
> > here angle of screen wision is given by
> > 320* 360/1471
> Ok, but this is a very simple panorama which doesn't give the illustration
> that you stand somewhere and look around.
Hmm,problem that screen to eye distance may vary,screen size too,
but if you want you can use
for (int i=0;i<320;i++){
float_pixelangle=arctan((i160)/(screen_to_eye_distance_in_screen_pixels))
x=float_to_integer_conversion_in_C((float_pixelangle+float_wiew_angle)/pi*1471);
if(x>1471){x=x1471}
if(x<0){x=x+1471}
for (int j=0;j<200;j++){
pixel[i][j]=panorama[x][j];
}
Quote:}
it will be correct if screen is a plane and panoram is a cylinder.
Your panoram composed from some planar images,right?
Matrix in cam is not a cylinder.So, this algorithm is not more correct
than previous.But far more complex.You should have some planar images
rather than panoram(or at least you should know where one image started
and where another)to correctly convert set_of_images into _cylindrical_
panoram.
In case when panoram is simply set of planar images,it's ngon
panoram,not cylinder...
first alg assumes that screen and pan is a cylinders..or both are
parallel planes.When you're looking into center of image from cam,first
will be correct.Second newer will be correct if panoram is not
cylindrical...
Second alg in reverse(panorama[x][j]=picturepixel[i][j]) is how you can
convert set of pictures into cylindrical panoram
(of course you can preconvert it with some already avaliable software)
Quote:> > i'm is a pascal programmer,i don't sure if "MOD" named "MOD" in C ,"MOD"
> > mean _remainder_of_division_ ( (1471+320) mod 1471 == 320 ) .
> in C modulo (mod) is done via % (8%3=2)
> Thank you!
> Florian


http://dmytrylavrov.narod.ru