Commit Graph

1248 Commits

Author SHA1 Message Date
iabdalkader
4bcdb251a3 Update MP branch 2016-02-22 18:02:59 +02:00
iabdalkader
93dc73c7f2 Fix arg to get_rectangle_kw. 2016-02-22 18:00:20 +02:00
iabdalkader
4c63721efa Use default roi when calling save_image 2016-02-22 17:55:26 +02:00
Ibrahim Abd Elkader
2ac623ad1a Merge pull request #78 from kwagyeman/master
Optimize grayscale reading/writing.
2016-02-22 04:31:17 +02:00
Kwabena W. Agyeman
901716b878 Made grayscale read/writing fast.
RGB565 reading and writing is going to be slow. But, grayscale is going
to be going as fast as the system can go.

If Omnivision has just reversed the byte order of data sent to the
camera we wouldn't have this problem for RGB565.
2016-02-21 21:24:57 -05:00
iabdalkader
9f7b370b0e Update face_tracking script.
* Search for new keypoints within a detected face.
* Draw based on matching percentage of keypoints.
2016-02-22 03:32:32 +02:00
iabdalkader
4e5b200bdf Make keypoints_match return the % of matching kpts.
* Change keypoints_match to return the percentage of matching keypoints.
2016-02-22 03:31:15 +02:00
Ibrahim Abd Elkader
1e4678ccd7 Merge pull request #77 from kwagyeman/master
Add BMP and P2/3/5/6 file format support.
2016-02-22 00:32:35 +02:00
Kwabena W. Agyeman
ccd6078c04 Add BMP and P2/3/5/6 file format support.
Added BMP file format reading and writing support code and modified the
ppm code to match. Upper level glue code has been left intact to be
altered in future commits.

Tested save() and ppm writing functionality still works. More
comprehensive tests coming soon.

... Kinda concerend that standard image file formats might not cut it for
the speed we'd like to have when using image files in function calls. I
think only grayscale is going to be fast. All other formats require a
lot of prep work.

I think I may modify some of this low level stuff in the future to
autodetect if an entire grayscale image can be read in or written out
in one go to speed that stuff up.
2016-02-21 17:24:32 -05:00
iabdalkader
43dc87d43e Fix HQVGA resolution. 2016-02-21 23:05:07 +02:00
iabdalkader
8d4131426d Update face, eye and iris detection scripts. 2016-02-21 23:04:31 +02:00
iabdalkader
032a6e3e4d Make Haar detector work on ROIs. 2016-02-21 23:01:34 +02:00
iabdalkader
1d4b95353a Fix Iris bounding box. 2016-02-21 22:39:14 +02:00
iabdalkader
baee885cd4 Update eye detection Python script. 2016-02-21 20:39:48 +02:00
iabdalkader
50e53c91bc Change Iris detector to work on a single region.
* This allows the detector to work on ROIs detected by the eye Haar
  cascade, which improves the accuracy and speed of the detection.
2016-02-21 20:38:01 +02:00
iabdalkader
e18058f27c Update MP branch.
* Add new qstrs.
2016-02-21 03:46:17 +02:00
Ibrahim Abd Elkader
b1e3958df3 Merge pull request #76 from kwagyeman/master
Add frame differencing functions.
2016-02-21 03:45:31 +02:00
Kwabena W. Agyeman
c3cfb117d0 Add frame differencing functions.
The negate function gives you the ability to negate an image before
running difference on it. The difference function will subtract two images
from each other and return the abs() of the result.

