Commit Graph

31 Commits

Author SHA1 Message Date
Kwabena W. Agyeman
cd4ad0dff3 Add linear regression
For easy line following mainly. In non-robust mode the line is computed
using least squares. In robust mode the line is computed using the
Theil-Sen median of slopes method. We do not use the Siegel Median of
Medians operation because it costs more CPU time... but, more
importantly there's no way to improve the centroid estimate so even if
the slope is more robust the line will be drawn in the wrong place.
2017-06-28 01:16:15 -04:00
iabdalkader
d0b45e3cd4 Fix HoG script. 2017-06-19 01:33:40 +02:00
Kwabena W. Agyeman
a039b5d1c7 Change skip_frames() to use a 2 second timeout.
This was necessary due to the increase in the frame rate. The previous
method did not correlate to time.

All scripts updated.
2017-05-27 19:31:41 -04:00
iabdalkader
05f5d07e99 Update keypoints example script. 2017-05-22 19:48:49 +02:00
Kwabena W. Agyeman
f4a9c61544 Add find_line_segments
The OpenMV Cam can now infinite lines and line segments from those
infinite lines. find_lines has been updated to allow all this to work.
2017-05-10 21:40:22 -04:00
Kwabena W. Agyeman
31b7b5bf3e Improved find_lines
Frame rate now can hit 30 FPS when JPEG compression is off. Merging of
lines is perfected too which greatly reduces the noise output. Also,
lines are now objects so you can get their values in an easy way.
2017-05-06 14:31:20 -04:00
iabdalkader
ee0e9822b7 Update keypoints scripts. 2017-03-07 19:45:48 +02:00
Kwabena W. Agyeman
b22aadc21f QR Code Bug Fixes
Fixed typo in qrcode script. Moved scripts to new folder. Fixed roi
offset for qrcodes. Use fast functions in qrcode library.
2017-02-10 15:14:29 -05:00
Kwabena W. Agyeman
d6b49adefa Speed up lens_corr.
Speed up the algorithm by fixing the abs() issue. Do not use that
function in any of your code. It by itself cut the speed of the code
in half. I don't know what's in that function but I'm guessing it does
ABS of a float using ints or something.

I made the zoom parameter functional now too so you can use lens_corr to
zoom in on the image. Argument parsing is handled too. Finally, I
updated the only script where this is used.

Note that I'm able to get more than 10 FPS at 160x120 on the M4 and 15
FPS at 160x120 on the M7. Previous this was at about 5 FPS and 7.5 FPS
respectively.
2017-01-15 21:32:55 -05:00
iabdalkader
e650adb53a Update keypoints.py script. 2017-01-15 18:43:14 +02:00
iabdalkader
be300ff6ed Update scripts that use descriptor functions. 2017-01-14 01:23:23 +02:00
Kwabena W. Agyeman
0e89b655bf Made set_windowing simpilier.
Tested with updated qr code example script.
2017-01-12 17:41:40 -05:00
iabdalkader
58ef87cd85 ORB: Change default threshold to 85 and min match to 5. 2017-01-10 04:11:41 +02:00
iabdalkader
f884fe2072 Add ORB keypoints example scripts. 2017-01-09 01:29:37 +02:00
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
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
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
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
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
8c8e1d08c8 Update template matching script to use binning, ROI and step. 2016-06-14 00:14:44 +02: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
0abd5d3688 Working on scripts...
Moved feature detection scripts into their own folders and added explict
frame_skip value per Ibrahim's request.

Finished working on snapshot and video recording scripts for next
release.

... From CMUcam4 work I learned that people will just want examples that
do "X" thing. So, in general, our examples should include a simple
script showing off a feature and then a more complex script that does "X"
where "X" is some app that a person would want. For example, we'll get
reuqests for face tracking with servos, and movement detection with
servos. So, instead of answering this question a million times with an
example script we'll just have examples for all kinds of things people
will want.

Gotta automate dealing with help support at the end of the day...
2016-04-02 11:18:20 -04:00