Skip to content

Commit 9248344

Browse files
committed
Merge branch 'relightlab.1'
2 parents 1cc7ef5 + 0d000dc commit 9248344

File tree

221 files changed

+9216
-488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+9216
-488
lines changed

.github/workflows/CreateRelease.yml

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
- name: Change Permissions
112112
run: |
113113
chmod +x relightlab_linux_portable/usr/bin/relight
114+
chmod +x relightlab_linux_portable/usr/bin/relightlab
114115
chmod +x relightlab_linux_portable/usr/bin/relight-cli
115116
chmod +x relightlab_linux_portable/usr/bin/relight-merge
116117
chmod +x relightlab_linux_portable/AppRun
@@ -144,6 +145,7 @@ jobs:
144145
path: relightlab_macos_portable
145146
- name: Change Permissions
146147
run: |
148+
chmod +x relightlab_macos_portable/RelightLab*.app/Contents/MacOS/relightlab
147149
chmod +x relightlab_macos_portable/RelightLab*.app/Contents/MacOS/relight
148150
chmod +x relightlab_macos_portable/RelightLab*.app/Contents/MacOS/relight-cli
149151
chmod +x relightlab_macos_portable/RelightLab*.app/Contents/MacOS/relight-merge

CMakeLists.txt

+9-1
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,17 @@ endif()
4545
if(MSVC)
4646
set(JPEGTURBO_HOME ${CMAKE_CURRENT_SOURCE_DIR}/external/libjpeg-turbo-2.0.6)
4747
set(JPEG_INCLUDE_DIR ${JPEGTURBO_HOME}/include)
48-
set(JPEG_LIBRARIES ${JPEGTURBO_HOME}/lib/jpeg.lib)
48+
set(JPEG_LIBRARIES ${JPEGTURBO_HOME}/lib/jpeg.lib)
4949
else()
5050
find_package (JPEG REQUIRED)
5151
endif()
52+
53+
find_package (TIFF)
54+
if(NOT TIFF_FOUND)
55+
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/external/tiff-4.7.0)
56+
add_library(TIFF::TIFF ALIAS tiff)
57+
endif()
58+
5259

5360
find_package (TIFF)
5461
if(NOT TIFF_FOUND)
@@ -78,5 +85,6 @@ endif()
7885
include(GNUInstallDirs)
7986

