Commit Graph

1111 Commits

Author SHA1 Message Date
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
iabdalkader
6d1044ffcf Up the max size of integral images to QVGA.
* With the new integral moving window we can support face detection,
  keypoints and template matching on QVGA frames. However, it was only
  implemented and tested for face detection.

* Increasing the max integral frame now for easier testing.
2016-02-26 03:27:24 +02:00
iabdalkader
f66757f264 Fix ROI size sent from IDE.
* Rectangle was changed from int to short.
2016-02-26 03:03:29 +02:00
iabdalkader
84e2e1fa0d Update keypoints scripts. 2016-02-26 03:03:08 +02:00
iabdalkader
c43906eb3d Fix FREAK's mean_intensity function.
* Using imlib_integral_lookup for lookups.
* Rounding errors caused the patch not be rectangular.
2016-02-26 01:47:22 +02:00
iabdalkader
074cf9d5e4 Add pointer to matching keypoint to kp_t struct.
* This way we don't need to allocate the array of matching keypoints
and risk running out of memory due to fragmentation. So all or nothing.
2016-02-26 01:44:23 +02:00
iabdalkader
1b27383c9d Allocate kpts until GC is almost out of memory
* Keep allocating keypoints until GC is out of memory.
2016-02-26 00:50:46 +02:00
iabdalkader
5ff5419bf1 Return empty list if no blobs were found.
* Fixes #81
2016-02-26 00:47:31 +02:00
iabdalkader
3e4c2c2f3b Fix keypoint bug.
* Set keypoint descriptor to zero, bug was introduced when switching to arrays.
2016-02-26 00:26:37 +02:00
iabdalkader
b15c0c6bc0 Fix formatting. 2016-02-26 00:26:20 +02:00
iabdalkader
5c6056f875 Add file format strings 2016-02-25 11:52:10 +02:00
Ibrahim Abd Elkader
f175c08e0c Merge pull request #80 from kwagyeman/master
Fix swap bug.
2016-02-25 02:09:26 +02:00
Kwabena W. Agyeman
d8ac8f9408 Fix swap bug.
The code clearly did not swap mins and maxes.
2016-02-24 19:07:57 -05:00
iabdalkader
f34a7e30d7 Use fb_alloc to allocate corners.
* Leaves more heap memory for keypoints.
2016-02-24 06:30:14 +02:00
Ibrahim Abd Elkader
70ed5c0f81 Merge pull request #79 from kwagyeman/master
Add top level file open function.
2016-02-24 05:27:27 +02:00