Commit Graph

1023 Commits

Author SHA1 Message Date
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
iabdalkader
6b5cdce4aa Update face detection example 2016-02-17 22:09:02 +02:00
iabdalkader
61f98e6c21 Cleanup old integral image code. 2016-02-17 20:34:21 +02:00
iabdalkader
dc86780578 Use FB_PIXELS() to get a pointer to fb pixels. 2016-02-17 20:32:50 +02:00
iabdalkader
6460fefa15 Fix old integral image lookup 2016-02-17 20:32:33 +02:00
iabdalkader
d658608061 Fix FB_PIXELS() macro.
* If bpp > 2 (means JPEG image) return pixels + bpp (bpp stores image size in JPEG mode)
* If bpp <= 2 (means GS or RGB image) return pixels + w * h * bpp.
2016-02-17 20:27:58 +02:00
iabdalkader
d2ac2c63a8 Use fb_alloc to alloc/free integral images. 2016-02-17 20:06:31 +02:00
iabdalkader
c2e6d96c27 Remove unused xalloc include 2016-02-17 20:01:05 +02:00
iabdalkader
d3d7e5dc39 Use typdef's for sensor enum and structs. 2016-02-17 19:46:45 +02:00
iabdalkader
d639df0bfe Cleanup sensor.h comments. 2016-02-17 19:08:56 +02:00
iabdalkader
c809ec1b53 Add comment about cropping. 2016-02-17 18:49:51 +02:00
iabdalkader
33e552b276 Add DMA2D to sthal's Makefile 2016-02-17 18:48:20 +02:00
iabdalkader
5fdaf08cac Increase heap size by 256 bytes. 2016-02-17 18:47:33 +02:00
iabdalkader
c1bf4ad33d Add one pass standard deviation function. 2016-02-17 18:46:46 +02:00
iabdalkader
027641e51e Improved Haar detector.
* Use a scanning factor proportional to the current scale.
* Use the new integral moving window to allow two integral images
  (sum and sum squared) for fast mean, variance and standard deviation.
* Higher FPS and more accurate detection.
2016-02-17 18:43:47 +02:00
iabdalkader
b7b4153367 Add integral moving window.
* A new integral image implementation that uses a moving window.
* Integral image is computed in steps, each shift computes n new lines.
* This only requires (image_width * (feature_height+1) * 4) bytes.
* Allows Haar detector to run on QVGA, and allows a second squared
  integral image for standard deviation calculations.
2016-02-17 18:43:09 +02:00
iabdalkader
c043ebc233 Update qstrs 2016-02-17 18:16:15 +02:00
iabdalkader
0904f0bb6b Fix FB_PIXELS()
* Return fb->pixels+fb->bpp when JPEG is enabled.
2016-02-17 05:28:28 +02:00
iabdalkader
db667c061f Rename fb_stack to fb_alloc and call init0 in main 2016-02-17 05:24:17 +02:00
Ibrahim Abd Elkader
cfa9b6e440 Merge pull request #67 from kwagyeman/master
Add framebuffer alloc functions.
2016-02-17 05:07:34 +02:00
Kwabena W. Agyeman
024b16d475 Added some helper stuff.
The alloc functions allow you to use the framebuffer as a storage space.
It's very simple but effective. You can alloc which puts some memory on a
stack... and then when you're done you can free which pops the stack.
Pops (frees) must be done in reverse order of pushes (allocs).

In general, functions should call the init code before using the stack.
It could be in a bad state.

Also, I added some wrappers for file system functions to make that stuff
easier. This will be used in the future.
2016-02-16 21:31:35 -05:00
Ibrahim Abd Elkader
983f1783e3 Merge pull request #66 from kwagyeman/master
Update lookup tables and scripts.
2016-02-17 03:57:51 +02:00
Kwabena W. Agyeman
88f37014f1 Finished updating tables.
With new RGB565<->RGB888 scaling. This included redoing the LAB/YUV/XYZ
tables. I translated the table gen code to python also and added
comments as to where the math came from.

And yes, I tested and compared the tables to make sure they weren't
borken. The tables are slightly different... but, if look at the
progression of values loosely you'll see the triplets are very close to
each other when doing a compare. This is to be expected given I used a
slightly better scaling algo.
2016-02-16 19:37:19 -05:00
Ibrahim Abd Elkader
e3b76ebabb Merge pull request #65 from kwagyeman/master
* Move image macros to imlib.c.
* Add prefix to image macros.
* Add RGB LUT, and gen_rgb2rgb.py  script.
2016-02-16 17:24:48 +02:00
Kwabena W. Agyeman
6699ea4d0e Added RGB LUT.
And modified the rainbow table so that the RGB888 to RGB565 translation
is done using a rounding technique versus hard floor. This is also used
for the RGB565<->RGB888 LUTs.

Additionally, I added a bunch of stuff to the image library to make
working with images easier. I will using these helpers in the future.

Finally, I cleaned up trailing space in the font stuff (pet peeve).
2016-02-15 22:12:25 -05:00
Ibrahim Abd Elkader
42db630564 Merge pull request #64 from kwagyeman/master
Fixed up point and rect.
2016-02-15 04:58:46 +02:00