Commit Graph

2051 Commits

Author SHA1 Message Date
iabdalkader
5c50d9948c Update find numbers script. 2018-01-12 01:30:36 +02:00
iabdalkader
fd989c76dc Update find numbers script. 2018-01-12 01:29:27 +02:00
iabdalkader
4d09a13f30 Use ROI for lenet. 2018-01-12 01:23:03 +02:00
iabdalkader
b2d584fe95 Add MQTT library and example. 2018-01-09 20:15:13 +02:00
Ibrahim Abd Elkader
601d1593cf
Merge pull request #301 from kwagyeman/master
Fixed bugs with logpolar/linpolar.
2018-01-09 14:14:57 +02:00
Kwabena W. Agyeman
3da3c60e12 Fixed bugs with logpolar/linpolar.
Images look great now.
2018-01-09 01:25:10 -05:00
Ibrahim Abd Elkader
ece36d3fef
Merge pull request #300 from kwagyeman/master
Add Advanced Optical Flow scripts
2018-01-08 14:58:35 +02:00
Kwabena W. Agyeman
7516d7699f Add Advanced Optical Flow scripts
Someone asked me about doing a field of receptors before. These scripts
show how to do that. Also, added example scripts for calling the linear
polar and log polar methods added previously which power
find_rotscale().
2018-01-08 00:10:55 -05:00
Ibrahim Abd Elkader
8530b26867
Merge pull request #299 from kwagyeman/master
Complete Overhaul of phasecorrelation
2018-01-08 01:14:50 +02:00
Kwabena W. Agyeman
213396d090 Complete Overhaul of phasecorrelation
Just doing one big commit/PR here since I noticed that breaking it up
causes issues.

Anyway, these fixes give us GOOD/WORKING/FAST optical flow now on the
OpenMV Cam M7. A number of changes were made to the optical flow
scripts. You have have absolute and differential estimation example
scripts. Additionally, you also have the ability to measure rotation and
scale changes too. Linear/Log Polar conversion was added for this. Users
may use the new code for generic image manipulation too. Finally, I
updated the power of 2 resolutions since you actually HAVE to use them
with optical flow for the phasecorrelation code to work correctly.

I have some more advanced scripts coming after this. But, This commit is
already getting kinda large so I'm stopping it here.
2018-01-07 17:48:07 -05:00
Ibrahim Abd Elkader
075cfbc0de
Merge pull request #298 from kwagyeman/sensor_fixes
Update invariant table.
2018-01-06 18:42:35 +02:00
Kwabena W. Agyeman
edffa55873 Update invariant table.
Boosted gain by 3X.
2018-01-06 11:07:16 -05:00
iabdalkader
e3872b4c22 Increase gethostbyname timeout. 2018-01-06 00:12:00 +02:00
Ibrahim Abd Elkader
02619af915
Merge pull request #297 from kwagyeman/sensor_fixes
Add white balance control.
2018-01-01 20:28:15 +02:00
Kwabena W. Agyeman
30ecbdc4f8 Add white balance control.
You can now get white balance gains from the camera chip and set the
camera to then use these gains again in a new enviorment.
2017-12-31 19:56:02 -05:00
Ibrahim Abd Elkader
92c7900039
Merge pull request #296 from kwagyeman/sensor_fixes
Fix bugs with sensor auto gain control.
2018-01-01 01:55:18 +02:00
Kwabena W. Agyeman
1cf5211efb Fix bugs with sensor auto gain control. 2017-12-31 17:28:27 -05:00
iabdalkader
b1e84d9955 Fix formatting. 2017-12-31 16:12:17 +02:00
Ibrahim Abd Elkader
07b238acf8
Merge pull request #295 from kwagyeman/sensor_fixes
Add auto gain control ceiling value to be settable by the auto gain
2017-12-31 15:05:50 +02:00
Kwabena W. Agyeman
139cdbdbc9 Add auto gain control ceiling value to be settable by the auto gain
method.

