Commit Graph

142 Commits

Author SHA1 Message Date
iabdalkader
96e4f770c0 Use scale_factor instead of scale in find_features
* Updated all scripts.
2017-01-08 18:23:25 +02:00
iabdalkader
78cebd16e1 Update scripts using auto functions control. 2016-12-29 03:54:22 +02:00
Kwabena W. Agyeman
fbc58cf137 Updated QR Code Library with upstream changes and fixed up scripts for
demo.
2016-12-28 10:57:31 -05:00
Kwabena W. Agyeman
af15ec6eb3 New Blob Code
The new API is backwards compatible with the previous one except for
advanced features. The new blob code uses a flood fill algorithm that is
3x faster in filling out blobs that the previous code. On the M7 the
performance cap of 30 FPS is usually reached.

Additionally, blobs are objects with named attributes now so you don't
have to index access them anymore. However, index access is still
supported.
2016-12-27 19:10:24 -05:00
Kwabena W. Agyeman
6a8ce01e79 Add QRCode detection.
Use the qrcodes script and point your OpenMV Cam at google search
results for QR Codes.
2016-12-27 15:30:35 -05:00
iabdalkader
a800673f87 Update selftest script. 2016-12-22 01:24:27 +02:00
iabdalkader
cee80158c3 Update copy2fb example 2016-12-14 18:50:04 +02:00
iabdalkader
993ad7c2b4 Update helloworld comments. 2016-12-02 01:13:58 +02:00
iabdalkader
e8dcb2863d Update MJPEG streamer example. 2016-11-19 23:31:24 +02:00
iabdalkader
ef6e6303c7 Add HoG. 2016-10-10 17:22:04 +02:00
iabdalkader
41d5171b95 Update find lines script. 2016-09-20 00:20:38 +02:00
iabdalkader
2d88e660a7 Update face detector's default thresholds. 2016-09-14 23:15:59 +02:00
iabdalkader
e81f228796 Add simple edge function. 2016-09-14 20:54:53 +02:00
iabdalkader
e104be63df Implement Canny edge detector. 2016-09-13 02:37:43 +02:00
iabdalkader
3a05589a6b Add Hough Transform example script. 2016-09-12 22:17:20 +02:00
iabdalkader
63d57d2f9f Add facerec example 2016-09-08 03:12:37 +02:00
iabdalkader
ad585caccb Update mjpeg streaming example. 2016-08-30 00:58:02 +02:00
iabdalkader
027d548300 Add FPS test script. 2016-08-27 20:45:14 +02:00
iabdalkader
124cef21de Update colorbars test. 2016-08-23 22:35:50 +02:00
iabdalkader
56438bc079 Add cpufreq module.
* Add CPU frequency scaling module and example script.
2016-08-17 19:42:05 +02:00
iabdalkader
f0a4d98fef Update optical flow script to use 64x32 resolution. 2016-06-21 00:46:47 +02:00
iabdalkader
02088a14e1 Rename set_binning to set_windowing. 2016-06-20 22:24:00 +02:00
Kwabena W. Agyeman
7af818c4d8 Finished up optical flow code.
* Added pooling functions to make getting small images easy. set_binning
works too... but, it zooms in way to much. pooling functions aout you to
shrink the image while not zooming in.

* To make the pooling functions easy to use I created a version that
pools the image out of place and one that pools the image in place. The
inplace pooling function can work on the frame buffer (see edits to
sensor.c)

* I added the code to do hann windowing to the FFT lib. However, I
commented it out after it improved performance by basically zero.
Specialized windowing stuff will only come in handy for folks trying to
tune their algorithm... not in general for everything.

* I added subpixel resolution for the phase correlation code. You can
now track the image movement really precisely. Additionally, I fixed up
the displacement outputs to give expected results. I also added a QoR
output for the displacement code so that you can know when the results
are bad.

* Finally, an example script has been added to show off the features.
2016-06-18 23:05:44 -04:00
iabdalkader
6443eff70f Update template matching script. 2016-06-15 23:43:21 +02:00
iabdalkader
e40c50f739 Add diamond search for fast template matching. 2016-06-15 22:59:17 +02:00
iabdalkader
d9b03641f7 Add copy to framebuffer function and example script. 2016-06-15 21:59:36 +02:00
iabdalkader
8c8e1d08c8 Update template matching script to use binning, ROI and step. 2016-06-14 00:14:44 +02:00
iabdalkader
f6ca73b5c9 Adjust iris window. 2016-06-04 01:18:12 +02:00
iabdalkader
3d31ae535d Remove old iris example. 2016-06-04 01:14:06 +02:00
iabdalkader
4b074a7044 Update iris detection script. 2016-06-04 01:11:44 +02:00
iabdalkader
46fc010514 Update iris tracking script. 2016-06-04 00:58:31 +02:00
iabdalkader
ad812b410a Update iris detection example to use binning. 2016-06-03 23:10:47 +02:00
iabdalkader
34ee346846 Add timer callback example. 2016-05-18 18:53:18 +02:00
iabdalkader
b0f4ebf0cd Update PWM example. 2016-05-18 18:45:25 +02:00
iabdalkader
203b60cd36 Remove old skin_filter.py 2016-05-16 14:29:41 +02:00
iabdalkader
2e2c563227 Re-implement line filters with Python callbacks. 2016-05-16 14:22:30 +02:00
iabdalkader
a165c67132 Set sharpness on OV7725 for edge detection. 2016-05-01 16:01:35 +02:00
iabdalkader
e53d8f874f Add second iris detection example 2016-05-01 15:07:27 +02:00
Kwabena W. Agyeman
7a01a9bede Final Imlib Cleanup
Finished going through imlib.c.
-> Histeq uses fb_alloc now and has hook for RGB histeq when reserve YUV
LUT is added (coming soon in next PR).

