Commit Graph

1125 Commits

Author SHA1 Message Date
iabdalkader
06b1cfca3b Use IRQ priorities defined in irqs.h 2016-03-05 18:25:51 +02:00
iabdalkader
55a4b4536f Add irqs.h.
* Defines IRQ priorities and functions.
2016-03-05 18:23:53 +02:00
iabdalkader
5dcedb8397 Align GIF buffers.
* Make GIF buffers aligned so DMA can be used.
2016-03-05 16:23:43 +02:00
iabdalkader
9230f0d53e Use DMA for SDIO transfers 2016-03-05 15:44:39 +02:00
Ibrahim Abd Elkader
4acaafafa0 Merge pull request #93 from kwagyeman/master
Add support for color gif.
2016-03-05 15:27:27 +02:00
Kwabena W. Agyeman
9325029675 Add support for color gif.
Color gifs look very good for how bad you'd expect them to be with just
7 bits of color (rgb232) - quite amazing. Also, I  hardened the gif
module to make it "user ready".
2016-03-04 23:30:01 -05:00
iabdalkader
03a06a409d Added color conversion strings. 2016-03-04 15:36:39 +02:00
Ibrahim Abd Elkader
72f5b570da Merge pull request #92 from kwagyeman/master
Add color functions.
2016-03-04 15:36:36 +02:00
Kwabena W. Agyeman
0ded05e333 Add color functions.
Now you can convert from rgb to lab/grayscale and vice-versa. Without
this functionality it would be hard to deal with moving between RGB and
LAB.
2016-03-03 23:48:04 -05:00
iabdalkader
02ef98f25f Move MSC bot data to main SRAM (update MP). 2016-03-04 00:59:06 +02:00
iabdalkader
af82c9936d Move MSC bot data to main SRAM.
* MSC can use DMA transfers.
* Free about 2KBs of CCM.
2016-03-03 15:37:13 +02:00
iabdalkader
872b7c1c5e Update qstrs. 2016-03-03 01:14:03 +02:00
Ibrahim Abd Elkader
67efaa21ea Merge pull request #91 from kwagyeman/master
Add statistics function.
2016-03-03 01:13:58 +02:00
Kwabena W. Agyeman
488253a8b0 Add statistics function.
You can now get the color stats for an area in the image. The stats
function returns the mean, median, mode, min, max, st_dev,
lower_quartile, and upper_quartile.

This function allows you to automate binary and threshold functions
based on what's in the iamge.
2016-03-01 21:43:52 -05:00
iabdalkader
596cdf527c Lower the text buffer polling rate. 2016-03-02 04:02:27 +02:00
iabdalkader
3e5bfb27cc Move FatFS file buffer to main SRAM.
* Allows DMA transfers of file data.
2016-03-02 00:19:29 +02:00
iabdalkader
3ea5761076 Add _fb_alloc linker script variable. 2016-03-01 23:47:13 +02:00
Ibrahim Abd Elkader
a90d6631b5 Merge pull request #90 from kwagyeman/master
Fix uninitialized error.
2016-03-01 23:32:00 +02:00
Kwabena W. Agyeman
6ed08213b5 Fix unintialized error.
If the rect was not intersecting these functions would have returned bad
values.
2016-02-29 21:31:59 -05:00
iabdalkader
744329f8f6 Add strings for morph. 2016-03-01 01:42:51 +02:00
iabdalkader
e0c93b8ec3 Add missing morph qstrs 2016-03-01 01:26:03 +02:00
Ibrahim Abd Elkader
0b07f4349f Merge pull request #89 from kwagyeman/master
Add new morph function.
2016-03-01 01:21:45 +02:00
Kwabena W. Agyeman
98f4dde21f Add new morph function.
The morph function lets you convolve the image with a kernel. It's
decently fast right now. But, in the future we'll have to optimize it by
a lot (unrolling loops, using SIMD instructions, etc.).

Anyway, along with morph I added an edge detection test script showing
how you can use a high pass filter on an image to get all the edges in
it. This is not as good as canny edge dection... but, it's about the
same and fast enough.

We'll need a Hough Transform system in the future to make edge dection
useful. Not sure how that will be implemented... so, that's going to be
far away for now.
2016-02-29 18:04:45 -05:00
Ibrahim Abd Elkader
b5c20cd022 Merge pull request #87 from kwagyeman/master
Fix dilate and erode.
2016-02-29 14:51:30 +02:00
Kwabena W. Agyeman
fb8b357c24 Dilate and errode working.
The old code did not actually implement the errode anhd dilate kernels
correctly. However, it migh have been a little faster because it avoided
the boundary problem.

In the future we can optimize all the kernel code to have different loops
for doing the edges of image versus the center. But, for now, this is
good enough. QVGA color tracking with kernels will be slow, but, the
speed can be improved with QQVGA resolution. Using a 3x3 kernel is
plenty fast. Larger ones are slower.

