00001 package require image
00002 package require gfm
00003 package require display
00004
00005 set imaPath "/net/pelican/data1/robots/dala/data/2006_03_stereoPano/serie007/images"
00006 set imaPrefix "image."
00007 set imaSuffix ".o.tiff"
00008 set nbDigits 4
00009 set firstnum 1
00010 set lastnum 15
00011 set pasIma 1
00012
00013 set minTrackLength 7
00014
00015 set doDisplay "true"
00016
00017 00018 00019 set seqReader [::image::new_ImageSequenceReader]
00020 ::image::ImageSequenceReader_setup $seqReader $imaPath $imaPrefix $imaSuffix $nbDigits
00021
00022 00023 00024 set scale 1
00025 set threshold 3.0
00026 set desiredNb 500
00027 set harrisdetector [gfm::new_HarrisDetector $scale 1.0 2.0 1 $threshold "true" $desiredNb]
00028
00029 00030 00031 set groupsize 5
00032 set minimalgroupsize 2
00033 set distance 20.0
00034 set closeness 0.6
00035 set weakcloseness 0.6
00036 set distinguability 0.1
00037 set rotationTolerance 0.2
00038 set scaleTolerance 10000.0
00039 set distanceTolerance 10.0
00040 set rotationDifferenceWithMedian 0.4
00041 set thresholdofenoughtgroup 0.333
00042 set groupsmatcher [gfm::new_GroupsMatcher 100000 100000 $groupsize $minimalgroupsize $distance $closeness $weakcloseness $distinguability $rotationTolerance $scaleTolerance $distanceTolerance $rotationDifferenceWithMedian $thresholdofenoughtgroup ]
00043
00044 00045 00046 set listOfTracks [gfm::offlineGfmTracker $seqReader $firstnum $pasIma $lastnum $harrisdetector $groupsmatcher];
00047
00048 gfm::tracks_makeStatistics $listOfTracks
00049 gfm::tracks_exportBinaryFile $listOfTracks "/tmp/obsFEAT_serie007_GFM.feat" $minTrackLength
00050 gfm::tracks_makeStatistics $listOfTracks
00051
00052 00053 00054 00055 00056
00057 00058 00059
00060 if {$doDisplay} {
00061
00062 set cptima 0;
00063 for {set cpt $firstnum} {$cpt<=$lastnum} {incr cpt} {
00064
00065 # Get Features
00066 set Liste [::gfm::tracks_featuresInView $listOfTracks $cptima ]
00067
00068 # display image
00069 set imageName [format "%s/%s%04d%s" $imaPath $imaPrefix $cpt $imaSuffix]
00070 set imageVar [image::JfrImage_loadImage $imageName];
00071 display::show $imageVar $imageName
00072
00073 # puts harris corner on image
00074 gfm::displayTrackedHarrisPoints $imageVar $Liste
00075
00076 # On dump en tiff
00077 set outputName [format "/tmp/%s%04d_tracks.png" $imaPrefix $cpt]
00078 display::dumpAny $imageVar $outputName
00079
00080 # Temporisation
00081 after 1500 incr cptima
00082 vwait cptima
00083 display::destroy $imageVar
00084
00085 unset Liste
00086 }
00087 }