Cleanuped py_helper.c/h
-> No functional changes. Just added some header info.

Finished going through py_image.c
* 1 - Finished general code cleanup and updating everything to using new
library functions. In particular, I updated the remaining find_*
functions with the new roi clipping code when they accept rois.
* 2 - Made blob stuff return a list when nothing is found so you don't
have to do an if on the returned value anymore.
* 3 - img subscr is more powerful now allowing image reading and
writing. I updated this because I had to use it to find a previous bug
with socket.send() for the WINC driver.
* 4 - Renamed find_eyes to find_eye. Because it just finds one eye.
* 5 - Other than that just general code cleanup to make functions look
consistent.

And yes, changes have been test. Face tracking, eye tracking, keypoints,
etc. all work still.

Future things todo before release:
1 - Change all LAB stuff to YUV.
2 - Add in reverse YUV->RGB LUT and update functions like Mode() to use
this so they don't generate messed up outputs, also histeq() too.
3 - Add any remaining sensor control functions like agc control.
2016-04-25 21:55:49 -04:00
Kwabena W. Agyeman
367e5fdd3d Improved JPEG capabilities.
* Added the ability to control the quality on JPEG functions... However,
due to our JPEG implementation this doesn't seem to help. 90% JPEG
quality images and regular images should be about equal. But, you can
see heavy degredation with 90% still. E.g. text is unreabable. Not
exactly sure why this is happening but it can be fixed later.

* Changed the compress() function to compressed(). Also, it now
compresses using FB_Alloc to prevent realloc issues when compressing.

* Added new compress() function. This function compresses an image in
place and if that image is the frame bufffer then it will update the
frame buffer bpp value to reflect the image was compressed. Users can use
this function to basically finalize the frame buffer and then pass the FB
to functions that need to send image bytes. The benefit of using this
function is that it should allow higher quality JPEGs and let everything
run at a faster speed while connected to the IDE.

I made this function to speed up WiFi. However, I encountered a bug with
the winc.send() method. It appears to zero the bytes it sends. I didn't
debug further except to verify that the image data became zero after
calling send.
2016-04-23 16:37:21 -04:00
Kwabena W. Agyeman
4c88c110cf 60 Scripts.
Everything except the DAC script works. That has to be fixed. Anyway, we
have a ton of example for launch. So, hopefully, comments about how to
do stuff should be limited.

That said, the PYB module is in a poor state still. Stuff kinda works and
kinda doesn't from it.

One day... There won't be any fires to put out on this project and I can
stop working so hard.
2016-04-21 20:01:17 -04:00
Kwabena W. Agyeman
2006cf9746 Example Work
* Filled in all the board control examples. Everything works except for
DAC.

* Moved test drawing scripts to drawing dir and renamed them and added
comments.

* Filled in all the image filter stuff. There are still some tests that
can be renamed, commented, and added to this folder. But, I will do that
later.

* Fixed motion detection thresholds.

* Fixed LCD script comments.

* Fixed BLE return value.
2016-04-20 17:10:44 -04:00
Kwabena W. Agyeman
16daeb83a2 Fixed blob code.
Removed micropython code from the image libary. Also, blobs are now 10
tuple values by default now. The multilist thing has been removed from
blobs and it will return just a list of blobs instead of a tree of
lists.

Filter functions still work too.
2016-04-13 23:16:51 -04:00
Kwabena W. Agyeman
9e5d379c18 Remove old code.
Pixels, centroid, and orientation are calculated in the blob code now.
As for threshold, it is no longer needed (plus, it required storing a
secondary image in RAM which isn't really something we can handle).
2016-04-09 19:32:14 -04:00
Kwabena W. Agyeman
d1ff36602a New blob code.
Blob tracking has now been updated to work without requiring prior
segmentation of the image. You can still run it on a segmented image,
but, that is not needed anymore.

Use the copy color feature of the OpenMV IDE to get a color in the
image. Once you have that you can then pass the color to find_blobs which
will output a tuple of lists of blobs for each color. By default, all
blobs less than 1/1000th of the image are filtered out, however, you can
add a custom filter function which gets the image and the blob about to
be added to the list and you can decide to filter it or not.

For marker tracking, we now have a function called find markers which
basically merges all the blobs found by find blobs into one list of
blobs. Each new blob will have a color code value which will tell you
what colors are part of that blob. We support tracking up to 30 unique
colors this way.
2016-04-09 11:43:35 -04:00
iabdalkader
50fe3e96bc Don't add Ta to To_min and To_max.
* Fixes issue #113.
2016-04-09 15:27:53 +02:00
iabdalkader
39495a1fd7 Update WiFi streaming scripts. 2016-04-06 02:58:42 +02:00
iabdalkader
270fd4437d Update WiFi streaming script. 2016-04-06 02:57:11 +02:00
iabdalkader
838ffb4fd7 Add WiFi MJPEG streamer + FIR. 2016-04-05 22:37:06 +02:00
iabdalkader
2cbf6f08de Update WiFi scan script 2016-04-05 22:36:03 +02:00