I also added the ability for you to set the threshold for erode and
dialte. This lets you make the kenrel a little bit smarter so that it
won't errode or dilate a pixel unless the threshold is met. Meaning,
you'll be able to use erode to erode an image down to 1 pixel wide
lines.
2016-02-28 16:27:49 -05:00
iabdalkader
d4e1e3d323 Alloc FatFS LFN buffer on stack.
* Saves 512 bytes
2016-02-28 21:54:30 +02:00
iabdalkader
052d64e79c Set frame size to QQVGA in gif script. 2016-02-28 21:37:23 +02:00
iabdalkader
2e7ded5dd4 Add GIF module 2016-02-28 21:34:47 +02:00
iabdalkader
963dd69ca0 Fix typo. 2016-02-28 08:06:32 +02:00
iabdalkader
afa1686940 USE OMV_XCLK_FREQUENCY from OMV board config file. 2016-02-28 04:30:37 +02:00
iabdalkader
b40c07c75d Add BLE example. 2016-02-28 04:12:56 +02:00
iabdalkader
8b3b7e6ece Fix skin filter.
* Remove Y from GS threshold.
* Not really fixed, just looks slightly better.
2016-02-28 04:10:56 +02:00
iabdalkader
955856488c Add profile face XML cascade 2016-02-28 04:09:39 +02:00
iabdalkader
0aed3f4961 Add image filters example. 2016-02-28 04:07:28 +02:00
iabdalkader
c050509b9d Update descriptor scripts.
* Use the new match_descriptor.
* Add commented line that loads descriptor from file
2016-02-28 03:56:02 +02:00
iabdalkader
08f7cb8832 Add LBP descriptor example script 2016-02-28 03:51:57 +02:00
iabdalkader
7e1a4169a7 Add match_descriptor function.
* A single function to match LBP/FREAK descriptors.
2016-02-28 03:39:13 +02:00
iabdalkader
154cb5be69 Change descriptor functions to accept file pointer. 2016-02-28 03:22:07 +02:00
iabdalkader
acafef5207 Revert HaarCascade.
* HaarCascade doesn't really fit into generic descriptor functions.
2016-02-28 02:37:35 +02:00
iabdalkader
67acf7188c Use one load/save function for all descriptors. 2016-02-28 01:38:24 +02:00
Ibrahim Abd Elkader
a1d606a99a Merge pull request #86 from kwagyeman/master
Add frame differencing.
2016-02-27 22:59:17 +02:00
Kwabena W. Agyeman
4ed49082a1 Background Subtraction is working!!!
Woot, all the effort to make it so you can manipulate the image buffer
with an image off disk works!

Try out the motion_detection script.
2016-02-27 11:58:37 -05:00
Ibrahim Abd Elkader
e28d2445b1 Merge pull request #85 from kwagyeman/master
Add line op function.
2016-02-27 17:52:36 +02:00
Kwabena W. Agyeman
00ee215e89 Add line op function.
All the work previously has been more or less leading up to supporting
this function. The line op function will open a file and execute a
function pointer on each line of the file opened to modify the frame
buffer.
2016-02-27 09:59:54 -05:00
Ibrahim Abd Elkader
b9a3624caf Merge pull request #84 from kwagyeman/master
Fix save image.
2016-02-27 16:14:52 +02:00
Kwabena W. Agyeman
1121a6f7df Fixed save image.
It now figures out the file type from the file extension. If no file
extension is given it just saves the file as BMP if its not a JPEG image
or JPEG if it's a JPEG image. If you specify an extension and the file is
not of that type then it will give you an error.

The new test_save.py should run until you reach the JPEG image part
where it quits due to lack of JPEG support natively on OV7725 boards.
Maybe JPEG mode should be supoorted by just compressing pictures?
2016-02-26 22:00:04 -05:00
iabdalkader
8b87656241 Update kpts script.
* Draw FPS on framebuffer
2016-02-26 23:14:32 +02:00
iabdalkader
2b27d1542f Add save LBP descriptor. 2016-02-26 23:12:15 +02:00
Ibrahim Abd Elkader
b8d7d662ad Merge pull request #82 from kwagyeman/master
Add BMP/PNM/JPEG image file loading and saving.
2016-02-26 15:36:57 +02:00
Kwabena W. Agyeman
ac3d1e4373 Add BMP/PNM/JPEG image file loading and saving.
There's not a lot of actual functionality changes from the last commit.
However, switching the basic wrapper library to just long_jump on
failure and moving all the state info to structs required changes to all
the base functions in the last commit. The rest of the changes are to
link in the new functionality and to get the code to compile (usbdbg.c
edits).

Next I'll work on a function which abstracts the problem of opening an
image up and executing a line by line function op on it. I already
worked the code out for that. But, it's not in this commit to keep
things streamlined.
2016-02-25 22:26:56 -05:00