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
9cc1b5fc
Commit
9cc1b5fc
authored
4 years ago
by
d.kilic
Browse files
Options
Downloads
Plain Diff
Merge branch '99-adding-border-does-not-work-properly' into 'master'
Resolve "Adding border does not work properly" Closes
#99
See merge request
!62
parents
0058ac32
3d9d4df1
No related branches found
No related tags found
1 merge request
!62
Resolve "Adding border does not work properly"
Pipeline
#27060
passed
4 years ago
Stage: build_environment
Stage: build
Stage: test
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/filter.cpp
+17
-50
17 additions, 50 deletions
src/filter.cpp
with
17 additions
and
50 deletions
src/filter.cpp
+
17
−
50
View file @
9cc1b5fc
...
...
@@ -119,73 +119,40 @@ void Filter::setChanged(bool b)
mChg
=
b
;
}
//void Filter::setResStored(bool b)
//{
// mResStored=b;
//}
/**
* @brief Applies filter and sets changed to false
*
* Applies the filter and after that sets changed to false
* The filter is only applied, when it is enabled, else
* the img just gets returned without filtering.
*
* @param img Image to apply filter to
* @return filtered image
*/
Mat
Filter
::
apply
(
Mat
&
img
)
{
mChg
=
false
;
if
(
getEnabled
())
{
if
(
getOnCopy
())
{
// mResStored = true;
Mat
res
(
Size
(
img
.
cols
,
img
.
rows
),
CV_8UC
(
img
.
channels
()));
return
mRes
=
act
(
img
,
res
);
mRes
=
act
(
img
,
res
);
mChg
=
false
;
return
mRes
;
}
else
{
// mResStored = false;
return
mRes
=
act
(
img
,
img
);
mRes
=
act
(
img
,
img
);
mChg
=
false
;
return
mRes
;
}
}
else
{
// mRes = img;
// mResStored = false;
mChg
=
false
;
return
mRes
=
img
;
}
}
// apply on original Data
//IplImage* Filter::apply(IplImage *img)
//{
// mChg = false; // dass sich filter mit param gaendert haben kann zurueckgesetzt weren
// // da der filter nun angewandt wird
// if (mResStored == true) // wenn beim letzten Mal Speicherplatz angelegt wurde
// cvReleaseImage(&mRes);
// if (getEnabled())
// {
// if (getOnCopy())
// {
// mResStored = true;
// IplImage *res = cvCreateImage(cvGetSize(img),8,img->nChannels);
// //res->origin = img->origin; // because 1 - bottom-left origin (Windows bitmaps style) is not default!!!
// mRes=act(img, res);// depth/Farbtiefe pro Kanal 8, channels/Kanaele == 1 oder 3 bei mir erlaubt
// cvReleaseImage(&res);
// return mRes;
// }
// else
// {
// // hier muesste noch beachtet werden, dass mIplImage von hauptanwendung nicht uebergeben wurde!!!!
// mResStored = false;
// return mRes=act(img, img);
// }
// }
// else
// {
// mResStored = false;
// return mRes=img;
// }
//}
Mat
Filter
::
getLastResult
()
{
return
mRes
;
...
...
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