Commit Graph

70 Commits

Author SHA1 Message Date
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
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
iabdalkader
2e7ded5dd4 Add GIF module 2016-02-28 21:34:47 +02:00
iabdalkader
5860695f5d Move helper functions to new files. 2016-02-22 18:41:50 +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
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
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
db667c061f Rename fb_stack to fb_alloc and call init0 in main 2016-02-17 05:24:17 +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
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
iabdalkader
7fff65dbd2 Add boards dir to Makefile 2016-02-06 19:32:35 +02:00
iabdalkader
726e3a8e21 Add RGB565 to YUV lookup table 2016-02-03 23:45:20 +02:00
iabdalkader
756c5965d4 Add initial OV7725 driver 2016-01-28 12:40:55 +02:00
iabdalkader
47ae5a7669 Add ATWINC1500 driver 2015-09-15 02:41:36 +02:00
iabdalkader
99bedb06b6 Move firmware files to board directories. 2015-08-01 11:16:59 +02:00
iabdalkader
4174eaf029 Generate binaries in firmware dir 2015-07-28 20:33:05 +02:00
iabdalkader
39b40526d3 Update Makefile for MP 1.4.4 2015-07-18 06:58:47 +02:00
iabdalkader
57cccca3f3 Add support for OpenMV2 2015-05-01 04:44:31 +03:00
iabdalkader
fa7ab8f70a Rename lab.c to lab_tab.c 2015-04-29 04:11:37 +03:00
iabdalkader
6231d528d2 Use pydfu.py instead of dfu-util
* Latest libusb broke dfu-util
* See https://github.com/walac/pyusb/issues/94
2015-04-29 04:08:39 +03:00
iabdalkader
6886c7b531 Update top Makefile
* Remove old modules
* Add MP modules
* Update for new MP code
2015-04-29 04:07:29 +03:00
iabdalkader
d48a7ef1e9 Update Makefiles to use DfuSe files. 2014-11-15 04:21:00 +02:00
iabdalkader
f524650881 Add DFU image
* Generate dfu image
2014-11-11 01:33:16 +02:00
iabdalkader
ef9bf26981 Add Eye Detector 2014-10-25 15:33:02 +02:00
iabdalkader
17d3e73f86 Update MP branch 2014-10-01 01:41:38 +02:00
iabdalkader
5f51438029 Add LBP 2014-09-20 02:02:22 +02:00
iabdalkader
8854f0a9d5 Add JPEG encoder 2014-09-17 21:39:19 +02:00
iabdalkader
b8d989be57 Update MP branch 2014-09-10 23:16:37 +02:00
iabdalkader
2f5b82ec77 Update UART code 2014-09-05 18:09:07 +02:00
iabdalkader
5fdd6e09a3 Add font rendering 2014-09-01 23:43:06 +02:00
iabdalkader
22323eb1a3 Remove dead object files 2014-08-29 19:36:49 +02:00
iabdalkader
0aeab28640 Update MP Modules
* Update all modules for new API
* Move modules to built-in
2014-08-26 20:32:43 +02:00
iabdalkader
f1d1aa5c67 Cleanup all Makefiles
* Add verbose option
* Fix link dependencies
2014-08-26 17:17:59 +02:00
iabdalkader
dac7beadc6 Add mutex 2014-08-20 21:10:43 +02:00
iabdalkader
074557265d Add rainbow filter 2014-08-18 10:33:46 +02:00
iabdalkader
5722436a63 Add MLX90620 driver 2014-08-18 10:26:32 +02:00
iabdalkader
563ab52eca Add Soft I2C 2014-08-18 10:21:48 +02:00
iabdalkader
a0e99939ad Pass Target to CPP 2014-08-18 10:12:03 +02:00
iabdalkader
02999f2432 Rename stm32f407_hal_msp 2014-08-10 19:42:14 +02:00
iabdalkader
12d062d1bc Enable GPIO and SPI
* Fix GPIO/SPI code
* Use buffers in SPI read/write
* Add pin qstrs OMV2
* remove old led files
* Update LCD user examples
2014-08-10 19:39:19 +02:00
iabdalkader
a93cd7fd7a Use CPP to generate linker scripts 2014-07-31 06:26:19 +02:00
iabdalkader
b67ee0e5f3 Add SD SDIO driver 2014-07-23 08:06:56 +02:00
iabdalkader
381e24d315 Add support for STM32F429 2014-07-17 09:16:04 +02:00
iabdalkader
dfab091f25 Add select 2014-07-14 03:43:21 +02:00
iabdalkader
dcb4f34520 Remove old patch programmer 2014-07-06 23:38:29 +02:00
iabdalkader
2d3abcf2f4 Add wlan and socket python modules 2014-07-05 03:41:43 +02:00
iabdalkader
e2ef1a568f Use MP's file module 2014-06-30 03:45:52 +02:00
iabdalkader
92563b6190 Add SDCARD SPI driver 2014-06-28 01:26:32 +02:00
iabdalkader
1c7f8d7bdf Move GPIO configuration to MSP 2014-06-27 22:21:59 +02:00
iabdalkader
18e62155b0 Cleanup Makefile 2014-06-22 12:31:19 +02:00