Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biotracker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioroboticslab
biotracker
biotracker
Commits
eaee7fcf
Commit
eaee7fcf
authored
3 years ago
by
calrama
Browse files
Options
Downloads
Patches
Plain Diff
Fix a crash when image to display is completely black
parent
4291ea2d
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#42289
passed
3 years ago
Stage: build
Stage: package
Changes
1
Pipelines
10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Src/Model/TextureObject.cpp
+1
-1
1 addition, 1 deletion
Src/Model/TextureObject.cpp
with
1 addition
and
1 deletion
Src/Model/TextureObject.cpp
+
1
−
1
View file @
eaee7fcf
...
...
@@ -24,7 +24,7 @@ void TextureObject::set(const cv::Mat &img) {
// (usually 64F) so we need to map a [HUGE range] to -> [0 .. 255]
double
min
,
max
;
cv
::
minMaxLoc
(
img
,
&
min
,
&
max
);
if
(
min
>=
0
&&
min
<
255
&&
max
>
0
&&
max
<=
255
)
{
if
(
min
>=
0
&&
min
<
255
&&
max
>
=
0
&&
max
<=
255
)
{
// do not refit if the range is actually inbetween [0 ... 255]
img
.
convertTo
(
img8U
,
CV_8U
);
}
else
if
(
max
>
min
)
{
...
...
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