Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
demoReprojection.tcl
00001 
00002 
00003 package require image
00004 package require display
00005 package require camera
00006 
00007 # create the camera model
00008 set model [::camera::new_CameraParabolicBarreto]
00009 
00010 # load the model
00011 $model load "demo.cal"
00012 
00013 # read an image and display it
00014 set image [image::Image_loadImage "image.pgm"]
00015 #display::show $image
00016 set nbchannel [image::CvImage_channels $image]
00017 
00018 #=================================================
00019 #
00020 # 1st reprojection type : cylindricale projection
00021 #
00022 #=================================================
00023 
00024 # create image for cylindric reprojection
00025 set imageReprojCyl [::image::new_Image 1900 300 8 0]
00026 
00027 # cylindric reprojection
00028 ::camera::univReprojectionCylindric $model $image $imageReprojCyl 1
00029 display::show $imageReprojCyl
00030 
00031 
00032 #======================================================
00033 #
00034 # 2nd reprojection type : perspective camera emulation
00035 #
00036 #======================================================
00037 
00038 # Create image for perspective reprojection
00039 set imageReprojPersp [::image::new_Image 640 480 8 0]
00040 
00041 # perspective reprojection
00042 ::camera::univReprojectionPerspective $model $image $imageReprojPersp 0.53 0.60 0.2 1.20 1
00043 display::show $imageReprojPersp
00044 
00045 # Create image for perspective reprojection
00046 set imageReprojPersp2 [::image::new_Image 640 480 8 0]
00047 
00048 # perspective reprojection
00049 ::camera::univReprojectionPerspective $model $image $imageReprojPersp2 0.53 0.60 -0.2 1.20 1
00050 display::show $imageReprojPersp2
00051 
00052 
00053 
00054 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:17 for Jafar by doxygen 1.7.6.1
LAAS-CNRS