8087
add_subdirectory(relight)
88+
add_subdirectory(relightlab)
8189
add_subdirectory(relight-cli)
8290
add_subdirectory(relight-merge)

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ $ cmake .
161161
$ make
162162
```
163163

164-
165164
### MacOS
166165

167166
Installed tools:

build_scripts/Linux/1_build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Requires a Qt environment which is set-up properly, and an accessible
55
# cmake binary.
66
#
7-
# Without given arguments, relight will be built in the relight/build
7+
# Without given arguments, relightlab will be built in the relightlab/build
88
# directory, and installed in $BUILD_PATH/../install.
99
#
1010
# You can give as argument the BUILD_PATH and the INSTALL_PATH in the

build_scripts/Linux/2_deploy.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
# This is a script shell for deploying a relight-portable folder, and an appimage.
3-
# Requires a properly built relight (see 1_build.sh).
3+
# Requires a properly built relightlab (see 1_build.sh).
44
#
5-
# Without given arguments, the folder that will be deployed is relight/install, which
6-
# should be the path where relight has been installed (default output of 1_build.sh).
5+
# Without given arguments, the folder that will be deployed is relightlab/install, which
6+
# should be the path where relightlab has been installed (default output of 1_build.sh).
77
#
8-
# You can give as argument the path where you installed relight.
8+
# You can give as argument the path where you installed relightlab.
99

1010
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
1111
INSTALL_PATH=$SCRIPTS_PATH/../../install

build_scripts/Linux/internal/2a_make_bundle.sh

+2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ done
2121
mkdir -p $INSTALL_PATH/usr/share/applications/
2222
mkdir -p $INSTALL_PATH/usr/share/icons/Yaru/512x512/apps/
2323
cp $SCRIPTS_PATH/resources/relight.desktop $INSTALL_PATH/usr/share/applications/relight.desktop
24+
cp $SCRIPTS_PATH/resources/relightlab.desktop $INSTALL_PATH/usr/share/applications/relightlab.desktop
2425
cp $SCRIPTS_PATH/../relight.png $INSTALL_PATH/usr/share/icons/Yaru/512x512/apps/relight.png
2526

2627
chmod +x $INSTALL_PATH/usr/bin/relight
28+
chmod +x $INSTALL_PATH/usr/bin/relightlab
2729
chmod +x $INSTALL_PATH/usr/bin/relight-cli
2830
chmod +x $INSTALL_PATH/usr/bin/relight-merge

build_scripts/Linux/internal/2c_portable.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fi
3333
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_PATH/usr/lib
3434

3535
if $SCRIPTS_PATH/resources/linuxdeploy --appdir=$INSTALL_PATH --plugin qt; then
36-
echo "$INSTALL_PATH is now a self contained meshlab application"
36+
echo "$INSTALL_PATH is now a self contained relight application"
3737
else
3838
echo "linuxdeploy failed with error code $?. Script was not completed successfully."
3939
exit 1

build_scripts/Linux/make_it.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
# Requires a Qt environment which is set-up properly, and an accessible
55
# cmake binary.
66
#
7-
# Without given arguments, ReLight will be built in the relight/build,
8-
# the folder relight/install will be a portable version of ReLight and
9-
# the AppImage will be placed in the relight folder.
7+
# Without given arguments, RelightLab will be built in the relightlab/build,
8+
# the folder relightlab/install will be a portable version of RelightLab and
9+
# the AppImage will be placed in the relightlab folder.
1010
#
1111
# You can give as argument the build path, the install path (that will contain
12-
# the portable version of ReLight), and the number of cores to use to build ReLight
12+
# the portable version of RelightLab), and the number of cores to use to build RelightLab
1313
# (default: 4).
1414
# The AppImage will be placed in the parent directory of the install path.
1515
#

build_scripts/Linux/resources/relight.desktop build_scripts/Linux/resources/relightlab.desktop

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Type=Application
44
Name=RelightLab
55
GenericName=Image relighting
66
Comment=Create and view relightable images
7-
Exec=relight %F
7+
Exec=relightlab %F
88
Icon=relight
99
Terminal=false
1010
Categories=Graphics;3DGraphics;Viewer;Qt;
11-
Name[en_US]=relight.desktop
11+
Name[en_US]=relightlab.desktop

build_scripts/Windows/1_build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Requires a VS >= 2017 and Qt environments which are set-up properly,
44
# and an accessible cmake binary.
55
#
6-
# Without given arguments, relight will be built in the relight/build
6+
# Without given arguments, relight will be built in the relightlab/build
77
# directory, and installed in $BUILD_PATH/../install.
88
#
99
# You can give as argument the BUILD_PATH and the INSTALL_PATH in the

build_scripts/Windows/2_deploy.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22
# This is a script shell for deploying a relight-portable folder.
3-
# Requires a properly built relight (see 1_build.sh).
3+
# Requires a properly built relightlab (see 1_build.sh).
44
#
5-
# Without given arguments, the folder that will be deployed is relight/install.
5+
# Without given arguments, the folder that will be deployed is relightlab/install.
66
#
7-
# You can give as argument the path where relight is installed.
7+
# You can give as argument the path where relightlab is installed.
88

99
SCRIPTS_PATH="$(dirname "$(realpath "$0")")"
1010
INSTALL_PATH=$SCRIPTS_PATH/../../install

build_scripts/Windows/internal/2a_portable.sh

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ esac
2323
done
2424

2525
${QT_DIR}windeployqt $INSTALL_PATH/relight.exe
26+
${QT_DIR}windeployqt $INSTALL_PATH/relightlab.exe
27+
2628

2729
# remove all .lib files
2830
for file in $(find $INSTALL_PATH -name '*.lib');

build_scripts/macOS/0_setup_env.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ esac
2323
done
2424

2525

26-
brew install coreutils cmake ninja libomp eigen libjpeg
26+
brew install coreutils cmake ninja libomp eigen libjpeg libtiff
27+
2728
npm install -g appdmg
2829

2930
if [ "$DONT_INSTALL_QT" = false ] ; then

build_scripts/macOS/1_build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
2-
# this is a script shell for compiling relight in a MacOS environment.
2+
# this is a script shell for compiling relightlab in a MacOS environment.
33
# Requires a Qt environment which is set-up properly, and an accessible
44
# cmake binary.
55
#
6-
# Without given arguments, relight will be built in the meshlab/src/build
6+
# Without given arguments, relightlab will be built in the relightlab/src/build
77
# directory, and installed in $BUILD_PATH/../install.
88
#
99
# You can give as argument the BUILD_PATH and the INSTALL_PATH in the

build_scripts/macOS/internal/2a_appbundle.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
44

55
INSTALL_PATH=$SCRIPTS_PATH/../../install
66
QT_DIR=""
7-
APPNAME="relight.app"
7+
APPNAME="relightlab.app"
88

99
#checking for parameters
1010
for i in "$@"

build_scripts/macOS/internal/2b_sign_appbundle.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SCRIPTS_PATH="$(dirname "$(realpath "$0")")"/..
44

55
INSTALL_PATH=$SCRIPTS_PATH/../../install
66
CERT_ID=""
7-
APPNAME="relight.app"
7+
APPNAME="relightlab.app"
88

99
#checking for parameters
1010
for i in "$@"

build_scripts/macOS/internal/2c_notarize_appbundle.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ INSTALL_PATH=$SCRIPTS_PATH/../../install
66
NOTAR_USER=""
77
NOTAR_PASSWORD=""
88
NOTAR_TEAM_ID=""
9-
APPNAME="relight.app"
9+
APPNAME="relightlab.app"
1010

1111
#checking for parameters
1212
for i in "$@"

build_scripts/macOS/internal/2d_dmg.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ sed "s%INST_PATH%$INSTALL_PATH%g" $SCRIPTS_PATH/resources/dmg_latest.json > $SCR
3333
sed -i '' "s%RL_VERSION%$RL_VERSION%g" $SCRIPTS_PATH/resources/dmg_final.json
3434
sed -i '' "s%SOURCE_PATH%$SOURCE_PATH%g" $SCRIPTS_PATH/resources/dmg_final.json
3535

36-
mv $INSTALL_PATH/relight.app $INSTALL_PATH/RelightLab$RL_VERSION.app
36+
mv $INSTALL_PATH/relightlab.app $INSTALL_PATH/RelightLab$RL_VERSION.app
3737

3838
mkdir $PACKAGES_PATH
3939

build_scripts/macOS/make_it.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This is a script shell for compiling and deploying ReLight in a MacOS environment.
2+
# This is a script shell for compiling and deploying RelightLab in a MacOS environment.
33
#
44
# Requires a Qt environment which is set-up properly, and an accessible
55
# cmake binary.
@@ -41,4 +41,4 @@ esac
4141
done
4242

4343
bash $SCRIPTS_PATH/1_build.sh -b=$BUILD_PATH -i=$INSTALL_PATH $QT_DIR_OPTION $CORES
44-
bash $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH $QT_DIR_OPTION
44+
bash $SCRIPTS_PATH/2_deploy.sh -i=$INSTALL_PATH $QT_DIR_OPTION

build_scripts/relightlab.icns

106 KB
Binary file not shown.

normal_integration/normal_integration.pro

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ HEADERS += \
1515
../src/bni_normal_integration.h
1616

1717

18+
unix:INCLUDEPATH += /usr/include/eigen3
1819
win32:INCLUDEPATH += ../external/eigen-3.4.0/
1920

2021
unix:INCLUDEPATH += /usr/include/eigen3
2122
unix:INCLUDEPATH += ../external/eigen-3.4.0/
22-
unix:LIBS += -lgomp #-liomp5
23+
unix:LIBS += -lgomp -ltiff #-liomp5
2324
unix:QMAKE_CXXFLAGS += -fopenmp
2425

2526

relight-cli/main.cpp

+10-9
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,16 @@ int main(int argc, char *argv[]) {
137137
cerr << "Invalid resolution (must be 0 or >= 2 && <= 20)!\n" << endl;
138138
return 1;
139139
}
140-
break;
141-
}
142-
case 'P':
143-
builder.pixelSize = atof(optarg);
144-
if(builder.pixelSize <= 0) {
145-
cerr << "Invalid parameter pixelSize (-P): " << optarg << endl;
146-
return 1;
147-
}
148-
break;
140+
break;
141+
}
142+
case 'P':
143+
builder.pixelSize = atof(optarg);
144+
if(builder.pixelSize <= 0) {
145+
cerr << "Invalid parameter pixelSize (-P): " << optarg << endl;
146+
return 1;
147+
}
148+
149+
break;
149150
case 'b': {
150151
string b = optarg;
151152
if(b == "rbf") {

relight/dstretchtask.cpp

+12-13
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@
1414

1515
void DStretchTask::run()
1616
{
17-
uint32_t minSamples;
17+
uint32_t minSamples;
1818
std::function<bool(QString s, int n)> callback = [this](QString s, int n)->bool { return this->progressed(s, n); };
19-
status = RUNNING;
19+
status = RUNNING;
2020

21-
// Get sample rate
22-
if (hasParameter("min_samples"))
23-
minSamples = (*this)["min_samples"].value.toInt();
24-
else {
25-
error = "Unspecified sample rate";
26-
status = FAILED;
27-
return;
28-
}
21+
// Get sample rate
22+
if (hasParameter("min_samples"))
23+
minSamples = (*this)["min_samples"].value.toInt();
24+
else {
25+
error = "Unspecified sample rate";
26+
status = FAILED;
27+
return;
28+
}
2929

30-
dstretchImage(input_folder, output, minSamples, callback);
31-
status = DONE;
30+
dstretchImage(input_folder, output, minSamples, callback);
31+
status = DONE;
3232
}
33-

relight/dstretchtask.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ class DStretchTask : public Task
88
{
99
public:
1010
DStretchTask(QObject *parent) : Task(parent) {}
11+
1112
virtual ~DStretchTask(){}
1213
virtual void run() override;
13-
1414
};
1515

1616
#endif // DSTRETCHTASK_H

0 commit comments

Comments
 (0)