Things are in dB now too. Need to remove the previous settable method.
2017-12-30 23:54:19 -05:00
Kwabena W. Agyeman
aeb0238040 Added hmirror and vflip support to the MT9V034 and example scripts (#294)
* Added hmirror and vflip support to the MT9V034 and example scripts.

* Moved sensor example scripts to one place.

* Add delay to these script for register settling time.
2017-12-31 00:32:01 +02:00
Kwabena W. Agyeman
b906c5f192 Add auto gain control setting support (#293)
You can now get the auto gain setting in dBs and set the value in dBs.
Example scripts are included. Code was tested on the OV7725.
2017-12-30 23:18:35 +02:00
Kwabena W. Agyeman
7be0a7a182 Add exposure control for all sensors (#292)
* Textual register cleanup.

No functional changes.

* Add exposure control support.

You can now set the exposure for the camera in microseconds (versus an
opaque unknown value previously). First, we have a new method called
get_exposure_us() which will get the expsoure time in microseconds. This
let's you determine what the auto exposure algorithm set the exposure
time to. Second, the previously implmented set_auto_exposure() method
which allows you to turn aec off and on accepts a exposure_us keyword
argument when you turn aec off to manually control the exposure.

The next commit will add support for other sensor types.

* Cleanup register formatting.

No functional changes.

* Add exposure control support for the OV2640.

Register access for this chip is a PITA.

* Formatting Cleanup.

No functional changes.

* Add exposure control for ov9650.

Just doing it for all sensors.

* Add missing 2 factor.

* Added exposure control for the MT9V034.

* Add exposure control example.

Works well on the OV7725.
2017-12-30 15:56:11 +02:00
Ibrahim Abd Elkader
c78a269f5a
Merge pull request #291 from kwagyeman/adaptive_threshold
Add adaptive thresholding to filters.
2017-12-28 02:56:50 +02:00
Kwabena W. Agyeman
cbbead0785 Add adaptive thresholding to filters.
I still need to go back and optimizing and cleanup the code. I just
wanted to get the feature in first.
2017-12-27 19:23:48 -05:00
iabdalkader
7cec96a9db Fix H7 build. 2017-12-28 01:04:51 +02:00
Ibrahim Abd Elkader
57b8ba2cda
Merge pull request #290 from kwagyeman/frame_difference_scripts
Add frame differencing example scripts.
2017-12-28 00:29:51 +02:00
Kwabena W. Agyeman
a6b659131d Add frame differencing example scripts.
Better ones that can work in memory now.
2017-12-27 14:43:36 -05:00
Ibrahim Abd Elkader
ece149d8d2
Merge pull request #288 from kwagyeman/sensor_fb_fix
Restore MAIN_FB() size on snapshot()
2017-12-26 21:24:00 +02:00
Ibrahim Abd Elkader
d5721a4f39
Merge pull request #289 from kwagyeman/histeq_update
Refactor histeq()
2017-12-26 13:48:10 +02:00
Kwabena W. Agyeman
dcc31ec37d Refactor histeq()
Just updating the code with the same style as other methods. I have
another new sister method for histeq() comming up next which I'll push
as soon as this PR is done. Didn't want to merge the two into one PR.
2017-12-26 00:02:51 -05:00
Kwabena W. Agyeman
046a2e1825 Restore MAIN_FB() size on snapshot()
This fix allows "copy_to_fb" with a different resolution than the
current frame buffer to work. It also allows the frame buffer to be
resized, etc. In particular, the pooling methods I added for optical
flow work again... you'll also be able to scale the frame buffer too.
2017-12-25 18:00:58 -05:00
Ibrahim Abd Elkader
e0fc302dda
Merge pull request #287 from kwagyeman/compare_methods
Add extra frame buffer.
2017-12-25 19:14:47 +02:00
Kwabena W. Agyeman
27f5110ab7 Add extra frame buffer.
You can now allocate an extra frame buffer for storing images. However,
this takes memory from the main frame buffer. In particular this reduces
the RAM for many methods that do image processing making memory errors
more likely to happen. Note that you may allocate as many extra fb's as
you like. Dealloc happens in reverse order.

Anyway, you can use this method to now storage things like difference
images in RAM allowing for MUCH faster frame difference image
processing.

Moving on, to keep memory management sane... the second fb looks just
like an image and you can use all the image methods to load and update
it, etc. That said, if users deallocate the second FB they need to *NOT*
use the image pointer anymore. There's no way for me to delete the image
pointer in python right now so this is just something that has to be
manually managed (even if I did setup a deconstructor the second FB is
on a stack... so, things wouldn't work so easily with that).
2017-12-24 22:40:26 -05:00
iabdalkader
e1fa2371bb Add missing H7 flash constants. 2017-12-24 22:14:02 +02:00
iabdalkader
a9c8cdb752 Update system.c to support H7. 2017-12-24 22:13:38 +02:00
iabdalkader
f8ba3e4e10 Use MCU_SERIES 2017-12-24 22:11:57 +02:00
iabdalkader
04ce644f55 Add H7 headers and startup. 2017-12-24 22:10:30 +02:00
iabdalkader
a51e0de410 Copy USB code to bootloader.
* The bootloader will be more self-contained.
2017-12-24 21:24:25 +02:00
iabdalkader
e0779b685c Add H7 HAL 2017-12-24 21:23:01 +02:00
iabdalkader
ed761075e4 Update OMV4 board files. 2017-12-24 21:07:50 +02:00
iabdalkader
fe59c25e22 PYDFU: Send clear status only if DFU is not idle.
* H7 bootloader doesn't seem to like it.
2017-12-24 20:43:23 +02:00
Ibrahim Abd Elkader
6753b93842
Merge pull request #286 from kwagyeman/compare_methods
Add a LUT for illuminvar()
2017-12-24 17:24:31 +02:00
iabdalkader
9cb0ca0b9a Add no-strict-aliasing to STHAL CFLAGS. 2017-12-24 17:21:08 +02:00
Kwabena W. Agyeman
f2c36e780a Add a LUT for illuminvar()
It's now faster to be more useful.

Need to work on HDR for the sensor and making the sensor output better.
I fixed some issues with the illuminvar() method going crazy when it
gets colors with values near 0... but, the shot noise from the sensor
adds a lot of noise to everything. Fixing this will likely solve a lot
of algorithm problems.
2017-12-23 21:16:55 -05:00
Ibrahim Abd Elkader
7346efbf0d
Merge pull request #285 from kwagyeman/compare_methods
Compare methods
2017-12-23 22:22:22 +02:00
Kwabena W. Agyeman
e2025e8d1e SSIM Code
Image comparison using SSIM. It can be used to detect image
differences... but, the algorithm was designed to compare image quality
and look at compression artifacts. Anyway, it works kinda okay for
detecting frame differences.
2017-12-23 15:01:13 -05:00
Kwabena W. Agyeman
e5eb7185fb Line ops can now accept a parameter value. 2017-12-21 22:22:12 -05:00
iabdalkader
5a1b3e82f5 Update firmware images. 2017-12-21 21:07:23 +02:00
iabdalkader
f2431de175 Add a list of matching keypoints to keypoints match object. 2017-12-21 21:07:01 +02:00