Name
binocular_distance T_binocular_distance BinocularDistance binocular_distance BinocularDistance BinocularDistance — Berechnet das Distanzbild für ein rektifiziertes Bildpaar mit Hilfe von
Korrelationsmethoden.
binocular_distance (ImageRect1 , ImageRect2 : Distance , Score : CamParamRect1 , CamParamRect2 , RelPoseRect , Method , MaskWidth , MaskHeight , TextureThresh , MinDisparity , MaxDisparity , NumLevels , ScoreThresh , Filter , SubDistance : )
Herror T_binocular_distance (const Hobject ImageRect1 , const Hobject ImageRect2 , Hobject* Distance , Hobject* Score , const Htuple CamParamRect1 , const Htuple CamParamRect2 , const Htuple RelPoseRect , const Htuple Method , const Htuple MaskWidth , const Htuple MaskHeight , const Htuple TextureThresh , const Htuple MinDisparity , const Htuple MaxDisparity , const Htuple NumLevels , const Htuple ScoreThresh , const Htuple Filter , const Htuple SubDistance )
Herror binocular_distance (Hobject ImageRect1 , Hobject ImageRect2 , Hobject* Distance , Hobject* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HTuple& RelPoseRect , const HTuple& Method , const HTuple& MaskWidth , const HTuple& MaskHeight , const HTuple& TextureThresh , const HTuple& MinDisparity , const HTuple& MaxDisparity , const HTuple& NumLevels , const HTuple& ScoreThresh , const HTuple& Filter , const HTuple& SubDistance )
HImage HImage ::BinocularDistance (const HImage& ImageRect2 , HImage* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HTuple& RelPoseRect , const HTuple& Method , const HTuple& MaskWidth , const HTuple& MaskHeight , const HTuple& TextureThresh , const HTuple& MinDisparity , const HTuple& MaxDisparity , const HTuple& NumLevels , const HTuple& ScoreThresh , const HTuple& Filter , const HTuple& SubDistance ) const
void BinocularDistance (const HObject& ImageRect1 , const HObject& ImageRect2 , HObject* Distance , HObject* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HTuple& RelPoseRect , const HTuple& Method , const HTuple& MaskWidth , const HTuple& MaskHeight , const HTuple& TextureThresh , const HTuple& MinDisparity , const HTuple& MaxDisparity , const HTuple& NumLevels , const HTuple& ScoreThresh , const HTuple& Filter , const HTuple& SubDistance )
HImage HImage ::BinocularDistance (const HImage& ImageRect2 , HImage* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HPose& RelPoseRect , const HString& Method , Hlong MaskWidth , Hlong MaskHeight , const HTuple& TextureThresh , Hlong MinDisparity , Hlong MaxDisparity , Hlong NumLevels , const HTuple& ScoreThresh , const HTuple& Filter , const HTuple& SubDistance ) const
HImage HImage ::BinocularDistance (const HImage& ImageRect2 , HImage* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HPose& RelPoseRect , const HString& Method , Hlong MaskWidth , Hlong MaskHeight , double TextureThresh , Hlong MinDisparity , Hlong MaxDisparity , Hlong NumLevels , double ScoreThresh , const HString& Filter , const HString& SubDistance ) const
HImage HImage ::BinocularDistance (const HImage& ImageRect2 , HImage* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HPose& RelPoseRect , const char* Method , Hlong MaskWidth , Hlong MaskHeight , double TextureThresh , Hlong MinDisparity , Hlong MaxDisparity , Hlong NumLevels , double ScoreThresh , const char* Filter , const char* SubDistance ) const
HImage HPose ::BinocularDistance (const HImage& ImageRect1 , const HImage& ImageRect2 , HImage* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HString& Method , Hlong MaskWidth , Hlong MaskHeight , const HTuple& TextureThresh , Hlong MinDisparity , Hlong MaxDisparity , Hlong NumLevels , const HTuple& ScoreThresh , const HTuple& Filter , const HTuple& SubDistance ) const
HImage HPose ::BinocularDistance (const HImage& ImageRect1 , const HImage& ImageRect2 , HImage* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const HString& Method , Hlong MaskWidth , Hlong MaskHeight , double TextureThresh , Hlong MinDisparity , Hlong MaxDisparity , Hlong NumLevels , double ScoreThresh , const HString& Filter , const HString& SubDistance ) const
HImage HPose ::BinocularDistance (const HImage& ImageRect1 , const HImage& ImageRect2 , HImage* Score , const HTuple& CamParamRect1 , const HTuple& CamParamRect2 , const char* Method , Hlong MaskWidth , Hlong MaskHeight , double TextureThresh , Hlong MinDisparity , Hlong MaxDisparity , Hlong NumLevels , double ScoreThresh , const char* Filter , const char* SubDistance ) const
void HOperatorSetX .BinocularDistance ( [in] IHUntypedObjectX* ImageRect1 , [in] IHUntypedObjectX* ImageRect2 , [out] IHUntypedObjectX* * Distance , [out] IHUntypedObjectX* * Score , [in] VARIANT CamParamRect1 , [in] VARIANT CamParamRect2 , [in] VARIANT RelPoseRect , [in] VARIANT Method , [in] VARIANT MaskWidth , [in] VARIANT MaskHeight , [in] VARIANT TextureThresh , [in] VARIANT MinDisparity , [in] VARIANT MaxDisparity , [in] VARIANT NumLevels , [in] VARIANT ScoreThresh , [in] VARIANT Filter , [in] VARIANT SubDistance )
IHImageX* HImageX .BinocularDistance ( [in] IHImageX* ImageRect2 , [out] IHImageX* * Score , [in] VARIANT CamParamRect1 , [in] VARIANT CamParamRect2 , [in] VARIANT RelPoseRect , [in] BSTR Method , [in] Hlong MaskWidth , [in] Hlong MaskHeight , [in] VARIANT TextureThresh , [in] Hlong MinDisparity , [in] Hlong MaxDisparity , [in] Hlong NumLevels , [in] VARIANT ScoreThresh , [in] VARIANT Filter , [in] VARIANT SubDistance )
IHImageX* HPoseX .BinocularDistance ( [in] IHImageX* ImageRect1 , [in] IHImageX* ImageRect2 , [out] IHImageX* * Score , [in] VARIANT CamParamRect1 , [in] VARIANT CamParamRect2 , [in] VARIANT RelPoseRect , [in] BSTR Method , [in] Hlong MaskWidth , [in] Hlong MaskHeight , [in] VARIANT TextureThresh , [in] Hlong MinDisparity , [in] Hlong MaxDisparity , [in] Hlong NumLevels , [in] VARIANT ScoreThresh , [in] VARIANT Filter , [in] VARIANT SubDistance )
static void HOperatorSet .BinocularDistance (HObject imageRect1 , HObject imageRect2 , out HObject distance , out HObject score , HTuple camParamRect1 , HTuple camParamRect2 , HTuple relPoseRect , HTuple method , HTuple maskWidth , HTuple maskHeight , HTuple textureThresh , HTuple minDisparity , HTuple maxDisparity , HTuple numLevels , HTuple scoreThresh , HTuple filter , HTuple subDistance )
HImage HImage .BinocularDistance (HImage imageRect2 , out HImage score , HTuple camParamRect1 , HTuple camParamRect2 , HPose relPoseRect , string method , int maskWidth , int maskHeight , HTuple textureThresh , int minDisparity , int maxDisparity , int numLevels , HTuple scoreThresh , HTuple filter , HTuple subDistance )
HImage HImage .BinocularDistance (HImage imageRect2 , out HImage score , HTuple camParamRect1 , HTuple camParamRect2 , HPose relPoseRect , string method , int maskWidth , int maskHeight , double textureThresh , int minDisparity , int maxDisparity , int numLevels , double scoreThresh , string filter , string subDistance )
HImage HPose .BinocularDistance (HImage imageRect1 , HImage imageRect2 , out HImage score , HTuple camParamRect1 , HTuple camParamRect2 , string method , int maskWidth , int maskHeight , HTuple textureThresh , int minDisparity , int maxDisparity , int numLevels , HTuple scoreThresh , HTuple filter , HTuple subDistance )
HImage HPose .BinocularDistance (HImage imageRect1 , HImage imageRect2 , out HImage score , HTuple camParamRect1 , HTuple camParamRect2 , string method , int maskWidth , int maskHeight , double textureThresh , int minDisparity , int maxDisparity , int numLevels , double scoreThresh , string filter , string subDistance )
binocular_distance binocular_distance BinocularDistance binocular_distance BinocularDistance BinocularDistance berechnet das Distanzbild für ein
rektifiziertes Bildpaar mit Hilfe von Korrelationsmethoden. Der
Operator berechnet zunächst die Disparitäten zwischen den zwei
rektifizierten Bildern ImageRect1 ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 und ImageRect2 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 ähnlich
wie in binocular_disparity binocular_disparity BinocularDisparity binocular_disparity BinocularDisparity BinocularDisparity . Die resultierenden Disparitätswerte
werden dann wie in disparity_to_distance disparity_to_distance DisparityToDistance disparity_to_distance DisparityToDistance DisparityToDistance in Distanzwerte der
korrespondierenden 3D Weltpunkte zu dem rektifizierten
Stereo-Kamerasystem transformiert. Die Distanzen werden in dem
einkanaligen Bild Distance Distance Distance Distance Distance distance zurückgegeben, in dem jeder
Grauwert den Abstand des jeweiligen 3D Weltpunktes zu dem
Stereo-Kamerasystem repräsentiert.
Der Algorithmus benötigt ein Referenzbild ImageRect1 ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 und ein
Suchbild ImageRect2 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 , welche entzerrt sein müssen,
d.h. korrespondierende Epipolarlinien liegen parallel und haben
identische Bildzeilenkoordinaten (
). Falls
diese Annahme nicht zutrifft, können die Bilder durch die Operatoren
calibrate_cameras calibrate_cameras CalibrateCameras calibrate_cameras CalibrateCameras CalibrateCameras ,
gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap und map_image map_image MapImage map_image MapImage MapImage
entzerrt werden. Ausgehend von einem Pixel im Referenzbild
ImageRect1 ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 kann dann das zugehörige Pixel in ImageRect2 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2
durch die Suche entlang der korrespondierenden Zeile in
ImageRect2 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 gefunden werden. Eine Übereinstimmung wird gefunden,
indem jeweils eine lokale Nachbarschaft um das entsprechende Pixel
innerhalb eines Fensters der Größe MaskWidth MaskWidth MaskWidth MaskWidth MaskWidth maskWidth und
MaskHeight MaskHeight MaskHeight MaskHeight MaskHeight maskHeight in beiden Bildern miteinander verglichen
wird. Für jedes definierte Referenzpixel wird die Pixelkorrespondenz
in einen Distanzwert des 3D Punktes transformiert, der durch den
Schnittpunkt der Sichtstrahlen durch beide korrespondierenden Pixel
definiert ist.
Für diese Transformation werden die
entzerrten internen Parameter für die Kamera 1 in
CamParamRect1 CamParamRect1 CamParamRect1 CamParamRect1 CamParamRect1 camParamRect1 und für die Kamera 2 in
CamParamRect2 CamParamRect2 CamParamRect2 CamParamRect2 CamParamRect2 camParamRect2 als auch die relativen externen
Kameraparameter RelPoseRect RelPoseRect RelPoseRect RelPoseRect RelPoseRect relPoseRect benötigt, welche die relative Lage
der beiden Kamerasysteme zueinander beschreibt und eine
Punkttransformation von dem entzerrten Kamerasystem 2 in das entzerrte
Kamerasystem 1 definiert. Die Werte für diese Parameter erhält man
beispielsweise von den Operatoren calibrate_cameras calibrate_cameras CalibrateCameras calibrate_cameras CalibrateCameras CalibrateCameras und
gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap . Ein Qualitätsmaß für jeden
Distanzwert wird in Score Score Score Score Score score zurückgegeben, welches jeweils
das beste Ergebnis der Korrelationsfunktion S für einen
Referenzpixel enthält. Für die Korrelation werden die
Grauwerte der originalen, nicht vorverarbeiteten Eingabebilder genutzt.
Die verwendete Korrelationsfunktion wird durch den Parameter
Method Method Method Method Method method bestimmt, welcher drei Arten unterscheidet:
'sad' "sad" "sad" "sad" "sad" "sad" : Summed Absolute Differences
'ssd' "ssd" "ssd" "ssd" "ssd" "ssd" : Summed Squared Differences
'nnc' "nnc" "nnc" "nnc" "nnc" "nnc" : Normalized Cross Correlation
wobei
r1, c1, r2, c2: Zeilen- und Spaltenkoordinaten der korrespondierenden Pixel
der beiden Eingabebilder,
g1, g2: Grauwerte der nicht vorverarbeiteten Eingabebilder,
N=(2m+1)(2n+1): Größe des Korrelationsfensters,
mittlerer Grauwert innerhalb eines
Korrelationsfensters der Breite 2m+1 und Höhe 2n+1.
Die Methoden 'sad' "sad" "sad" "sad" "sad" "sad" und 'ssd' "ssd" "ssd" "ssd" "ssd" "ssd" vergleichen
direkt die Grauwerte der Pixel innerhalb des Grauwertfensters, wohingegen
'ncc' "ncc" "ncc" "ncc" "ncc" "ncc" den mittleren Grauwert und seine Varianz innerhalb des
Grauwertfensters ausgleicht. Wenn zwei Bilder in ihrer Helligkeit und ihrem
Kontrast unterschiedlich sind, ist daher 'ncc' "ncc" "ncc" "ncc" "ncc" "ncc"
vorzuziehen. Ansonsten sind 'sad' "sad" "sad" "sad" "sad" "sad" und 'ssd' "ssd" "ssd" "ssd" "ssd" "ssd" vorzuziehen,
da sie aufgrund einfacherer interner Berechnungen schneller sind.
Es muss darauf geachtet werden, dass die Güte der Korrelation für
steigende S in den Methoden 'sad' "sad" "sad" "sad" "sad" "sad" und
'ssd' "ssd" "ssd" "ssd" "ssd" "ssd" fällt (die beste Güte ist 0), während sie in der
Methode 'ncc' "ncc" "ncc" "ncc" "ncc" "ncc" steigt (die beste Güte ist 1.0).
Die Größe des Korrelationsfensters, welche durch 2m+1
und 2n+1 in obigen Gleichungen referenziert wird, muss
ungeradzahlig sein und kann durch die Parameter MaskWidth MaskWidth MaskWidth MaskWidth MaskWidth maskWidth und
MaskHeight MaskHeight MaskHeight MaskHeight MaskHeight maskHeight festgelegt werden. Der Suchraum wird durch den minimalen
und maximalen Disparitätswert MinDisparity MinDisparity MinDisparity MinDisparity MinDisparity minDisparity und
MaxDisparity MaxDisparity MaxDisparity MaxDisparity MaxDisparity maxDisparity festgelegt. Da Grauwerte nicht außerhalb des
Bildrandes definiert sind wird die Bildregion des Distance Distance Distance Distance Distance distance
und Score Score Score Score Score score Bildes am unteren und oberen Bildrand um
(MaskHeight MaskHeight MaskHeight MaskHeight MaskHeight maskHeight -1)/2 sowie am linken und rechten Rand um
(MaskWidth MaskWidth MaskWidth MaskWidth MaskWidth maskWidth -1)/2 beschnitten. Aus dem gleichen Grund wird
der maximale Suchraum am linken und rechten Bildrand begrenzt.
Da die Korrelationsverfahren in schwach texturierten Bildregionen im
hohen Maße ungenau werden, kann die kleinste, innerhalb eines
Korrelationsfensters erlaubte Grauwertstreuung mit Hilfe des
Parameters TextureThresh TextureThresh TextureThresh TextureThresh TextureThresh textureThresh definiert werden. Dieser
Schwellwert wird auf beiden Eingabebildern ImageRect1 ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 und
ImageRect2 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 angewendet. Zusätzlich garantiert
ScoreThresh ScoreThresh ScoreThresh ScoreThresh ScoreThresh scoreThresh eine Mindestgüte der verwendeten
Korrelationsfunktion und legt für die Methoden 'sad' "sad" "sad" "sad" "sad" "sad" und
'ssd' "ssd" "ssd" "ssd" "ssd" "ssd" den größten, bzw. für 'ncc' "ncc" "ncc" "ncc" "ncc" "ncc" den kleinsten
zulässigen Korrelationswert fest. Wird ferner Filter Filter Filter Filter Filter filter auf
'left_right_check' "left_right_check" "left_right_check" "left_right_check" "left_right_check" "left_right_check" gesetzt, werden nur noch diejenigen
Disparitätswerte zurückgegeben, die übereinstimmend bei einer Suche
eines Referenzmusters von ImageRect1 ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 in ImageRect2 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 als
auch von ImageRect2 ImageRect2 ImageRect2 ImageRect2 ImageRect2 imageRect2 in ImageRect1 ImageRect1 ImageRect1 ImageRect1 ImageRect1 imageRect1 gefunden werden. Der
Wert 'none' "none" "none" "none" "none" "none" hingegen schaltet dieses Verhalten aus.
Die Anzahl der Pyramidenstufen, welche verwendet werden um das
Zeitverhalten von binocular_distance binocular_distance BinocularDistance binocular_distance BinocularDistance BinocularDistance zu verbessern, wird
durch den Parameter NumLevels NumLevels NumLevels NumLevels NumLevels numLevels bestimmt. Einem grob-zu-fein
Schema folgend werden die Disparitätsbilder der höheren Stufen
berechnet und in rechteckige Bildteile von ähnlicher Disparität
unterteilt um den Suchbereich auf der nächst niedrigeren Stufe für
diesen Bildausschnitt einzuschränken. TextureThresh TextureThresh TextureThresh TextureThresh TextureThresh textureThresh und
ScoreThresh ScoreThresh ScoreThresh ScoreThresh ScoreThresh scoreThresh werden auf jeder Stufe angewendet, so dass die
mit Distance Distance Distance Distance Distance distance und Score Score Score Score Score score zurückgegebene Bildregion
als die Schnittmenge der Bildregionen auf jeder einzelnen Stufe
definiert ist. Im Allgemeinen lohnt sich das Verwenden von
Pyramidenstrukturen um so mehr, je mehr das Distanzbild in homogene
Bereiche unterteilt werden kann und je größer der
Disparitätsbereich definiert werden muss. Auf der anderen Seite
können zu hohe Pyramidenstufen durch ihre grobe Auflösung wichtige
Texturinformationen verlieren, so dass falsche Distanzwerte
zurückgegeben werden können.
Der Wert 'interpolation' "interpolation" "interpolation" "interpolation" "interpolation" "interpolation" für den Parameter
SubDistance SubDistance SubDistance SubDistance SubDistance subDistance schließlich erhöht die Genauigkeit und
Unterteilung der Distanzwerte. Das Verhalten wird ausgeschaltet
indem der Parameter auf 'none' "none" "none" "none" "none" "none" gesetzt wird.
Bei der Verwendung von telezentrischen Kameras bezieht sich die
Distanz Distance Distance Distance Distance Distance distance nicht auf die Entfernung eines Punktes zum
Projektionszentrum einer Kamera. Die Entfernung wird zu der Ebene gemessen,
die durch die y-Achse beider Kameras und der Basis
(siehe gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap ) definiert ist.
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Automatisch parallelisiert auf interner Datenebene.
Rektifiziertes Bild von Kamera 1.
Rektifiziertes Bild von Kamera 2.
Maß für die Zuverlässigkeit eines Disparitätwertes.
Interne Kameraparameter der rektifizierten
Kamera 1.
Parameteranzahl: CamParamRect1 == 8 || CamParamRect1 == 12
Interne Kameraparameter der rektifizierten
Kamera 2.
Parameteranzahl: CamParamRect2 == 8 || CamParamRect2 == 12
Punkttransformation von entzerrter Kamera 2 zu
entzerrter Kamera 1.
Parameteranzahl: 7
Korrespondenzverfahren.
Defaultwert:
'ncc'
"ncc"
"ncc"
"ncc"
"ncc"
"ncc"
Werteliste: 'ncc' "ncc" "ncc" "ncc" "ncc" "ncc" , 'sad' "sad" "sad" "sad" "sad" "sad" , 'ssd' "ssd" "ssd" "ssd" "ssd" "ssd"
Breite des Korrelationsfensters.
Defaultwert: 11
Wertevorschläge: 5, 7, 9, 11, 21
Restriktion: 3 <= MaskWidth && odd(MaskWidth)
Höhe des Korrelationsfensters.
Defaultwert: 11
Wertevorschläge: 5, 7, 9, 11, 21
Restriktion: 3 <= MaskHeight && odd(MaskHeight)
Schwellwert der Grauwertvarianz.
Defaultwert: 0.0
Wertevorschläge: 0.0, 2.0, 5.0, 10.0
Restriktion: 0.0 <= TextureThresh
Minimale erwartete Disparität.
Defaultwert: 0
Typischer Wertebereich: -32768
≤
MinDisparity
MinDisparity
MinDisparity
MinDisparity
MinDisparity
minDisparity
≤
32767
Maximale erwartete Disparität.
Defaultwert: 30
Typischer Wertebereich: -32768
≤
MaxDisparity
MaxDisparity
MaxDisparity
MaxDisparity
MaxDisparity
maxDisparity
≤
32767
Anzahl der Pyramidenstufen.
Defaultwert: 1
Werteliste: 1, 2, 3, 4
Restriktion: 1 <= NumLevels
Schwellwert der Korrelationsfunktion.
Defaultwert: 0.0
Werteliste: 0.0, 2.0, 5.0, 10.0
.
Defaultwert:
'none'
"none"
"none"
"none"
"none"
"none"
Werteliste: 'left_right_check' "left_right_check" "left_right_check" "left_right_check" "left_right_check" "left_right_check" , 'none' "none" "none" "none" "none" "none"
Distanz Interpolation.
Defaultwert:
'none'
"none"
"none"
"none"
"none"
"none"
Werteliste: 'interpolation' "interpolation" "interpolation" "interpolation" "interpolation" "interpolation" , 'none' "none" "none" "none" "none" "none"
* read the internal and external stereo parameters
read_cam_par ('cam_left.dat', CamParam1)
read_cam_par ('cam_right.dat', CamParam2)
read_pose ('relpose.dat', RelPose)
* compute the mapping for rectified images
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'geometric', 'bilinear', \
CamParamRect1, CamParamRect2, \
Cam1PoseRect1, Cam2PoseRect2, RelPoseRect)
* compute the distance values in online images
while (1)
grab_image_async (Image1, AcqHandle1, -1)
map_image (Image1, Map1, ImageRect1)
grab_image_async (Image2, AcqHandle2, -1)
map_image (Image2, Map2, ImageRect2)
binocular_distance (ImageRect1, ImageRect2, Distance, Score, \
CamParamRect1, CamParamRect2, RelPoseRect, 'sad', \
11, 11, 20, -40, 20, 2, 25, \
'left_right_check', 'interpolation')
endwhile
* read the internal and external stereo parameters
read_cam_par ('cam_left.dat', CamParam1)
read_cam_par ('cam_right.dat', CamParam2)
read_pose ('relpose.dat', RelPose)
* compute the mapping for rectified images
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'geometric', 'bilinear', \
CamParamRect1, CamParamRect2, \
Cam1PoseRect1, Cam2PoseRect2, RelPoseRect)
* compute the distance values in online images
while (1)
grab_image_async (Image1, AcqHandle1, -1)
map_image (Image1, Map1, ImageRect1)
grab_image_async (Image2, AcqHandle2, -1)
map_image (Image2, Map2, ImageRect2)
binocular_distance (ImageRect1, ImageRect2, Distance, Score, \
CamParamRect1, CamParamRect2, RelPoseRect, 'sad', \
11, 11, 20, -40, 20, 2, 25, \
'left_right_check', 'interpolation')
endwhile
* read the internal and external stereo parameters
read_cam_par ('cam_left.dat', CamParam1)
read_cam_par ('cam_right.dat', CamParam2)
read_pose ('relpose.dat', RelPose)
* compute the mapping for rectified images
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'geometric', 'bilinear', \
CamParamRect1, CamParamRect2, \
Cam1PoseRect1, Cam2PoseRect2, RelPoseRect)
* compute the distance values in online images
while (1)
grab_image_async (Image1, AcqHandle1, -1)
map_image (Image1, Map1, ImageRect1)
grab_image_async (Image2, AcqHandle2, -1)
map_image (Image2, Map2, ImageRect2)
binocular_distance (ImageRect1, ImageRect2, Distance, Score, \
CamParamRect1, CamParamRect2, RelPoseRect, 'sad', \
11, 11, 20, -40, 20, 2, 25, \
'left_right_check', 'interpolation')
endwhile
// read the internal and external stereo parameters
read_cam_par("cam_left.dat",CamParam1);
read_cam_par("cam_right.dat",CamParam2);
read_pose("relpose.dat",RelPose);
// compute the mapping for rectified images
gen_binocular_rectification_map(&Map1,&Map2,CamParam1,CamParam2,RelPose,1,
"geometric","bilinear",&CamParamRect1,
&CamParamRect2,&CamPoseRect1,&CamPoseRect2,
&RelPoseRect);
// compute the distance values in online images
while (1)
{
grab_image_async(&Image1,AcqHandle1,-1);
map_image(Image1,Map1,&ImageRect1);
grab_image_async(&Image2,AcqHandle2,-1);
map_image(Image2,Map2,&ImageRect2);
binocular_distance(ImageRect1,ImageRect2,&Distance,&Score,
CamParamRect1,CamParamRect2,RelPose,"sad",11,11,
20,-40,20,2,25,"left_right_check","interpolation");
}
* read the internal and external stereo parameters
read_cam_par ('cam_left.dat', CamParam1)
read_cam_par ('cam_right.dat', CamParam2)
read_pose ('relpose.dat', RelPose)
* compute the mapping for rectified images
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'geometric', 'bilinear', \
CamParamRect1, CamParamRect2, \
Cam1PoseRect1, Cam2PoseRect2, RelPoseRect)
* compute the distance values in online images
while (1)
grab_image_async (Image1, AcqHandle1, -1)
map_image (Image1, Map1, ImageRect1)
grab_image_async (Image2, AcqHandle2, -1)
map_image (Image2, Map2, ImageRect2)
binocular_distance (ImageRect1, ImageRect2, Distance, Score, \
CamParamRect1, CamParamRect2, RelPoseRect, 'sad', \
11, 11, 20, -40, 20, 2, 25, \
'left_right_check', 'interpolation')
endwhile
* read the internal and external stereo parameters
read_cam_par ('cam_left.dat', CamParam1)
read_cam_par ('cam_right.dat', CamParam2)
read_pose ('relpose.dat', RelPose)
* compute the mapping for rectified images
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'geometric', 'bilinear', \
CamParamRect1, CamParamRect2, \
Cam1PoseRect1, Cam2PoseRect2, RelPoseRect)
* compute the distance values in online images
while (1)
grab_image_async (Image1, AcqHandle1, -1)
map_image (Image1, Map1, ImageRect1)
grab_image_async (Image2, AcqHandle2, -1)
map_image (Image2, Map2, ImageRect2)
binocular_distance (ImageRect1, ImageRect2, Distance, Score, \
CamParamRect1, CamParamRect2, RelPoseRect, 'sad', \
11, 11, 20, -40, 20, 2, 25, \
'left_right_check', 'interpolation')
endwhile
Sind die Parameterwerte korrekt, dann liefert
binocular_disparity binocular_disparity BinocularDisparity binocular_disparity BinocularDisparity BinocularDisparity den Wert 2 (H_MSG_TRUE).
map_image map_image MapImage map_image MapImage MapImage
threshold threshold Threshold threshold Threshold Threshold
binocular_distance_mg binocular_distance_mg BinocularDistanceMg binocular_distance_mg BinocularDistanceMg BinocularDistanceMg ,
binocular_distance_ms binocular_distance_ms BinocularDistanceMs binocular_distance_ms BinocularDistanceMs BinocularDistanceMs ,
binocular_disparity binocular_disparity BinocularDisparity binocular_disparity BinocularDisparity BinocularDisparity ,
binocular_disparity_mg binocular_disparity_mg BinocularDisparityMg binocular_disparity_mg BinocularDisparityMg BinocularDisparityMg ,
binocular_disparity_ms binocular_disparity_ms BinocularDisparityMs binocular_disparity_ms BinocularDisparityMs BinocularDisparityMs
map_image map_image MapImage map_image MapImage MapImage ,
gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap ,
binocular_calibration binocular_calibration BinocularCalibration binocular_calibration BinocularCalibration BinocularCalibration ,
distance_to_disparity distance_to_disparity DistanceToDisparity distance_to_disparity DistanceToDisparity DistanceToDisparity ,
disparity_to_distance disparity_to_distance DisparityToDistance disparity_to_distance DisparityToDistance DisparityToDistance ,
disparity_image_to_xyz disparity_image_to_xyz DisparityImageToXyz disparity_image_to_xyz DisparityImageToXyz DisparityImageToXyz
3D Metrology