janhett / spice Goto Github PK
View Code? Open in Web Editor NEWAn image processing library
Home Page: https://janhett.github.io/spice/
License: GNU General Public License v3.0
An image processing library
Home Page: https://janhett.github.io/spice/
License: GNU General Public License v3.0
spice needs a way to compose images together. An interface akin to this is to be implemented:
image<float> bg;
image<float> fg;
// ... load data into background and foreground images ...
// create transformation matrix using one of these methods:
// very explicit:
auto tx1 = transform_2d().translate(2, 5).rotate(42).scale(2, 1);
// more concise:
auto tx2 = translate(2, 5).rotate(42).scale(2, 1);
// or all in one:
transform_2d tx3(2, 5, 42, 2, 1);
// copy the foreground, transformed by `tx1` into the background
compose(bg, fg, tx1);
Blend modes and interpolation methods would also be useful parameters for this function. Those can be implemented at a later time, though.
To facilitate function universality beyond inheritance and improve compatibility with the standard library, an iterator concept supporting multiple dimensions is to be introduced.
nd_vectors
should be able to be added/multiplied/subtracted/divided with their underlying primitive type.
E.g.
nd_vector
(op) primitive
: spice::nd_vector<T, dimensions> operator/(spice::nd_vector<T, dimensions>, T)
primitive
(op) nd_vector
: spice::nd_vector<T, dimensions> operator/(T, spice::nd_vector<T, dimensions>)
The first case is already implemented, the second is still to-do.
As it stands, spice is slowed down by inefficient and frequent allocations, occasionally inefficient algorithms and the lack of any kind of hardware optimisation.
This is starting to become untenable, so it's time to fix it.
Currently nd_vector
and nd_span
are aliases for different instances of the same template (even worse, nd_vector
extends nd_span
by non-virtual inheritance, and derivatives of the two also implement this pattern). This saved implementation time but this approach is unintuitive and making maintenance difficult.
To solve this, the two are to be separated and common functionality is to be extracted into helper functions. A similar approach applies to their derivatives.
This requires #8.
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.