I believe it would have been optimal to work on the RGB565 image in the
LAB color space. However, since we don't have an inverse LAB lut this is
not possible. If we could replace LAB with YUV then that would free up
space to have an inverse YUV table (YUV->RGB).
2016-02-20 20:29:19 -05:00
Ibrahim Abd Elkader
ba62fddd00 Merge pull request #75 from kwagyeman/master
Fix draw_keypoints and add drawing examples.
2016-02-21 02:16:44 +02:00
Kwabena W. Agyeman
140ceb3b77 Fixed bug in centroid and added tests.
Stuff works. Yay! Moving on to other things now.
2016-02-20 16:04:59 -05:00
Kwabena W. Agyeman
88d9c02a1b Draw keypoints now accepts lists.
Made draw keypoints accept lists of (x, y, angle) tuples. I did this so
it could be used to show object rotation easily.
2016-02-20 16:04:59 -05:00
iabdalkader
767b0d99b9 Update MicroPython branch 2016-02-20 20:12:02 +02:00
Ibrahim Abd Elkader
a31c1553f9 Merge pull request #74 from kwagyeman/master
Add binary image functions.
2016-02-20 20:11:10 +02:00
Kwabena W. Agyeman
0606f5be44 Added binary image functions.
Pixels, centroid, orientation, along with the basic binary tool kit
functions like and/or/xor.
2016-02-20 11:46:26 -05:00
iabdalkader
db5464948b Use fb_alloc in dilate, erode and median. 2016-02-20 17:48:42 +02:00
iabdalkader
f3e85e1dbb Add fb_free_all.
* Free all blocks allocated on fb ram
2016-02-20 17:41:21 +02:00
iabdalkader
84ff228384 Fix RGB skin filter 2016-02-20 06:16:22 +02:00
Ibrahim Abd Elkader
e72e55802c Merge pull request #73 from kwagyeman/master
Fix set pixel.
2016-02-20 06:03:48 +02:00
Kwabena W. Agyeman
b01adfee26 Fixed up drawing code and scripts along with drawing code.
Set pixel works too now.
2016-02-19 22:55:50 -05:00
iabdalkader
015f924096 Fix BW filter to handle RGB. 2016-02-20 04:22:03 +02:00
Kwabena W. Agyeman
a035aae493 Fixed set pixel. 2016-02-19 21:05:02 -05:00
iabdalkader
a4ea3e0e20 Add filter functions
* Filter functions bypass the default line processing in sensor.c, and pre-process lines.
* Processing is done on the fly, i.e. filters are called from after each line is received.
2016-02-20 03:58:40 +02:00
iabdalkader
a40101e3e0 Fix indent. 2016-02-20 01:26:18 +02:00
iabdalkader
8d47b7b9b2 Add helper functions to lookup color and int. 2016-02-20 01:24:29 +02:00
iabdalkader
c4c25c70d9 Fix Enable/Disable JPEG 2016-02-19 18:10:04 +02:00
iabdalkader
19450b8810 Update Python examples 2016-02-19 18:03:20 +02:00
iabdalkader
e31e504f64 Update MP branch 2016-02-19 17:02:45 +02:00
Ibrahim Abd Elkader
56f3e64eab Merge pull request #71 from kwagyeman/master
New drawing functions.
2016-02-19 17:01:44 +02:00
Kwabena W. Agyeman
b27dfde61f Remvoed set pixel code for now. 2016-02-18 23:02:15 -05:00
Kwabena W. Agyeman
bcd5151412 New drawing functions.
All the drawing functions have been updated to handle automatic clipping
when drawing offscren and work with both grayscale and RGB565.
Additionally, all functions now accept color arguments.

I've also updated the example scripts with the new functions and tested
them out to make sure they work.

Additionally, I wrote a test suite for the drawing functions to make
sure they work.
2016-02-18 22:40:12 -05:00
iabdalkader
04a2e89fd5 Optimize JPEG stack usage 2016-02-18 17:55:45 +02:00
Ibrahim Abd Elkader
c771793ac9 Merge pull request #70 from kwagyeman/master
Added new image querying functions.
2016-02-18 10:33:05 +02:00
Kwabena W. Agyeman
f9ae24f3a0 Reverted commands back to old argument format. 2016-02-17 23:50:08 -05:00
Kwabena W. Agyeman
dd6a322646 Added basic image querying functions.
Now you can get the width/height/format along with size. Additionally, I
fixed up get and set pixel.
2016-02-17 23:04:23 -05:00
iabdalkader
7f9e95fdd5 Add enable/disable JPEG to preferences dialog. 2016-02-18 05:10:10 +02:00
iabdalkader
5aa3555a36 Add enable/disable JPEG to USB commands. 2016-02-18 04:12:53 +02:00
iabdalkader
da15b6a915 * Allow fb compression to be enabled/disabled.
* This allows reading RGB images on PC if needed.
2016-02-18 04:01:41 +02:00
iabdalkader
8fd89db5fe Add Hardware/Software JPEG flags to sensor flags.
* Not used right now.
2016-02-18 03:26:41 +02:00
iabdalkader
31679cab9a Allow Haar detector to accept ROIs. 2016-02-17 22:36:57 +02:00
iabdalkader
6b52c82e39 Add find face+eyes example script 2016-02-17 22:35:29 +02:00