Compare commits
No commits in common. "aa4fc9195841eb6803c4e8497ff115bf2732b292" and "8fdcd1d966b9ab43a10a604552f3ad11f7526bad" have entirely different histories.
aa4fc91958
...
8fdcd1d966
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,4 @@
|
|||||||
build/
|
build/
|
||||||
out-imgs
|
|
||||||
*.jp*g
|
*.jp*g
|
||||||
*.JP*G
|
*.JP*G
|
||||||
*.png
|
*.png
|
||||||
*.kra
|
|
30
Makefile
30
Makefile
@ -1,30 +0,0 @@
|
|||||||
IN_IMGS := imgs
|
|
||||||
OUT_IMGS := out-imgs
|
|
||||||
BIN := build/seam-carving --silent
|
|
||||||
|
|
||||||
images: images-ign images-birds
|
|
||||||
|
|
||||||
|
|
||||||
images-dir:
|
|
||||||
mkdir -p $(OUT_IMGS)
|
|
||||||
|
|
||||||
images-birds: build/seam-carving
|
|
||||||
$(BIN) -s $(IN_IMGS)/birds.jpg -m $(IN_IMGS)/birds-mask.jpg -o $(OUT_IMGS)/vertical-birds.jpg -u --vertical
|
|
||||||
$(BIN) -s $(IN_IMGS)/birds.jpg -m $(IN_IMGS)/birds-mask.jpg -o $(OUT_IMGS)/horizontal-birds.jpg -u
|
|
||||||
|
|
||||||
images-ign: build/seam-carving
|
|
||||||
$(BIN) -s $(IN_IMGS)/ign-circled.png -m $(IN_IMGS)/ign-mask.jpg -o $(OUT_IMGS)/ign-maxstep3-seams.jpg -u --max-step 3 --show-seams
|
|
||||||
$(BIN) -s $(IN_IMGS)/ign-circled.png -m $(IN_IMGS)/ign-mask.jpg -o $(OUT_IMGS)/ign-maxstep3.jpg -u --max-step 3
|
|
||||||
$(BIN) -s $(IN_IMGS)/ign-circled.png -m $(IN_IMGS)/ign-mask.jpg -o $(OUT_IMGS)/ign-maxstep15.jpg -u --max-step 15
|
|
||||||
|
|
||||||
images-boat: build/seam-carving
|
|
||||||
$(BIN) -s $(IN_IMGS)/boat.jpg -o $(OUT_IMGS)/boat-seams.jpg -n 350 --show-seams
|
|
||||||
$(BIN) -s $(IN_IMGS)/boat.jpg -o $(OUT_IMGS)/boat.jpg -n 350
|
|
||||||
|
|
||||||
build/seam-carving: src/seam-carving.cpp src/utils.cpp src/utils.hpp
|
|
||||||
mkdir -p build
|
|
||||||
cd build && cmake .. -DCMAKE_BUILD_TYPE=Release; make -j7
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm $(OUT_IMGS) -rf
|
|
||||||
rm build -rf
|
|
BIN
imgs/boat.jpg
BIN
imgs/boat.jpg
Binary file not shown.
Before Width: | Height: | Size: 288 KiB |
@ -436,7 +436,7 @@ auto seam_carving(unsigned char *source, int width, int height, int nbChannels,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SimpleProgressBar::ProgressBar bar(until_mask_removal ? dim_large : nbSeams);
|
SimpleProgressBar::ProgressBar bar(until_mask_removal ? dim_large : nbSeams);
|
||||||
if (!silent) bar.print();
|
bar.print();
|
||||||
|
|
||||||
auto seam_index = 0;
|
auto seam_index = 0;
|
||||||
while (seam_index++ < nbSeams || until_mask_removal) {
|
while (seam_index++ < nbSeams || until_mask_removal) {
|
||||||
@ -485,10 +485,9 @@ auto seam_carving(unsigned char *source, int width, int height, int nbChannels,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
bar.increment();
|
bar.increment();
|
||||||
if (!silent) bar.print();
|
bar.print();
|
||||||
}
|
}
|
||||||
// Add newline after ProgressBar
|
std::cout << std::endl; // Add newline after ProgressBar
|
||||||
if (!silent) std::cout << std::endl;
|
|
||||||
|
|
||||||
if (show_seams) {
|
if (show_seams) {
|
||||||
return std::make_tuple(test_energy_output, width, height, nbChannels);
|
return std::make_tuple(test_energy_output, width, height, nbChannels);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user