hoshiningen / depixelization Goto Github PK
View Code? Open in Web Editor NEWAn (incomplete) modern C++ implementation of Depixelizing Pixel Art by J. Kopf and D. Lischinski
License: MIT License
An (incomplete) modern C++ implementation of Depixelizing Pixel Art by J. Kopf and D. Lischinski
License: MIT License
There are portions of the algorithm that run slow as the size of the image increases. It gets to the point were at reasonably large images (100px by 100px, or so) that the performance becomes unbearably slow.
Investigate the less performant portions of the algorithm and develop solutions to address those issues.
Acceptance Criteria
I need to be able to read in a bitmap and create an 8-connected lattice graph based on the image dimensions. This story also has time baked into it for setting up the project and pulling in the correct libraries.
I run the code on Ubuntu 18.04 , cmake version 3.18.2, boost 1.72.0, GCC 8.2.0.
when I run cmake --build .
Like the Title, it throw me a Error message:
depixelization/source/utility/public/FileUtil.h:49:21: error: 'transform_reduce' is not a member of 'std' return std::transform_reduce(std::cbegin(value), std::cend(value), std::string{}, std::plus<std::string>{},
and
depixelization/source/utility/public/FileUtil.h:59:25: error: no match for 'operator==' (operand types are 'const std::__cxx11::basic_string<char>' and 'void') return item == toLower(filePath.extension().string());
thank you very much!
It's difficult to use the application in its current form. To output anything, it has to be done programmatically with calls to internal API. The application is intended to be a CLI, so what better time than now to get that configured.
Acceptance Criteria
The similarity graph, and possibly other pieces of the public API, expose internal calls that should not be accessible. These are not linked publically and will cause linker/compilation errors if one tries to use them.
Hi!
I've tried building this, and got a compile error (GCC 8.2.1):
[ 3%] Building CXX object source/reshaper/source/private/CMakeFiles/reshaper-impl.dir/ImageView.cpp.o
In file included from Depixelization/source/reshaper/source/private/ImageView.cpp:1:
Depixelization/source/reshaper/include/private/ImageView.h:220:6: error: no declaration matches ‘auto dpa::image::internal::ImageView<Channels, BitDepth>::ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels> >&) const’
auto ImageView<Channels, BitDepth>::ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels>>& array) const noexcept
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/ImageView.h:46:10: note: candidate is: ‘template<template<class> class Channels, class BitDepth> template<class Indices> auto dpa::image::internal::ImageView<Channels, BitDepth>::ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels> >&) const’
auto ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels>> & array) const noexcept;
^~~~~~~~~~~~
source/reshaper/include/private/ImageView.h:21:7: note: ‘class dpa::image::internal::ImageView<Channels, BitDepth>’ defined here
class ImageView final
^~~~~~~~~
This error is pretty challenging to digest, even to people calling themselves C++ programmers.
If that matters: I use cmake 3.15.5. Oh, indeed, here's also an output from [relatively old] Clang 7.0.1:
In file included from Depixelization/source/reshaper/source/private/ImageView.cpp:1:
In file included from Depixelization/source/reshaper/include/private/ImageView.h:3:
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:70:22: error: template template argument has different template parameters than its
corresponding template template parameter
struct channel_count<Y>
^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:44:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:76:22: error: template template argument has different template parameters than its
corresponding template template parameter
struct channel_count<YA>
^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:47:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:82:22: error: template template argument has different template parameters than its
corresponding template template parameter
struct channel_count<RGB>
^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:50:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:88:22: error: template template argument has different template parameters than its
corresponding template template parameter
struct channel_count<YCbCr>
^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:53:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:94:22: error: template template argument has different template parameters than its
corresponding template template parameter
struct channel_count<RGBA>
^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:56:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
^~~~~~~~~~~~~~~~~~
5 errors generated.
Can you fix this?
I'm not really sure how to post questions on github... so i made an issue.
Is the following struct variadicly inheriting from its template parameters?
The way the source directory structure is set up currently is redundant. I have a source/<project>/<source|include>
hierarchy currently, in which the source and header files are segregated. I'd like to combine the relevant source and header files into the same directory and simplify the source directory structures overall.
Acceptance Criteria
This is by design since we can construct new images that are not loaded from files. This is something I need to fix though since I'm not handling nullptr
exceptions well.
The similarity and voronoi graphs both use an inherited implementation class to hide the implementation details from the compiler. The way this was implemented, it can't support having constant methods in the public API of the class that inherits from the implementation class.
This is not ideal, as external methods can't accept const types with that implementation class. They have to take them by value or by reference.
void Render(SimilarityGraph& simGraph)
{
// This would be better if simGraph was constant because otherwise, it's able to modify the graph, and passing by value is expensive
}
Acceptance Criteria:
I need a way to verify that the project builds cross-platform, with a variety of compilers. Get a CI/CD system setup that is triggered on pull request.
Acceptance Criteria
Configure the project so that it can be bundled up as a package that can be installed. Packaging and installation needs to work cross-platform.
Acceptance Criteria:
cmake --install
Prepare the repo to accept contributors. Need to research the methods that people would be contributing (forks vs. adding contributors to a repo). I don't want code reviews to be focused on coding style, formatting, or other things that tools can enforce already.
Acceptance Criteria:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.