Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PeTrack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pedestrian Dynamics Empiricism
PeTrack
Commits
e6619fd1
Commit
e6619fd1
authored
1 month ago
by
l.dressen
Browse files
Options
Downloads
Plain Diff
Merge branch '438-drawing-of-calibration-points-crashes-on-more-2d-than-3d-points' into 'master'
fix crash on more 2D points than 3D points Closes
#438
See merge request
!413
parents
13393810
ed12f1ff
No related branches found
Branches containing commit
No related tags found
1 merge request
!413
fix crash on more 2D points than 3D points
Pipeline
#191244
passed
1 month ago
Stage: docs
Stage: pre-build-checks
Stage: build
Stage: test
Stage: build_installer
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/calibration/extrCalibration.cpp
+1
-3
1 addition, 3 deletions
src/calibration/extrCalibration.cpp
src/ui/visualization/coordItem.cpp
+22
-20
22 additions, 20 deletions
src/ui/visualization/coordItem.cpp
with
23 additions
and
23 deletions
src/calibration/extrCalibration.cpp
+
1
−
3
View file @
e6619fd1
...
...
@@ -690,9 +690,7 @@ bool ExtrCalibration::calcReprojectionError(const ExtrinsicParameters &extrParam
max_px
,
mControlWidget
->
getDefaultHeight
()};
return
reprojectionError
.
pointHeightAvg
()
>
MAX_AV_ERROR
?
false
:
true
;
// Falls pixel fehler im schnitt > 20 ist das Ergebnis nicht akzeptabel
return
reprojectionError
.
pointHeightAvg
()
<=
MAX_AV_ERROR
;
// if average error > 20, result is not acceptable
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/ui/visualization/coordItem.cpp
+
22
−
20
View file @
e6619fd1
...
...
@@ -199,31 +199,33 @@ void CoordItem::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*opti
cv
::
Point2f
p2
=
extCalib
->
get2DList
().
at
(
i
);
painter
->
drawEllipse
(
p2
.
x
-
8
,
p2
.
y
-
8
,
16
,
16
);
// general configuration
painter
->
setPen
(
Qt
::
blue
);
painter
->
setBrush
(
Qt
::
blue
);
// Projected 3D-Points
cv
::
Point3f
p3d
=
extCalib
->
get3DList
().
at
(
i
);
auto
trans
=
mCoordSys
->
getCoordTrans3D
();
p3d
-=
trans
.
toCvPoint
();
// Show point number
painter
->
setPen
(
Qt
::
black
);
painter
->
setBrush
(
Qt
::
black
);
painter
->
drawText
(
QPointF
(
p2
.
x
+
10
,
p2
.
y
+
font
.
pixelSize
()),
QObject
::
tr
(
"%1"
).
arg
((
i
+
1
)));
auto
swap
=
mCoordSys
->
getSwap3D
();
p3d
.
x
*=
(
swap
.
x
?
-
1
:
1
);
p3d
.
y
*=
(
swap
.
y
?
-
1
:
1
);
p3d
.
z
*=
(
swap
.
z
?
-
1
:
1
);
if
(
i
<
extCalib
->
get3DList
().
size
())
{
// general configuration
painter
->
setPen
(
Qt
::
blue
);
painter
->
setBrush
(
Qt
::
blue
);
// Projected 3D-Points
cv
::
Point3f
p3d
=
extCalib
->
get3DList
().
at
(
i
);
auto
trans
=
mCoordSys
->
getCoordTrans3D
();
p3d
-=
trans
.
toCvPoint
();
cv
::
Point2f
p3
=
extCalib
->
getImagePoint
(
p3d
);
auto
swap
=
mCoordSys
->
getSwap3D
();
p3d
.
x
*=
(
swap
.
x
?
-
1
:
1
);
p3d
.
y
*=
(
swap
.
y
?
-
1
:
1
);
p3d
.
z
*=
(
swap
.
z
?
-
1
:
1
);
painter
->
drawEllipse
(
p3
.
x
-
4
,
p3
.
y
-
4
,
8
,
8
);
cv
::
Point2f
p3
=
extCalib
->
getImagePoint
(
p3d
);
// Connecting-line Pixel-3D-Points
painter
->
drawLine
(
QPointF
(
p2
.
x
,
p2
.
y
),
QPointF
(
p3
.
x
,
p3
.
y
));
painter
->
drawEllipse
(
p3
.
x
-
4
,
p3
.
y
-
4
,
8
,
8
);
// Show point number
painter
->
setPen
(
Qt
::
black
);
painter
->
setBrush
(
Qt
::
black
);
painter
->
drawText
(
QPointF
(
p2
.
x
+
10
,
p2
.
y
+
font
.
pixelSize
()),
QObject
::
tr
(
"%1"
).
arg
((
i
+
1
)));
// Connecting-line Pixel-3D-Points
painter
->
drawLine
(
QPointF
(
p2
.
x
,
p2
.
y
),
QPointF
(
p3
.
x
,
p3
.
y
));
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment