Commit graph

18 commits

Author SHA1 Message Date
Dan Halbert
dbef48d5e2 add #pragma once to all CircuitPython header files without any include guards 2024-05-19 20:38:07 -04:00
Dan Halbert
747b7619ea update headers of most CircuitPython-only files 2024-05-17 14:56:28 -04:00
1c95a85ceb Merge remote-tracking branch 'origin/main' into q-and-d-uvc 2024-01-31 08:27:13 -06:00
8b30494146 Fix copying B to G in bitmapfilter.blend 2024-01-30 10:45:56 -06:00
247125d64b Remove redundant check_matching_details calls 2024-01-29 11:15:45 -06:00
943825f8be Add bitmapfilter.blend
This can perform arbitrary channel mixing between two images.
Alpha blend & maximum functions are demonstrated in the test.
However, it should make most of the usual photo editing blends
possible. (for dissolve, fill a mask bitmap with random values,
which may be expensive to do from circuitpython code; we can
specifically accelerate it if we need to)
2024-01-29 11:15:35 -06:00
ccc85f810c
bitmapfilter: factor out macros
.. they will be used in uvc to do rgb->yuyv conversion
2024-01-22 10:44:36 -06:00
0c36c1558e
Remove morph9, we're tight on flash space as it is
.. and no specific use case for morph9 is known that can't be done
with mix+morph.

Saves ~1800 bytes on Memento
2024-01-15 14:08:13 -06:00
6dc33a8efb
optimize morph9
This reduces the time from about 133ms to about 122ms on my test
image on the memento pycamera

a similar change to morph did not produce a performance improvement,
so I didn't include it.
2024-01-14 11:17:55 -06:00
6e553e763c
Add, test morph9
morph9 is a form of morph which performs 9 different convolutions,
like a version of mix where each coefficient is a (2n+1)x(2n+1) matrix.

Most use cases are covered by morph-then-mix, but some advanced operations
may be more efficient to implement via morph9.
2024-01-12 17:32:45 -06:00
6d30ff527a
Add false_color 2024-01-12 10:48:26 -06:00
ff22baa37f
Add lookup table (LUT) 2024-01-11 14:40:01 -06:00
415432e942
Fix solarize to operate in YUV, add test 2024-01-11 14:37:36 -06:00
4cb193d9c9
bitmapfilter: Add solarize, add comments 2024-01-10 15:32:59 -06:00
7e1c05edf5
morph: accommodate fractional add values 2024-01-09 17:11:53 -06:00
36411203ff
Add bitmapfilter.mix
This allows operations between channels in an image. It can be used for
the following use cases:
 * Conversion to B&W or sepia
 * Adding color casts
 * Mixing or swapping arbitrary channels
 * Inverting or scaling arbitrary channels
2024-01-09 15:00:42 -06:00
7e23fac766
bitmapfilter: refine morph, add docs 2024-01-06 13:34:42 -06:00
75be426377
Add "bitmapfilter"
bitmapfilter.morph is taken from openmv's imlib.

It is substantially faster than blur/sharpen implemented in ulab,
by up to 10x. It also avoids making many allocations.
2024-01-05 14:16:00 -06:00