Commit Graph

1954 Commits

Author SHA1 Message Date
Ibrahim Abd Elkader
f7e04a450b Merge pull request #177 from kwagyeman/update_lens_corr
Speed up lens_corr.
2017-01-16 04:43:56 +02: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
Ibrahim Abd Elkader
3defeb8b7d Merge pull request #176 from kwagyeman/stats_fixes
Tested stats with examples and fixed bugs
2017-01-15 22:54:13 +02:00
Kwabena W. Agyeman
ed3f226478 Tested stats with examples and fixed bugs
The automatic grayscale and rgb565 color tracking scripts are very cool.
2017-01-15 14:59:42 -05:00
iabdalkader
e650adb53a Update keypoints.py script. 2017-01-15 18:43:14 +02:00
iabdalkader
e4c297d0e3 ORB: Use the normalized arg.
* Extract keypoints from the first scale only if normalized == True.
2017-01-15 17:40:29 +02:00
Ibrahim Abd Elkader
f1f2fb03d6 Merge pull request #175 from kwagyeman/arduino_interface
Arduino Interfacing Code
2017-01-15 03:56:59 +02:00
Kwabena W. Agyeman
870985178a Arduino Interfacing Code
Simple SPI and I2C examples.
2017-01-14 20:32:32 -05:00
Ibrahim Abd Elkader
25005eb80e Merge pull request #174 from kwagyeman/color_tracking
Update color tracking scripts.
2017-01-14 18:29:26 +02:00
Kwabena W. Agyeman
19050ee7a5 Update color tracking scripts.
Lots of scripts now. Cleaned up old code.
2017-01-14 11:17:07 -05:00
iabdalkader
be300ff6ed Update scripts that use descriptor functions. 2017-01-14 01:23:23 +02:00
iabdalkader
bba8e5a9e0 Remove match_descriptor type arg.
* Not really needed can check MP object types.
2017-01-14 01:15:24 +02:00
iabdalkader
33fa4db8ae Update firmware images. 2017-01-13 22:45:04 +02:00
iabdalkader
c9806c0588 Allow the IDE to interrupt main.py 2017-01-13 03:14:07 +02:00
Ibrahim Abd Elkader
f5ce531078 Merge pull request #173 from kwagyeman/windowing_fix
Made set_windowing simpler.
2017-01-13 00:59:55 +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
c28d090ee2 ORB: User floorf to get keypoint xy from scale. 2017-01-12 17:32:05 +02:00
iabdalkader
11f5d67669 Cleanup JPEG buffer checks. 2017-01-12 17:31:33 +02:00
iabdalkader
9a7c3defc3 Update JPEG buffer sizes in OMV2 and OMV3 2017-01-12 17:31:11 +02:00
iabdalkader
607db241a5 Move main memory to DTCM on M7.
* Allows bigger fb_alloc buffer
2017-01-12 17:30:24 +02:00
iabdalkader
66a7330d1e Add comment about write buffer. 2017-01-12 17:29:59 +02:00
Ibrahim Abd Elkader
77ae730d36 Merge pull request #172 from kwagyeman/fb_alloc_fix
Add fb_alloc stack unwinding code.
2017-01-12 17:32:35 +02:00
Kwabena W. Agyeman
1025d23fe8 Add fb_alloc stack unwinding code.
Needs to be linked into MP too.
2017-01-11 23:05:59 -05:00
iabdalkader
cdef215a6e Make match_keypoints more robust.
* Check keypoints sizes.
* Handle zero matches case.
2017-01-12 04:54:40 +02:00
iabdalkader
cfdb4bdc90 Cast sin/cos to ints in draw_keypoints. 2017-01-12 04:52:50 +02:00
iabdalkader
5467993b38 Free FB memory if compress or compressed fail. 2017-01-12 04:51:21 +02:00
iabdalkader
2d201357a6 Add xalloc_try_alloc.
* Doesn't raise exception if there's no memory
2017-01-12 04:47:29 +02:00
Ibrahim Abd Elkader
e82e3ab785 Merge pull request #170 from kwagyeman/fix_compress
Fix compress and compressed.
2017-01-12 04:47:36 +02:00
Kwabena W. Agyeman
9efd7474ae Fix compress and compressed. 2017-01-11 21:21:04 -05:00
iabdalkader
819e95dc07 ORB: check if matches == 0 2017-01-12 03:46:57 +02:00
iabdalkader
a533ed3549 ORB: Fix ROI again.
* Must leave at least patch_size border.
2017-01-12 02:01:55 +02:00
Ibrahim Abd Elkader
2e9fd35ac1 Merge pull request #169 from kwagyeman/master
Minor Speed Improvements to Blob, QRCode, and Stats
2017-01-12 01:09:35 +02:00
Kwabena W. Agyeman
9f37c83def Minor Speed Improvements to Blob, QRCode, and Stats 2017-01-11 17:09:46 -05:00
Ibrahim Abd Elkader
8e70744b03 Merge pull request #167 from kwagyeman/master
Removed new_image_t, replaced with current image_t.
2017-01-11 18:36:42 +02:00
Kwabena W. Agyeman
cf4cb787f5 Removed new_image_t, replaced with current image_t. 2017-01-10 18:26:49 -05:00
iabdalkader
5f7b40489b ORB: small fixes.
* Do Gaussian smooth on every level, can't get away with just one level.
* Fix ROI, was bigger than needed, and check roi.w/h instead of scaled image.
2017-01-10 14:49:43 +02:00
iabdalkader
e901221c52 ORB: Use popcount for distance. 2017-01-10 06:39:13 +02:00
iabdalkader
58ef87cd85 ORB: Change default threshold to 85 and min match to 5. 2017-01-10 04:11:41 +02:00
iabdalkader
cfc677ed40 Improve bootloader timing
* Detect when VBUS is connected and wait for enumeration, the IDE
  timeout is only started after enumeration.
* A 2s timeout for enumeration is used so the cam doesn't get stuck
  if it's connected to a charger or a power bank.
2017-01-10 00:58:15 +02:00
iabdalkader
817de7ec2d Add optical flow util.
* pygame/sockets util that receives optical flow data from the camera and draws a path.
2017-01-09 01:46:13 +02:00
iabdalkader
732efc1d0a Add TCP client.py for testing WIFI. 2017-01-09 01:42:53 +02:00
iabdalkader
ba2e15a354 Update face tracking example 2017-01-09 01:40:32 +02:00
iabdalkader
d42b2987a7 Fix lookup types for find_keypoints. 2017-01-09 01:30:08 +02:00
iabdalkader
f884fe2072 Add ORB keypoints example scripts. 2017-01-09 01:29:37 +02:00
iabdalkader
02334ebea3 Init theta. 2017-01-09 01:11:27 +02:00
iabdalkader
1ab282a7eb ORB: estimate and return the angle of rotation. 2017-01-09 00:59:33 +02:00
iabdalkader
ff6b3d8367 Change default matching threshold to 70. 2017-01-09 00:40:37 +02:00
iabdalkader
c233131ca4 Change default max_keypoints to 100. 2017-01-09 00:29:22 +02:00
iabdalkader
f1f38f3c74 FAST/AGAST: Allocate MAX_CORNERS or the actual max corners. 2017-01-08 19:05:25 +02:00
iabdalkader
b956935550 ORB: Use one array for all octaves.
* Since I'm sorting the whole array and not every octave now.
2017-01-08 18:55:14 +02:00