Skip to content

Commit c777165

Browse files
author
Jakub Krstufek
committed
Doxygen comment + change name of method
1 parent fa4b9f0 commit c777165

File tree

6 files changed

+77
-44
lines changed

6 files changed

+77
-44
lines changed

TMOLu14/CMakeLists.txt renamed to TMOLiu16/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ tmo
1818
)
1919

2020
SET(TMO_SOURCES
21-
TMOLu14.cpp
21+
TMOLiu16.cpp
2222
TMOPlugin.cpp
2323
)
2424

2525

2626
SET(TMOWARD_HEADERS
27-
TMOLu14.h
27+
TMOLiu16.h
2828
TMOPlugin.h
2929
)
3030

3131

32-
add_library( lu14 SHARED ${TMO_SOURCES} )
33-
add_custom_command( TARGET lu14 POST_BUILD
34-
COMMAND cp -f liblu14.so ../TMOCmd/lu14.tml
35-
COMMAND cp -f liblu14.so ../TMOgui/lu14.tml
36-
COMMAND cp -f liblu14.so ../lu14.tml
37-
# COMMAND rm -f liblu14.so
32+
add_library( liu16 SHARED ${TMO_SOURCES} )
33+
add_custom_command( TARGET liu16 POST_BUILD
34+
COMMAND cp -f libliu16.so ../TMOCmd/liu16.tml
35+
COMMAND cp -f libliu16.so ../TMOgui/liu16.tml
36+
COMMAND cp -f libliu16.so ../liu16.tml
37+
# COMMAND rm -f libliu16.so
3838
)
3939

4040

TMOLu14/TMOLu14.cpp renamed to TMOLiu16/TMOLiu16.cpp

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
1+
/************************************************************************************
2+
* *
3+
* Brno University of Technology *
4+
* CPhoto@FIT *
5+
* *
6+
* Tone Mapping Studio *
7+
* *
8+
* Author: Jakub Krystufek *
9+
* Brno 2024 *
10+
* *
11+
* Implementation of the SPDecolor method *
12+
* Credits to Matlab implementation *
13+
* https://github.com/yqx7150/SPDecolor *
14+
* *
15+
************************************************************************************/
16+
117
/* --------------------------------------------------------------------------- *
2-
* TMOLu14.cpp: implementation of the TMOLu14 class. *
3-
* Credits to Matlab implementation https://github.com/yqx7150/SPDecolor *
418
* --------------------------------------------------------------------------- */
519

620
#include <opencv2/opencv.hpp>
721
#include <vector>
822
#include <algorithm>
923
#include <random>
1024
#include <chrono>
11-
#include "TMOLu14.h"
25+
#include "TMOLiu16.h"
1226

13-
TMOLu14::TMOLu14()
27+
TMOLiu16::TMOLiu16()
1428
{
15-
SetName(L"TMOLu14");
29+
SetName(L"TMOLiu16");
1630
SetDescription(L"Semiparametric Decolorization With Laplacian-Based Perceptual Quality Metric");
1731

1832
sigmaParameter.SetName(L"Sigma");
@@ -23,7 +37,7 @@ TMOLu14::TMOLu14()
2337
this->Register(sigmaParameter);
2438
}
2539

26-
TMOLu14::~TMOLu14()
40+
TMOLiu16::~TMOLiu16()
2741
{
2842
}
2943

@@ -78,7 +92,7 @@ cv::Mat weak_order(const cv::Mat& polyGrad) {
7892
return alf;
7993
}
8094

81-
cv::Mat TMOLu14::calculatePolyGrad(const cv::Mat& img, int order) {
95+
cv::Mat TMOLiu16::calculatePolyGrad(const cv::Mat& img, int order) {
8296
// Resize image to roughly constant pixel count
8397
double factor = 64.0/std::sqrt(img.rows*img.cols);
8498

@@ -301,7 +315,7 @@ cv::Mat grayImContruct(const std::vector<double>& wei, const cv::Mat& Im, int or
301315
}
302316

303317

304-
int TMOLu14::Transform()
318+
int TMOLiu16::Transform()
305319
{
306320
// Parameters and initial setup
307321
double pre_E = std::numeric_limits<double>::infinity();

TMOLiu16/TMOLiu16.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/************************************************************************************
2+
* *
3+
* Brno University of Technology *
4+
* CPhoto@FIT *
5+
* *
6+
* Tone Mapping Studio *
7+
* *
8+
* Author: Jakub Krystufek *
9+
* Brno 2024 *
10+
* *
11+
* Implementation of the SPDecolor method *
12+
* Credits to Matlab implementation *
13+
* https://github.com/yqx7150/SPDecolor *
14+
* *
15+
************************************************************************************/
16+
17+
#include "TMO.h"
18+
19+
class TMOLiu16 : public TMO
20+
{
21+
public:
22+
TMOLiu16();
23+
virtual ~TMOLiu16();
24+
virtual int Transform();
25+
cv::Mat calculatePolyGrad(const cv::Mat& img, int order);
26+
protected:
27+
cv::Mat powElement(const cv::Mat& base, int exp);
28+
TMODouble sigmaParameter;
29+
};

TMOLu14/TMOPlugin.cpp renamed to TMOLiu16/TMOPlugin.cpp

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
/* -------------------------------------------------------------------- *
2-
* TMOPlugin.cpp : Template for tone mapping operator plugin *
3-
* in Tone Mapping Studio 2004 *
4-
* -------------------------------------------------------------------- *
5-
* *
6-
* Put this file into a DLL project with your plugin functions and *
7-
* replace commented sections below. *
8-
* *
9-
* Add this preprocesor definition to the project setings : *
10-
* *
11-
* TMOPLUGIN_EXPORTS *
12-
* *
13-
* -------------------------------------------------------------------- */
1+
/************************************************************************************
2+
* *
3+
* Brno University of Technology *
4+
* CPhoto@FIT *
5+
* *
6+
* Tone Mapping Studio *
7+
* *
8+
* Author: Jakub Krystufek *
9+
* Brno 2024 *
10+
* *
11+
* Implementation of the SPDecolor method *
12+
* Credits to Matlab implementation *
13+
* https://github.com/yqx7150/SPDecolor *
14+
* *
15+
************************************************************************************/
16+
1417
#include "./TMOPlugin.h"
1518

1619
/* -------------------------------------------------------------------- *
1720
* Insert your operator header below *
1821
* -------------------------------------------------------------------- */
19-
#include "./TMOLu14.h"
22+
#include "./TMOLiu16.h"
2023

2124
/* -------------------------------------------------------------------- *
2225
* Insert a number of implemented operators *
@@ -64,7 +67,7 @@ int TMOPLUGIN_API OperatorCount()
6467
* -------------------------------------------------------------------- */
6568
int TMOPLUGIN_API EnumOperators(TMO **operators)
6669
{
67-
operators[0] = new TMOLu14;
70+
operators[0] = new TMOLiu16;
6871
return iOperatorCount;
6972
}
7073

File renamed without changes.

TMOLu14/TMOLu14.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)